summaryrefslogtreecommitdiff
path: root/drivers/staging/xgifb/XGI_main_26.c
AgeCommit message (Collapse)Author
2017-04-08staging: xgifb: added blankline after decl.Andrea della Porta
Fixed checkpatch warning: WARNING: Missing a blank line after declarations #882: FILE: drivers/staging/xgifb/XGI_main_26.c:882: + const u8 *f = XGI_TV_filter[filter_tb].filter[filter]; + pr_debug("FilterTable[%d]-%d: %*ph\n", Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12Staging: xgifb: XGI_main_26.c: non-standard CManoj Sawai
Fixes following checkpatch warning: "WARNING: %Lx is non-standard C, use %llx" Signed-off-by: Manoj Sawai <mas@iitkgp.ac.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: xgifb: Improved coding styleArushi Singhal
New variable is added to make the code more readable. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: xgifb: add braces around if-statementsKatie Dunne
Add braces to instances of if-statements found by checkpatch.pl to conform to kernel style. Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: xgifb: add braces around if statementGargi Sharma
add braces around if statment to fix the checkpatch issue, braces {} should be used on all arms of this statement. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-27staging: xgifb: XGI_main_26: Remove multiple assignmentssayli karnik
This patch resolves the checkpatch issue: multiple assignments should be avoided Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17staging: xgifb: XGI_main_26.c Align match parenthesisWalt Feasel
Make suggested checkpatch modification for CHECK: Alignment should match open parenthesis Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17staging: xgifb: XGI_main_26.c Blank line before }Walt Feasel
Make suggested checkpatch modification for CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17staging: xgifb: XGI_main_26.c Blank line after {Walt Feasel
Make suggested checkpatch modification for CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17staging: xgifb: XGI_main_26.c Space around operatorWalt Feasel
Make suggested checkpatch modification for CHECK: spaces preferred around that '-,&' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17staging: xgifb: XGI_main_26.c Logical continuationWalt Feasel
Make suggested checkpatch modification for CHECK: Logical continuations should be on the previous line Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17staging: xgifb: XGI_main_26.c No space after castWalt Feasel
Make suggested checkpatch modification for CHECK: No space is necessary after a cast Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17staging: xgifb: XGI_main_26.c Comment style modificationsWalt Feasel
Make comment style modifications. Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10Staging: xgifb: vgatypes: Replace decimal permissions with 4 digit octalShiva Kerdel
Replaced decimal permissions with 4 digit octal to solve checkpatch errors. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25Staging: xgifb: Fix NULL pointer comparison warningManinder Singh
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x'. This problem was detected by checkpatch. Signed-off-by: Maninder Singh <maninder.s2@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22staging: xgifb: Remove unused variable and if statementRehas Sachdeva
Setting the variable 'refresh_rate = 60;' has no use to the rest of the function. Hence the if statement setting it and the variable itself can be removed. This was detected using the following Coccinelle semantic patch: @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-18Staging: xgifb: Compress return logicBhumika Goyal
This patch compresses the return logic into a single statement and removes the now unused return variable. Done using coccinelle: @@ type T; identifier r; @@ - T r; ... when !=r - r = + return ...; - return r; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-18staging: xgifb: Replace explicit NULL comparisonNamrata A Shettar
Replace explicit NULL comparison with equivalent expression to resolve checkpatch issue. - x != NULL => x Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29staging: xgifb: fix bare use of 'unsigned'Clifton Barnes
fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of 'unsigned'' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: xgifb: remove useless blank linesBen Marsh
This is a patch to XGI_main_26.c that removes useless blanklines as flagged by checkpatch.pl Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: xgifb: Remove unneeded parenthesesJanani Ravichandran
Remove unneeded parentheses around the right hand side of assignments as they are not needed. Semantic patch: @@ expression a, b, c; @@ ( a = (b == c) | a = - ( b - ) ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: xgifb: Don't use multiple blank linesBenoit Hiller
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines" Signed-off-by: Benoit Hiller <benoit.hiller@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: xgifb: make XGIfb_has_VB return booleanGeliang Tang
This patch makes XGIfb_has_VB return boolean, since this function only uses either one or zero as its return value. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31staging/xgifb: fix dumpVGAReg compile error if DEBUG is setPeter Huewe
If DEBUG is set dumpVGAReg is called and tries to access XGISR which is defined as (xgifb_info->dev_info.P3c4) which is not known within this function. -> add as parameter to dumpVGAReg so xgifb_info becomes known Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: xgifb: prefer using the BIT macroHari Prasath Gujulan Elango
This patch uses the BIT macro for bit shift operation. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: xgifb: use arch_phys_wc_add() and ioremap_wc()Luis R. Rodriguez
The same area used for ioremap() is used for the MTRR area. Convert the driver from using the x86 specific MTRR code to the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add() will avoid MTRR if write-combining is available, in order to take advantage of that also ensure the ioremap'd area is requested as write-combining. There are a few motivations for this: a) Take advantage of PAT when available b) Help bury MTRR code away, MTRR is architecture specific and on x86 its replaced by PAT c) Help with the goal of eventually using _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit de33c442e titled "x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()") The conversion done is expressed by the following Coccinelle SmPL patch, it additionally required manual intervention to address all the #ifdery and removal of redundant things which arch_phys_wc_add() already addresses such as verbose message about when MTRR fails and doing nothing when we didn't get an MTRR. @ mtrr_found @ expression index, base, size; @@ -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1); +index = arch_phys_wc_add(base, size); @ mtrr_rm depends on mtrr_found @ expression mtrr_found.index, mtrr_found.base, mtrr_found.size; @@ -mtrr_del(index, base, size); +arch_phys_wc_del(index); @ mtrr_rm_zero_arg depends on mtrr_found @ expression mtrr_found.index; @@ -mtrr_del(index, 0, 0); +arch_phys_wc_del(index); @ mtrr_rm_fb_info depends on mtrr_found @ struct fb_info *info; expression mtrr_found.index; @@ -mtrr_del(index, info->fix.smem_start, info->fix.smem_len); +arch_phys_wc_del(index); @ ioremap_replace_nocache depends on mtrr_found @ struct fb_info *info; expression base, size; @@ -info->screen_base = ioremap_nocache(base, size); +info->screen_base = ioremap_wc(base, size); @ ioremap_replace_default depends on mtrr_found @ struct fb_info *info; expression base, size; @@ -info->screen_base = ioremap(base, size); +info->screen_base = ioremap_wc(base, size); Generated-by: Coccinelle SmPL Cc: Arnaud Patard <arnaud.patard@rtp-net.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Brian Vandre <bvandre@gmail.com> Cc: Thomas Gummerer <t.gummerer@gmail.com> Cc: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Cc: Lubomir Rintel <lkundrak@v3.sk> Cc: Vitor Braga <vitorpybraga@gmail.com> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Suresh Siddha <sbsiddha@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Juergen Gross <jgross@suse.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Airlie <airlied@redhat.com> Cc: Antonino Daplas <adaplas@gmail.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: devel@driverdev.osuosl.org Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: xgifb: remove extra parentheses around right bit shift operationsAya Mahfouz
Removes extra parentheses around bitwise right shift operations. The cases handled here are when resultant values are assigned to variables. The issue was detected and resolved using the following coccinelle script: @@ expression e, e1; constant c; @@ e = -(e1 +e1 >> -c); +c; @@ identifier i; constant c; type t; expression e; @@ t i = -(e +e >> -c); +c; @@ expression e, e1; identifier f; constant c; @@ e1 = f(..., -(e +e >> -c) +c ,...); Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: xgifb: fix colours on big-endian machines other than powerpcAaro Koskinen
XGI framebuffer supports big-endian machines, but it's currently enabled based on __powerpc__ define (which is wrong, as powerpc can be also little-endian now). Use __BIG_ENDIAN instead. This will fix wrong colours on such machines. Tested on parisc with XGI Z7. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: xgifb: remove unnecessary checkSudip Mukherjee
the check for htotal and vtotal is not required as we have already checked for them and returned -EINVAL if any of them is zero. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29Staging: xgifb: fix space before commaBrian Vandre
This fixes the checkpatch.pl error: ERROR: space prohibited before that ',' Signed-off-by: Brian Vandre <bvandre@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-06staging: xgifb: remove unnecessary elseThomas Gummerer
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18staging: xgifb: Initialize Part0PortLubomir Rintel
It was left uninitialized, likely overseen, in this commit: 56810a92c689c6 ("staging: xgifb: use XGIRegInit() Avoid copy-paste and use XGIRegInit() to initialize registers addresses.") Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25staging: xgifb coding style cleanupVitor Braga
This fixes "missing a blank line after declaration" warnings from checkpatch.pl for driver xgifb. The driver has no remaining errors or warnings from checkpatch.pl Signed-off-by: Vitor Braga <vitorpybraga@gmail.com> Reviewed-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28Staging: xgifb: Fix quoted string split across lines in XGI_main_26.cMonam Agarwal
This patch fixes the following checkpatch.pl issues in XGI_main_26.c: WARNING: Quoted string split across lines Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: xgifb: Remove redundant pci_set_drvdataSachin Kamat
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "pVBInfo" parametersAaro Koskinen
Delete unused "pVBInfo" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "rateindex" parametersAaro Koskinen
Delete unused "rateindex" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-07staging: xgifb: initialize register 3cc addressAaro Koskinen
Commit 56810a92c689c64d586a51a1078c5d307b24e8eb (staging: xgifb: use XGIRegInit()) left 3cc uninitialized, and it may trigger a panic during probe. Fix this. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04staging/xgifb: remove unnecessary temp variable in XGIfb_mode_rate_to_ddataPeter Huewe
Instead of subtracting one and then assign a different name and add 1 again we simply use HDE directly. HDE wasn't used directly before, so no change in functionality. Same applies to VDE. -> now we can remove the variable with the very descriptive name E ;) Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04staging/xgifb: rewrite XGIfb_get_cmap_lenPeter Huewe
We don't need to use this switch-case here for a simple two case if-else. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04staging/xgifb: Fix return of uninitialized variablePeter Huewe
Clang warning: drivers/staging/xgifb/XGI_main_26.c: warning: variable 'ret' is used uninitialized whenever 'if' condition: if (xgifb_info->mode_idx < 0) { evaluates to true. drivers/staging/xgifb/XGI_main_26.c: note: uninitialized use occurs here return ret; This patch initializes the variable in this case. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04staging/xgifb: mttr must be (signed) intPeter Huewe
The mttr field must be declared as signed int (as in every other fb driver) for the mttr functions to work properly. Moreover the value should be initialized with -1. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04staging/xgifb: Remove always false comparisonsPeter Huewe
This patch removes some comparisons that always evaluate to false since xoffset and yoffset are defined as __u32 in fb_var_screeninfo in include/linux/fb.h and thus can never be negative. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-03staging/xgifb: Remove unused variables and dead assignmentsPeter Huewe
The variables A,HBS and VBS are never read in XGIfb_mode_rate_to_ddata and the assignment has no side effects -> so we can simply remove them. Removing them causes VT, HT and cr_data3 to be unused -> remove them as well and remove the assignmens to cr_data which are shadowed by a different assignment a few lines later. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21staging: xgifb: use XGIRegInit()Aaro Koskinen
Avoid copy-paste and use XGIRegInit() to initialize registers addresses. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: xgifb: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: xgifb: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: xgifb: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->VCLKData/VBVCLKDataAaro Koskinen
Access XGI_VCLKData and XGI_VBVCLKData directly and make them const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->XGINEWUB_CRT1TableAaro Koskinen
Access XGI_CRT1Table directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>