Commit graph

357 commits

Author SHA1 Message Date
Mike Rapoport 228a4cf8e7 staging: sm750fb: staticize getPowerMode function
The getPowerMode function is not used outside ddk750_power, make it
static.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport 6af7003043 staging: sm750fb: remove unused macros
Several macros defined in sm750.h and sm750_help.h are not used and
therefore they can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport 86b5f4ed35 staging: sm750fb: remove unused ddk750_initDVIDisp function
The ddk750_initDVIDisp function is never used and therefore it can be
removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport 55a6cf5d4b staging: sm750fb: remove unused calcPllValue2 function
The calcPllValue2 function is never called and therefore it can be
removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport fb6f37a8c8 staging: sm750fb: staticize local functions in ddk750_chip
Several functions in ddk750_chip are not used elsewhere, let's make them
static.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport 1282bade3b staging: sm750fb: remove dead code
Remove the code enclosed in '#if 0'

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 15:20:35 +02:00
Mike Rapoport 174f264234 staging: sm750fb: replace twoToPowerOfx with shift operator
The function twoToPowerOfx that iteratively calculates the power of 2
may be replaced with shift operator

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:31 +02:00
Mike Rapoport e967d336ee staging: sm750fb: remove unused MB(x) and KB(x) macros
The MB(x) and KB(x) macros are not used and therefore they can be
removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:31 +02:00
Mike Rapoport 4cf26d859a staging: sm750fb: replace custom MB(x) macro with appropriate SZ_xM
Use SZ_xM defined in linux/sizes.h instead of custom MB(x) macro

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:30 +02:00
Mike Rapoport 67088d49a1 staging: sm750fb: tidy up #include directives
Add space between '#include' keyword and the header name

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:30 +02:00
Mike Rapoport 27254ec26c staging: sm750fb: sm750_help.h: spacing fix
Remove unnecessary space in sm750_help.h to fix the following
checkpatch.pl error:
drivers/staging/sm750fb/sm750_help.h:46: space prohibited after that '~' (ctx:ExW)

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:30 +02:00
Mike Rapoport 9137f812e9 staging: sm750fb: ddk750_*i2c: shorten lines to under 80 characters
Fix some checkpatch warnings about long lines

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport 987f202a34 staging: sm750fb: ddk750_*i2c: remove multiple blank lines
Fix the checkpatch warning about multiple blank lines

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport fe82004489 staging: sm750fb: ddk750_swi2c: further reduce CamelCase
Rename remaining CamelCase variables

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport 53bc6b6e1a staging: sm750fb: ddk750_swi2c: rename CamelCase static variables
Rename static variables defining I2C GPIO pins and their control registers from
CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport b3696b7971 staging: sm750fb: ddk750_hwi2c: reduce amount of CamelCase
Rename camel case variables deviceAddress, pBuffer and totalBytes to
addr, buf and total_bytes respectively in sm750_hw_i2c_{read,write}_data
functions.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport 938ad7edf2 staging: sm750fb: hw_i2c_{read,write}: rename CamelCase variables
Rename longCamelCase variables deviceAddress and registerIndex to
shorter addr and reg

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport a503da64fd staging: sm750fb: ddk750_hw_i2c: rename busSpeedMode
rename CamelCase parameter in sm750_hw_i2c_init()

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport 6c78f4ce60 staging: sm750fb: ddk750_swi2c: rename CamelCase static functions
Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport 01a64c4469 staging: sm750fb: ddk750_swi2c: staticize swI2C{SCL,SDA}
swI2C{SCL,SDA} are not used outside ddk750_swi2c, make them static

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport d33b42048e staging: sm750fb: rename swI2CWriteReg to sm750_sw_i2c_write_reg
Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:46 -07:00
Mike Rapoport 288836b69f staging: sm750fb: rename swI2CReadReg to sm750_sw_i2c_read_reg
Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:46 -07:00
Mike Rapoport f2ea7733dd staging: sm750fb: rename swI2CInit to sm750_sw_i2c_init
Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:46 -07:00
Mike Rapoport ac1189513f staging: sm750fb: ddk750_hwi2c: rename CamelCase static functions
Fix the checkpatch warning about CamelCase.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:46 -07:00
Mike Rapoport 6bdbe62b9d staging: sm750fb: rename hwI2CWriteReg to sm750_hw_i2c_write_reg
Fix the checkpatch warning about CamelCase

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:46 -07:00
Mike Rapoport 5ccf734003 staging: sm750fb: rename hwI2CReadReg to sm750_hw_i2c_read_reg
Fix the checkpatch warning about CamelCase

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:46 -07:00
Mike Rapoport ed7042edaf staging: sm750fb: rename hwI2CClose to sm750_hw_i2c_close
Fix the checkpatch warning about CamelCase

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:46 -07:00
Mike Rapoport 19f70eaedb staging: sm750fb: rename hwI2CInit to sm750_hw_i2c_init
Fix the checkpatch warning about CamelCase

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:46 -07:00
Yash Shah cc6c16df80 Staging: sm750fb: Fix "foo* bar" should be "foo *bar" errors
Fix "foo* bar" should be "foo *bar" errors as detected by
checkpatch.pl

Signed-off-by: Yash Shah <yshah1@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:20:42 -07:00
Sudip Mukherjee 4063ea9af6 staging: sm750fb: simplify return
Lets return the return value directly instead of using a variable to
store the result.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Sudip Mukherjee f8fbc838f4 staging: sm750fb: rearrange code
Rearrange the code to remove one exit label which also makes the code
less indented and more readable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Sudip Mukherjee d11ac7cbcc staging: sm750fb: fix multiline comment
Multiline comments are edited to be in the kernel coding style.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Sudip Mukherjee 13ef345822 staging: sm750fb: space around operator
Kernel coding style says to have a space around the operators.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Sudip Mukherjee 5fd93ddf32 staging: sm750fb: remove multiple blank line
Multiple blank lines are not kernel coding style and so checkpatch
complains. Remove them.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Antoine BLIN 9a2c874c51 staging: sm750fb: ddk750_power.c: Split lines over 80 characters.
Fix up "line over 80 characters" warning found by the checkpatch.pl script.

Signed-off-by: Antoine BLIN <antoine.blin@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:56:03 -07:00
Aaron Ouellette 9d7a0ffe6d staging: sm750fb: removed extra parentheses
fixed checkpatch.pl error:
ERROR: return is not a function, parentheses are not needed

Signed-off-by: Aaron Ouellette <aouellette2016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:56:03 -07:00
Juston Li 40403c1b13 staging: sm750fb: add missing blank line after declarations
Fixes checkpatch.pl
WARNING: Missing a blank line after declarations

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:53 -07:00
Juston Li 7b05cbe8b6 staging: sm750fb: remove unnecessary braces
Fixes checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li cebafd8d6f staging: sm750fb: move while to follow do close brace
Fixes checkpatch.pl error:
ERROR: while should follow close brace '}'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 259fef35c7 staging: sm750fb: fix brace placement
Fix brace placement errors caught by checkpatch.pl
ERROR: that open brace { should be on the previous line

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li a1fe154f0f staging: sm750fb: remove unnecessary whitespace
Fixes checkpatch.pl warning:
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 919ca7c63b staging: sm750fb: remove trailing whitespace
Fixes checkpatch.pl error:
ERROR: trailing whitespace

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li adbb90e830 staging: sm750fb: add space after semicolon
Fixes checkpatch.pl error:
ERROR: space required after that ';'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 0d5e63c462 staging: sm750fb: add spaces around operators
Fixes checkpath.pl error:
ERROR: spaces required around that operator

Note running checkpatch.pl with '--strict' catches more
of these errors along with cases where spacing is optional
but preferred. Take care of these in a future patch.

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 6ab5b6d16b staging: sm750fb: consistent spacing around operators
Fixes checkpatch.pl error:
ERROR: need consistent spacing around operator

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li f7d8b69a1d staging: sm750fb: add space after return type
Fixes checkpatch.pl warning:
WARNING: missing space after return type

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 5d14c13ae0 staging: sm750fb: add space after struct definition
Fixes checkpatch.pl warning:
WARNING: missing space after struct definition

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:51 -07:00
Juston Li b63f3dcab1 staging: sm750fb: add space after enum definition
Fixes checkpatch.pl warning:
WARNING: missing space after enum definition

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00
Juston Li 6338a78132 staging: sm750fb: add space after close brace
Fixes checkpatch.pl error:
ERROR: space required after that close brace '}'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00
Juston Li 8c11f5a280 staging: sm750fb: add space before open brace
Fixes checkpatch.pl error:
ERROR: space required before the open brace '{'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00
Juston Li b68a17a2ed staging: sm750fb: remove space between function name and parenthesis
Fixes checkpatch.pl warning:
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00
Juston Li 9ccc5f4427 staging: sm750fb: add space before open parenthesis
Fixes checkpatch.pl error:
ERROR: space required before the open parenthesis '('

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00
Juston Li 8332d94c97 staging: sm750fb: remove space before close parenthesis
Fixes checkpatch.pl error:
ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00
Juston Li 7f0ebcc290 staging: sm750fb: remove spacing after open parenthesis
Fixes checkpatch.pl warning:
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:51:59 -07:00
Juston Li 78376535c2 staging: sm750fb: use tabs for indentation
Replace spaces with tabs for indentation to fix the checkpatch.pl error
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:51:59 -07:00
Anders Fridlund a43abee7de Staging: sm750fb: ddk750_dvi.h: Fix brace coding style issue
This is a patch to the ddk750_dvi.h file that fixes up a brace error
found by the checkpatch.pl tool

Signed-off-by: Anders Fridlund <anders.fridlund@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:31:12 -07:00
Vinay Simha BN df52568686 staging: sm750fb: coding style global ERROR fixes
kernel coding style fixes for below messages from
scripts/checkpatch.pl

ERROR: do not initialise globals to 0 or NULL

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:31:12 -07:00
Anatoly Stepanov d5fca4035a staging: sm750fb: add required spaces around C operators
Add spaces according to checkpatch.pl messages:
"ERROR: spaces required around that '=' (ctx:VxV)"
"ERROR: need consistent spacing around '-' (ctx:WxV)"
"ERROR: spaces required around that '?' (ctx:VxE)"
"ERROR: need consistent spacing around '&' (ctx:VxW)"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:42 -07:00
Anatoly Stepanov 14a974c567 staging: sm750fb: fix open brace in function declaration
Fix according to checkpatch.pl message:
"ERROR: open brace '{' following function declarations go on the next line"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:42 -07:00
Anatoly Stepanov 9a52ae2dd8 staging: sm750fb: remove assignment from if condition
Remove assignment from if condition according to checkpatch.pl message:
"ERROR: do not use assignment in if condition"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:41 -07:00
Anatoly Stepanov 990e56663b staging: sm750fb: fix 'switch and case' indentation
Fix according to checkpatch.pl message:
"ERROR: switch and case should be at the same indent"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:41 -07:00
Anatoly Stepanov 5e83e2832b staging: sm750fb: fix indentation in 'else' statements
Fix indentation according to checkpatch.pl message:
"ERROR: space required after that close brace '}'"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:41 -07:00
Anatoly Stepanov 4bcdffee2d staging: sm750fb: put open brace on the previous line
Fix open braces according to checkpatch.pl message:
"ERROR: that open brace { should be on the previous line"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:41 -07:00
Anatoly Stepanov e188ea325d staging: sm750fb: fix indentation of pointer operator
Fix indentation of pointer operator '*' according to checkpatch.pl message:
"ERROR: 'foo* bar' should be 'foo *bar' "

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:41 -07:00
Anatoly Stepanov 6d1b3d64cd staging: sm750fb: insert space before open parenthesis
Insert spaces before '(' according to checkpatch.pl message:
"ERROR: space required before the open parenthesis"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:41 -07:00
Anatoly Stepanov e0ded448d0 staging: sm750fb: insert space between ')' and '{'
Insert spaces according to checkpatch.pl message:
"ERROR: space required before the open brace '{'"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:29:41 -07:00
Anatoly Stepanov 29d87336d4 staging: sm750fb: remove trailing whitespaces
Remove trailing whitespaces according to checkpatch.pl error message:
"ERROR: trailing whitespace"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:28:02 -07:00
Anatoly Stepanov 202add2a04 staging: sm750fb: replace spaces with tabs
Replace spaces with tabs according to checkpatch.pl error message:
"ERROR: code indent should use tabs where possible"

Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:28:02 -07:00
Hari Prasath Gujulan Elango 7211f6f72f staging: sm750fb: remove redundant __func__ in debug statement
This patch removes the redundant __func__ from dynamic debug prints as
the pr_xxx set of functions can be dynamically controlled to include
function name.Also fix a typo in debug statement.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 18:28:02 -07:00
Isaac Assegai 6bdee8bddd Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesis
Insert spaces before open parenthesis in ddk750_swi2c.c
to rectify the following checkpatch errors:
ERROR: space required before the open parenthesis '('

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 22:10:02 -07:00
Isaac Assegai d3f431d0ff Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines
Place braces on correct lines in ddk750_swi2c.c
to rectify the following checkpatch errors:
ERROR: that open brace { should be on the previous line

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 22:10:02 -07:00
Isaac Assegai 6d43b0f482 Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operators
Insert spaces around comparison operators in ddk750_swi2c.c
to rectify the following set of checkpatch errors:
ERROR: spaces required around that '='
ERROR: spaces required around that '<'
ERROR: spaces required around that '>='

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 22:10:02 -07:00
Isaac Assegai 7ef803a92d Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabs
Replace spaces with tabs in ddk750_swi2c.c to
rectify the following checkpatch warnings:
WARNING: please, no spaces at the start of a line

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 22:10:02 -07:00
Isaac Assegai f27ece1499 Staging: sm750fb: ddk750_swi2c.h: Shorten lines to under 80 characters
Shorten lines to under 80 characters in ddk750_swi2c.h
to rectify the following checkpatch warnings:
WARNING: line over 80 characters

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 22:10:02 -07:00
Isaac Assegai bf36fa2f71 Staging: sm750fb: ddk750_swi2c.h: Replace spaces with tabs
Replace spaces with tabs at the start of lines in
ddk750_swi2c.h to rectify the following checkpatch warning:
WARNING: please, no spaces at the start of a line

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 22:10:01 -07:00
Isaac Assegai 278b63cebc Staging: sm750fb: modedb.h: Shorten lines to under 80 characters
Shorten lines to under 80 characters in modedb.h
to rectify the following checkpatch warnings:
WARNING: line over 80 characters

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 22:10:01 -07:00
Isaac Assegai 5e9ba80a7e Staging: sm750fb: modedb.h: Replace spaces with tabs
Replace spaces with tabs at the start of lines in
modedb.h to rectify the following checkpatch warning:
WARNING: please, no spaces at the start of a line

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 22:10:01 -07:00
Greg Donald eb0f4271ca drivers: staging: sm750fb: Fix "'foo * bar' should be 'foo *bar'" errors
Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 21:07:07 -07:00
Hari Prasath Gujulan Elango 78cb7a38c6 staging: sm750fb: convert pr_err to pr_info
This patch modifies few debug prints from pr_err() to pr_info() as they
fall under that category.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 21:07:07 -07:00
Niranjan Dighe 658373e54c Staging: sm750fb: correct spacing between lines of code
This patch corrects line spacing by removing and adding newline
characters wherever necessary

Signed-off-by: Niranjan Dighe <ndighe@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:40:54 -07:00
Niranjan Dighe 231fe7ca1a Staging: sm750fb: replace spaces by tabs
This patch replaces spaces by tabs at the start of the line and in
between variable declarations.

Signed-off-by: Niranjan Dighe <ndighe@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:40:54 -07:00
Juston Li 5ee35ea775 staging: sm750fb: fix c99 comments
fixed all checkpatch.pl ERROR: do not use C99 // comments

Any C99 comments used to comment out code are simply removed.
Also some of the errors occur inside '#if 0' blocks which I
might as well fix since checkpatch.pl caught them but the blocks
themselves should probably be cleaned up later.

Changes since v1: close a comment block

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:20:33 -07:00
Isaac Assegai da295041a8 Staging: sm750fb: ddk750_display.c: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in ddk750_display.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai 195d2b643b Staging: sm750fb: Insert spaces after commas in two files.
Insert Spaces after commas to rectify the following
checkpatch errors in ddk750_help.c and ddk750_mode.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai f31b55ac2a Staging: sm750fb: Insert spaces after commas in two files.
Insert Spaces after commas to rectify the following
checkpatch errors in ddk750_power.c and ddk750_swi2c.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>:
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai c97b2c1536 Staging: sm750fb: sm750_cursor.c: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_cursor.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai b5d63974bb Staging: sm750fb: sm750_accel.c: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_accel.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:31 -07:00
Isaac Assegai bdec77735e Staging: sm750fb: sm750_hw.c: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_hw.c:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai 555a6b1e24 Staging: sm750fb: Inserted spaces after commas in three files.
Insert Spaces after commas to rectify the
following checkpatch errors in ddk750_hwi2c.h,
ddk750_help.h and ddk750_chip.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai 5e93581388 Staging: sm750fb: Inserted spaces after commas in four files.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_cursor.h,
sm750_accel.h, ddk750_power.h and ddk750_mode.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai e8b976da30 Staging: sm750fb: sm750.h: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai afa34e7e74 Staging: sm750fb: sm750_help.h: Insert spaces after commas.
Insert Spaces after commas to rectify the
following checkpatch errors in sm750_help.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Isaac Assegai e9f490ea0c Staging: sm750fb: sm750_hw.h: Insert spaces after commas.
Insert Spaces after commas in sm750_hw.h to rectify the
following checkpatch errors in sm750_hw.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Hari Prasath Gujulan Elango 2dc340910b staging: sm750fb: Add missing Kconfig dependency
The sm750fb driver has few Framebuffer configuration dependencies that
need to be selected in order to get compiled successfully

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:26:30 -07:00
Masanari Iida 008272072d staging: sm750fb: Fix typo in sm750.c
This patch fix a spelling typo in printk within sm750.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 12:04:35 +09:00
Michel von Czettritz c4eacdad9d staging: sm750fb: remove duplicate from fb_videomode
As suggested by Sudip this patch removes the redundant 1360x768@60
option from the fb_videomode struct array.
The removed option and the option one it differ in a typo and a flag.

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 12:04:35 +09:00
Isaac Assegai 63de0eb0bc Staging: sm750fb: Replace spaces with tabs at the start of lines
Replace spaces at the start of lines with tabs to rectify
the following warning:
WARNING: please, no spaces at the start of a line

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 12:04:35 +09:00
Huacai Chen 288ef567ab staging: sm750: Fix lynxfb_ops_imageblit() if image->depth != 1
If image->depth != 1, lynxfb_ops_imageblit() should fallback to call
cfb_imageblit(), not return directly. Otherwise it can't display the
boot logo.

Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 13:34:49 -07:00
Luis R. Rodriguez 2e043a923e staging: sm750fb: use arch_phys_wc_add() and ioremap_wc()
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: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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-24 13:34:26 -07:00
Greg Kroah-Hartman 936a0cd52a Merge 4.1-rc4 into staging-next
We want the fixes in here for testing and merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-18 13:52:44 -07:00
Robin Karlsson 258f6a5005 Staging: sm750fb: Fix spelling error in TODO
Fixed spelling error in TODO.

Signed-off-by: Robin Karlsson <s.r.karlsson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:59 +02:00
Amitoj Kaur Chawla 31296ba5c0 Staging: sm750fb: Remove space after parenthesis
Fixed error by removing space after open parenthesis '('
Problem found using checkpatch.pl
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:59 +02:00
Carlos E. Garcia 69e98df782 Staging: fixed multiple spelling errors.
Fixed multiple spelling errors.

Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:58 +02:00
Arnd Bergmann bb6ce8b28d staging: sm750: remove incorrect __exit annotation
The lynxfb_pci_remove function is used as the 'remove' callback
of the driver, and must not be discarded:

lynxfb_pci_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o

This removes the extraneous annotation.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 01:58:04 +02:00
Greg Kroah-Hartman 97498bb576 Revert "Staging: sm750fb: Fix C99 Comments"
This reverts commit 6ad6b5ed3e.

It added a file that should not be in the kernel source tree.

Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-04 12:00:25 +02:00
Michel von Czettritz 61c507cf65 staging: sm750: move assignment out of if cond
This patch moves the assignments from the if conditions to the line before the condition.
The 3 occurrence are return values and the checks for errors.

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:33 +02:00
Michel von Czettritz eb1167a36c staging: sm750: fix whitspace for cast to pointer
This patch fixes the checkpatch.pl warning:
'ERROR: "(foo*)" should be "(foo *)"'

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:33 +02:00
Michel von Czettritz a0c838f10a staging: sm750: fix whitespace
This patch fixes whitespace checkpatch.pl warnings and errors.
Mainly whitespaces around operators.

- ERROR: spaces required around that ':' (ctx:VxW)
- ERROR: space required after that ';' (ctx:VxV)
- ERROR: spaces required around that '<' (ctx:VxV)
- ERROR: spaces required around that '!=' (ctx:VxV)

And some small warnings around whitespace:

- ERROR: trailing whitespace
- WARNING: space prohibited before semicolon
- WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:33 +02:00
Michel von Czettritz 876e5a701f staging: sm750: blank line after declaration
This patch fixes "WARNING: Missing a blank line after declaration"
checkpatch.pl warnings.

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:33 +02:00
Michel von Czettritz 3318bb5e94 staging: sm750: 80 characters per line
This patch inserts line breaks to make lines fit into 80 characters and increase readability.

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:32 +02:00
Michel von Czettritz 4bd9503d0b staging: sm750: comment formating
This patch fixes checkpatch.pl warnings / errors:

- "WARNING: please, no space before tabs"
- "ERROR: do not use C99 // comments"

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:32 +02:00
Michel von Czettritz f46a04c756 staging: sm750: no braces for single stmt if blocks
This patches fixes checkpatch.pl warning:
"WARNING: braces {} are not necessary for single statement blocks"

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:32 +02:00
Michel von Czettritz 27fa159bd2 staging: sm750: fix whitespaces around pointers
This patch fixes checkpatch.pl errors:
- ERROR: "foo * bar" should be "foo *bar"
- ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:32 +02:00
Michel von Czettritz 5ace4e10c1 staging: sm750: fix whitespace around braces
Fix multiple similar checkpatch.pl errors:

- "ERROR: space required before the open parenthesis '('"
- "ERROR: space required before the open brace '{'"
- "ERROR: space prohibited after that open parenthesis '('"
- "ERROR: space prohibited before that close parenthesis ')'"

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:39:32 +02:00
Michel von Czettritz 70407df776 staging: sm750: move '{' to previous line
Fix checkpatch.pl error:
"ERROR: that open brace { should be on the previous line"

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:34:29 +02:00
Michel von Czettritz 45e3b3da82 staging: sm750: add missing spaces after ','
Fixes checkpatch.pl error:
"ERROR: space required after that ',' (ctx:VxV)"

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:34:29 +02:00
Michel von Czettritz c52c3700d8 staging: sm750: Reindent
The reindent fixes the
"WARNING: please, no spaces at the start of a line",
"ERROR: code indent should use tabs where possible"
and some other small checkpatch.pl warnings and errors.

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:34:29 +02:00
Amitoj Kaur Chawla 59f084070c Staging: sm750fb: Remove zero testing pointer typed value
Removes variable comparison with 0.
Done using following coccinelle script.

@ disable is_zero,isnt_zero @
expression *E;
expression E1,f;
@@

E = f(...)
<...
(
- E == 0
+ !E
|
- E != 0
+ E
|
- 0 == E
+ !E
|
- 0 != E
+ E
)
...>
?E = E1

@ disable is_zero,isnt_zero @
expression *E;
@@

(
  E ==
- 0
+ NULL
|
  E !=
- 0
+ NULL
|
- 0
+ NULL
  == E
|
- 0
+ NULL
  != E
)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 11:10:27 +02:00
Amitoj Kaur Chawla e261e69e2d Staging: sm750fb: Fixed indent of switch-case
Fixed indent of switch-case by adding space using tabs.
Problem found using checkpatch.pl
ERROR: space required after that ';' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 11:10:27 +02:00
Amitoj Kaur Chawla 6ad6b5ed3e Staging: sm750fb: Fix C99 Comments
Used C89 instead of C99 Comment and removed C99 comments performing prints only.
Problem found using checkpatch.pl
ERROR: do not use C99 // comments

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 11:10:27 +02:00
Helen Fornazier f8da055aaf staging: sm750fb: Change "foo * bar" style to "foo *bar"
This patch fixes the checkpatch.pl error:

ERROR: "foo * bar" should be "foo *bar"
+int ddk750_initHw(initchip_param_t * pInitParam)

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:41 +01:00
Helen Fornazier ae59c46541 staging: sm750fb: Move switch case trailing statment
This patch fixes the checkpatch.pl error:

ERROR: trailing statements should be on next line

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:41 +01:00
Helen Fornazier c04051f533 staging: sm750fb: Add spaces after ','
This patch fixes the checkpatch.pl error:

ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier c107243b09 staging: sm750fb: Add space before switch statement
This patch fixes the checkpatch.pl warnings:

ERROR: space required before the open parenthesis '('
+               switch(divisor) {

ERROR: space required before the open parenthesis '('
+               switch(divisor) {

ERROR: space required before the open parenthesis '('
+       switch(reg) {

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier 82736d2244 staging: sm750fb: Add space before if statement
This patch fix the checkpatch.pl warning:

ERROR: space required before the open parenthesis '('

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier ce02a16ae4 staging: sm750fb: Fix for statement style
This patch fixes the checkpatch.pl warnings:

ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '>' (ctx:VxV)
ERROR: space required before the open parenthesis '('
ERROR: space required after that ';' (ctx:VxV)

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier 9767fc5126 staging: sm750fb: Fix if/else/for/switch braces style
This patch fixes the checkpatch.pl errors:

ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'
WARNING: braces {} are not necessary for single statement blocks
ERROR: space required before the open brace '{'

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:10:40 +01:00
Helen Fornazier 569a6dcf3d staging: sm750fb: Add space after struct definition
This patch fixes checkpatch.pl warning:

WARNING: missing space after struct definition
+typedef struct _pllcalparam{

Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-27 00:06:49 +01:00
Lorenzo Stoakes cb422f3bbc staging: sm750fb: Remove spinlock helper function
This patch removes the unnecessary spinlock helper function and instead
calls spin_lock and spin_unlock directly.

This does *not* resolve sparse warnings about context imbalances but these are
spurious.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:04:48 +01:00
Lorenzo Stoakes 35fb80b9de staging: sm750fb: Fix __iomem pointer types
This patch annotates pointers as referring to I/O mapped memory where they ought
to be, removes now unnecessary ugly casts, eliminates an incorrect deref on I/O
mapped memory by using iowrite16 instead, and updates the pointer arithmetic
accordingly to take into account that the pointers are now byte-sized. This
fixes the following sparse warnings:-

drivers/staging/sm750fb/sm750_cursor.c:113:19: warning: cast removes address space of expression
drivers/staging/sm750fb/sm750_cursor.c:204:19: warning: cast removes address space of expression

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:04:48 +01:00
Lorenzo Stoakes 2ffbc9c6aa staging: sm750fb: Remove unused function
This patch removes the unused hw712_fillrect function. This patch fixes
the following sparse warning:-

drivers/staging/sm750fb/sm750_accel.c:95:5: warning: symbol 'hw712_fillrect' was not declared. Should it be static?

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:04:48 +01:00
Lorenzo Stoakes d93abd15c8 staging: sm750fb: Make internal functions static
This patch declares externally unavailable functions static. This fixes
the following sparse warnings:-

drivers/staging/sm750fb/ddk750_hwi2c.c:63:6: warning: symbol 'hwI2CWaitTXDone' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_hwi2c.c:93:14: warning: symbol 'hwI2CWriteData' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_hwi2c.c:160:14: warning: symbol 'hwI2CReadData' was not declared. Should it be static?

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:02:28 +01:00
Lorenzo Stoakes 3de08a2d14 staging: sm750fb: Use memset_io instead of memset
This patch takes into account that cursor->vstart, crtc->vScreen and
share->pvMem are pointers to memory-mapped I/O and thus we should use memset_io
to make this explicit. In addition, some architectures require special treatment
of memory-mapped I/O so the previous code could actually break without this
change.

This fixes the following sparse warnings:-

drivers/staging/sm750fb/sm750.c:489:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:490:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:501:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:502:17: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:833:5: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/sm750fb/sm750.c:1154:9: warning: incorrect type in argument 1 (different address spaces)

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:02:28 +01:00
Ragavendra Nagraj de99befd18 staging: sm750fb: Fixed no space and indent warns
This patch fixes the no spaces and indent warnings identified by the
checkpath.pl script for the entire ddk750_chip.c file by using
appropriate tab spaces and indents accordingly.

Signed-off-by: Ragavendra Nagraj <ragavendra.bn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 14:02:23 +01:00
Ricardo Ribalda Delgado 6a9df4303b staging/sm75fb: Declare static functions as such
This patch fixes this sparse warning

CHECK   drivers/staging/sm750fb/ddk750_swi2c.c
drivers/staging/sm750fb/ddk750_swi2c.c:223:6: warning: symbol
  'swI2CStart' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_swi2c.c:234:6: warning: symbol
  'swI2CStop' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_swi2c.c:252:6: warning: symbol
  'swI2CWriteByte' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_swi2c.c:320:15: warning: symbol
  'swI2CReadByte' was not declared. Should it be static?
drivers/staging/sm750fb/ddk750_swi2c.c:361:6: warning: symbol
  'swI2CInit_SM750LE' was not declared. Should it be static?

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 14:00:54 +01:00
Supriya Karanth 6946edd07a staging: sm750fb: remove parantheses from return statements
found by checkpatch.pl :ERROR: return is not a function,
parentheses are not required

changes made using coccinelle script:

@@
expression e,e1;
@@
(
return (e / e1);
|
return
-(
e
-)
;
)

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15 18:41:15 +01:00
Somya Anand d2a6037738 Staging: sm750fb: Add space after ','
This patch adds space after ',' for the better readability of
code. This issue is detected by checkpatch.pl

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15 18:41:15 +01:00
Supriya Karanth b30edfcd04 staging: sm750fb: remove intialization of static ints
static ints are initialized to 0 by the compiler.
Explicit initialization is not necessary.

Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL

changes made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15 18:41:15 +01:00
Supriya Karanth 6fa7db83e4 staging: sm750fb: Add void to function definition with no arguments
Found by checkpatch.pl - ERROR: Bad function definition

A function with no arguments allows for variadic arguments. Add
void in between the empty parentheses to indicate that the function
takes no arguments.

changes made using coccinelle script:
@@
type T;
identifier f;
@@
T f(
+void
 ) {
...
}

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15 18:41:14 +01:00
Ioana Ciornei d6b0d6de1d staging: sm750: Fix switch-case indentation
Remove switch cases indentation in order to follow the Linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15 18:41:14 +01:00
Greg Kroah-Hartman e74ac55029 Staging: sm750fb: provide error path for hw_sm750le_setBLANK()
This provides a default path for the switch statement in
hw_sm750le_setBLANK() so that the compiler will not correctly complain
about undefined values being sent to the hardware.

Instead, properly error out if the blank command is unknown by the
driver.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 22:08:38 +01:00
Greg Kroah-Hartman 7c6f3fdc48 Staging: sm750fb: fix hw_imageblit parameters
Fix up hw_imageblit() so that the function paramaters match up with what
the driver expects them to be when using it as a function pointer.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 22:03:01 +01:00
Greg Kroah-Hartman bf2fbc2a12 Staging: sm750fb: fix build warning with lynx_accel
Change the return value of lynx_accel to be void, to fix the build
warning, and due to the fact that the function can't seem to fail at
all, and no one cares if it does or not.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
2015-03-10 21:29:38 +01:00
Greg Kroah-Hartman 3009de6048 Staging: sm750fb: fix build warning with proc_panDisplay
Change the options to the proc_panDisplay function pointer to match the
function pointer that we want to assign to it, in order to remove the
build warning.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
2015-03-10 21:22:20 +01:00
Lorenzo Stoakes f8b0dced35 staging: sm750fb: Cleanup the type of mmio750
This patch assigns the more appropriate void* type to the mmio750 variable
eliminating an unnecessary volatile qualifier in the process. Additionally it
updates parameter types as necessary where those parameters interact with
mmio750, removes unnecessary casts and updates the type of the
lynx_share->pvReg field which is passed to the ddk750_set_mmio method.

As a consequence, this patch fixes the following sparse warning:-

drivers/staging/sm750fb/ddk750_help.c:12:17: warning: incorrect type in assignment (different address spaces)

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 21:13:55 +01:00
Madhusudhanan Ravindran a99e334da1 staging: sm750fb: Use kzalloc rather than kmalloc followed by memset with 0
The semantic patch that makes this change is available
in scriptcoccinelle/api/alloc/kzalloc-simple.cocci.

Signed-off-by: Madhusudhanan Ravindran <mravindran04@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 21:13:55 +01:00
Sudip Mukherjee 0fa96e3927 staging: sm750fb: correct integer comparison
fixed the build warning about comparison of pointer and integer.
end of string was being compared to NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 21:12:19 +01:00
Sudip Mukherjee 06a1bf8136 staging: sm750fb: fix mixed declarations
we were getting build warning about mixed declaration. the variable
is now declared at the beginning of the block.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 21:11:47 +01:00
Sudip Mukherjee 54a1a05fe2 staging: sm750fb: correct function return
hw_cursor_setData2() is a function with void return type but it was
returning an integer.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 21:11:06 +01:00
Sudip Mukherjee 041d3a42e7 staging: sm750fb: remove unused variables
removed some variables which were only declared but were never used.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 21:08:06 +01:00
Sudip Mukherjee 4933b29bd4 staging: sm750fb: remove unused functions
removed the functions which were not used anywhere.
it has been build tested also confirmed with git grep that there is
no other reference of these functions.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 21:08:06 +01:00
Sudip Mukherjee 5c7784b9d6 staging: sm750fb: fix build failure
for powerpc-allyesconfig build failed with an error of g_option
undeclared. we will get this error on all architecture if MODULE is
not defined. fixed the declaration of g_option.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 16:02:35 +01:00
Sudip Mukherjee 848f2fce7b staging: sm750fb: fix undeclared function
kbuild test robot reported that for microblaze-allyesconfig
chan_to_field() and lynxfb_ops_set_par() were not defined. These two
functions were defined under CONFIG_PM, so for any archtecture if
CONFIG_PM is not defined we will have this error.

while moving the lynxfb_suspend() function some very obvious
checkpatch errors, like space after comma, space after if, space
before opening brace, were taken care of.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 16:02:35 +01:00
Sudip Mukherjee 62fa8e1014 staging: sm750fb: correctly define SM750LE_REVISION_ID
check if it is already defined before defining SM750LE_REVISION_ID
again and at the same time mention correct data type.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 16:02:35 +01:00
Sudip Mukherjee c97df7c2c0 staging: sm750fb: remove pragma optimize
remove use of #pragma optimize which will usually be ignored by the
compiler.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 16:02:35 +01:00
Sudip Mukherjee e936351a61 staging: sm750fb: wrong type for print
mention correct format specifier while printing.
fixes all the build warnings about incorrect argument type while
printing.
since this is a framebuffer device and it should follow what the
framebuffer layer is suggesting in struct fb_fix_screeninfo at
smem_start and mmio_start, so accordingly changed the datatypes of
vidmem_start, vidreg_start, vidmem_size and vidreg_size.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10 13:56:23 +01:00
Sudip Mukherjee 81dee67e21 staging: sm750fb: add sm750 to staging
sm750 of Silicon Motion is pci-e display controller device and has
features like dual display and 2D acceleration. This patch adds the
driver to staging.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:37:31 -08:00