summaryrefslogtreecommitdiff
path: root/drivers/staging/xgifb
AgeCommit message (Collapse)Author
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-09-16staging: xgifb: fix alignment for if argumentsGargi Sharma
Reduce indentation of multi-line if-test arguments for better readability. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: xgifb: remove blank line before closing braceGargi Sharma
delete blank line before '}' to fix the checkpatch issue Blank lines aren't necessary before a closing brace '}'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: xgifb: add spaces around |Gargi Sharma
insert spaces around '|' to fix the checkpatch issue spaces preferred around that '|'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: xgifb: remove blank line after open braceGargi Sharma
delete a blank line after an open brace to fix the check patch issue, Blank lines aren't necessary after an open brace '{'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: xgifb: remove unnecessary parenthesesGargi Sharma
! has higher priority than && or ||, so remove parentheses around ! expressions to make the code more readable. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: xgifb: move AND operator for logical continuationGargi Sharma
Move && up to the previous line, to fix the checkpatch issue Logical continuations should be on the previous line. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-31staging: xgifb: fix block commentsClifton Barnes
fix checkpatch.pl warning about 'Block comments use a trailing */ on a separate line' and 'Block comments use * on subsequent lines' Signed-off-by: Clifton Barnes <clifton.a.barnes@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-29staging: xgifb: fix code indentClifton Barnes
fix checkpatch.pl warning about 'suspect code indent for conditional statements' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29staging: xgifb: fix 'line over 80 characters'Clifton Barnes
fix checkpatch.pl warning about 'line over 80 characters' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: xgifb: remove extra braces from if stmt (single branch)Nicholas Sim
Remove braces from one branch of if statement where both branches only have a single line of code, as suggested in Documentation/CodingStyle Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: xgifb: ensure braces on all arms of if stmtNicholas Sim
Added braces on else arm of if statement where if arm already has braces as suggested for clarity in Documentation/CodingStyle Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12Staging: 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-03-12staging: xgifb: Avoid multiple blank linesRehas Sachdeva
This patch removes the checkpatch.pl warnings regarding multiple blank lines as single blank line is the preferred coding style. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15staging: xgifb: Fix comment styleJanani Ravichandran
Fix comments to use trailing */ on separate lines. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12staging: 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-12Staging: xgifb: Remove unnecessary blank linesBhumika Goyal
This patch removes unnecessary blank lines after { and before }. Found using checkpatch.pl. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-12Staging: xgifb: Remove space after type castBhumika Goyal
This patch removes unnecessary space after type casts. Found using checkpatch.pl. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08drivers: staging: xgifb: vgatypes.h: fixed coding style warningsSaatvik Arya
fixed warnings about comment block coding style Signed-off-by: Saatvik Arya <aryasaatvik@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-08staging: 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-25Staging: xgifb: Remove space after castNavya Sri Nizamkari
This patch fixes the checkpatch check: CHECK: No space is necessary after a cast Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25Staging: xgifb: Fix comparison to NULL warningNavya Sri Nizamkari
Change comparison to NULL to a ! operation. Found using checkpatch. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25Staging: xgifb: Remove extra blank lines.Navya Sri Nizamkari
This patch fixes the checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25Staging: xgifb: Remove blank line before } and after {Navya Sri Nizamkari
Remove blank line after { and before }. Problem found using checkpatch. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25Staging: xgifb: Replace udelay, mdelay functions with usleep_rangeNavya Sri Nizamkari
This patch fixes the checkpatch.pl check: CHECK: usleep_range is preferred over udelay. Replace mdelay with usleep_range function too. Add 1 millisecond to the delay time to get a reasonable upper limit which saves one wakeup call. Do same throughout the file. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: 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-10-02Staging: xgifb: vb_util: Fixed sparse warning of bit truncation due to castShivani Bhardwaj
Fixed the warning generated by sparse that 'cast truncates bits from constant value' by typecasting unsigned values to u8 as their logical operation is being performed with and stored in a u8 type variable. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-15staging: xgifb: Remove unnecessary externsJoe Perches
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches <joe@perches.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-15staging/xgifb: Move register helper functions to headerPeter Huewe
and mark them as static inline. This shrinks the compiled module from 137442 to 117732 bytes and we also get rid of vb_util.c Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-15staging: 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-05-31staging: xgifb: use swap() in XGI_WriteDAC()Fabian Frederick
Use kernel.h macro definition. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31Staging: xgifb: vb_setmode: Fixed spelling errorColin Cronin
Fixed spelling error in comment. Signed-off-by: Colin Cronin <colinpatrickcronin@gmail.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-26staging: xgifb: rewrite the right hand side of an assignmentAya Mahfouz
This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; 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-18staging: 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-11-04staging: xgifb: Removed a definition which was not used in driverSarah Khan
This patch removes a definition that was not used in driver xgifb Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> 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-10-27staging: remove unneeded parentheses around the right hand side of an assignmentJiayi Ye
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses are not needed. The Coccinelle semantic patch was used to find cases. @r@ identifier x; expression e1, e2; @@ - x = (e1 << e2); + x = e1 << e2; Signed-off-by: Jiayi Ye <yejiayily@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27staging: xgifb: Removed an unnecessary assignment statementSarah Khan
Used coccinelle patch @@ expression data; identifier f; @@ -data = +return f(...); -return (data); Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-07staging: 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-23Staging: xgifb: Fixed a code-style warningChaitanya Hazarey
Added a blank line after declarations to fix the following warning issued by checkpatch.pl: drivers/staging/xgifb/vb_init.c:800: WARNING: Missing a blank line after declarations Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18staging: xgifb: Update TODOLubomir Rintel
There's no more printk abuse, it's been sorted out in 448810662ac3 ("Staging: xgifb: Remove printk usage.") Extra ifdefs have been fixed too, mostly in 800d67cf9f77 ("staging: xgifb: eliminate #ifdef Tap4"), c39aada6926c ("staging: xgifb: eliminate #ifdef XGIFB_PAN"), fa4c212f2b81 ("staging: xgifb: delete unused definitions"), 5c167b30c1b4 ("staging: xgifb: eliminate #ifdef NewScratch"), f059077388b0 ("Staging: xgifb: Remove #ifdef MODULE") and more. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18staging: xgifb: Drop some more useless definesLubomir Rintel
SetLCDStdMode is not supported as of 34c13ee2b690 ("staging: xgifb: drop code for legacy VGA modes"). DisableLCD24bpp defined to zero was never realy useful and went away with aa56b2790a8b ("staging: xgifb: vb_table: delete XGI21_LCDCapList"). Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> 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>