Commit graph

357 commits

Author SHA1 Message Date
Mike Rapoport 52e933278a staging: sm750fb: fix wrong indentation
Fix wrong indentation of a line in lynxfb_set_fbinfo

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 083c2048f5 staging: sm750fb: use sm750_dev with pci_{get, set}_drvdata
Use sm750_dev as private driver data for the PCI device

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 4fd92f51da staging: sm750fb: use 'struct sm750_dev *' instead of 'void *'
Use proper 'struct sm750_dev *' type instead of 'void *'

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 700591a9ad staging: sm750fb: replace lynx_share with sm750_dev in function calls
Use sm750_dev rather than lynx_share as parameter for hw_sm750_map,
hw_sm750_inithw and hw_sm750_initAccel functions.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 142de763c0 staging: sm750fb: remove hw_sm750_getVMSize function
The hw_sm750_getVMSize wraps ddk750_getVMSize without any added
functionality. Call ddk750_getVMSize directly and remove
hw_sm750_getVMSize.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport f11fa2a972 staging: sm750fb: replace lynx_share with sm750_dev in lynxfb_par
Use sm750_dev instead of lynx_share in the private data of the
frambuffer device.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport c96341916d staging: sm750fb: remove unused PROC_SPEC_* typedefs
The PROC_SPEC* typedefs are not used and can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 1757d106a9 staging: sm750fb: merge struct sm750_state into struct sm750_dev
The struct sm750_state is never used on its own. Merge it into the
struct sm750_dev.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 5ef2f68857 staging: sm750fb: rename 'struct sm750_dev' variables to sm750_dev
Use consistent naming for 'struct sm750_dev' variables

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport bc3d48f33e staging: sm750fb: rename struct sm750_share to sm750_dev
The struct sm750_share represents the device state and name sm750_dev
seems more appropriate.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 05407e153f staging: sm750fb: merge sm750_hw.h into sm750.h
There is no actual need to split type definitions and global function
declarations between lots of small headers.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 492bcecfd8 staging: sm750fb: remove unused smi_indent variable
The smi_indent variable is only declared, but never used. Remove it.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport e3a3f9f512 staging: sm750fb: replace PADDING macro with ALIGN
The custom macro PADDING differs from standard kernel ALIGN only in
parameters order. Replace PADDING with ALIGN and remove it's definition.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 6732071c25 staging: sm750fb: remove unused SPC_SM750 define
The SPC_SM750 define is not used and can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport fb7f40559e staging: sm750fb: replace lynx_cursor methods with function calls
The methods in lynx_cursor always use the same implementation and there is
no point to use redirection rather than direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 9821ed0479 staging: sm750fb: use direct call to hw_sm750_output_setMode
The proc_setMode method in lynx_output always uses the same
implementation and there is no point to use redirection rather than
direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport c202beee7f staging: sm750fb: replace lynx_crtc methods with function calls
The methods in lynx_crtc always use the same implementation and there is
no point to use redirection rather than direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport 9b2941e27e staging: sm750fb: remove unused methods from lynx_share
The suspend and resume methods in lynx_share are not implemented and
never set. Remove them.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport 4edd3f3af2 staging: sm750fb: remove ancient kernel support
Remove the code that should be compiled for ancient kernel versions
together with controlling '#if LINUX_VERSION_CODE' conditionals

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport b108da7586 staging: sm750fb: remove defintion of offsetof
There is no need to redefine offsetof

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport 7a81b9477a staging: sm750fb: remove unused pllcalparam typedef
The pllcalparam type is not used and can be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:03:28 -07:00
Mike Rapoport a61dc139ce staging: sm750fb: simplify PLL divisors calculations
The calcPllValues currently uses arrays of PLL parametres that contain
possible PLL control register field values and redundant data that is
calculated according to those values. The usage of these arrays can be
replaced with simple arithmetics.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:03:28 -07:00
Mike Rapoport cfac7d6a70 staging: sm750fb: remove '#if 1' conditionals
The code enclosed in '#if 1' anyway gets compiled. Removing useless
conditionals.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Amitoj Kaur Chawla f741554e25 staging: sm750fb: Replace uint32_t with u32
Replace uint32_t with u32 consistent with Linux kernel coding
practice.
Problem found using checkpatch.pl

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Amitoj Kaur Chawla 347cf6d109 staging: sm750fb: Replace include <asm/*.h> with include <linux/*.h>
Problem found using checkpatch.pl
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Amitoj Kaur Chawla a5eabae947 staging: sm750fb: Prefer using BIT Macro
Replace bit shifting on 1 with the BIT(x) Macro
Problem found using checkpatch.pl
WARNING: 'Prefer using the BIT macro'

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17 09:03:16 -07:00
Shivani Bhardwaj f955a398f2 Staging: sm750fb: sm750: Remove irrelevant code
The variable ret is only declared and initialized to 0, but never
referenced, so remove it.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:05:40 -07:00
Mike Rapoport b02f9240e0 staging: sm750fb: remove some unnecessary castings
The clock divisor calculations in setMasterClock and setMemoryClock
unnecessaryly cast unsigned int to unsigned int. Removing the casting.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:05:40 -07:00
Mike Rapoport 7092d76f14 staging: sm750fb: rename getChipClock to get_mxclk_freq
The getChipClock is used to detect MXCLK frequency. Make it's name
reflect what the function is actually doing.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:05:40 -07:00
Mike Rapoport 7751e0e2d2 staging: sm750fb: merge calcPLL and getPllValue into getChipClock
The getChipClock function is used only to get MXCLK frequency, which
makes most of getPllValue function unused and thus. The detection of
MXCLK frequency may be implemented directly in getChipClock rendering
getPllValue and calcPLL unused.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:05:40 -07:00
Binbin Zhou 31557ea033 staging: sm750fb: Fix the power state error in resume
The PM_EVENT_RESUME state is needed when SM750 resume, otherwise it
will be failed in the second time of continuous suspend/resume.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Reviewed-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla aeec43da3e staging: sm750fb: Add space around '&'
Add space around operator '&'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '&' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla e80ef45dad staging: sm750fb: Add space around '<<'
Add space around operator '<<'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '<<' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla aa355c8645 staging: sm750fb: Remove multiple blank lines
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla edb23022f2 staging: sm750fb: Rename dispState
Rename dispState to disp_state to avoid CamelCase. Problem found using
checkpatch.pl
CHECK: Avoid CamelCase: <dispState>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla 0221381c46 staging: sm750fb: Remove multiple blank lines
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla 43ce0b538a staging: sm750fb: Rename miniDiff
Rename miniDiff to mini_diff to avoid CamelCase. Problem found using
checkpatch.pl
CHECK: Avoid CamelCase: <miniDiff>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla a76f23d66d staging: sm750fb: Remove space after opening brace
Remove space after opening brace '{'. Problem found using
checkpatch.pl
CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:32:07 -07:00
Amitoj Kaur Chawla 2a66a986b4 staging: sm750fb: Remove space before closing brace
Remove space before closing brace '}'. Problem found using
checkpatch.pl
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:32:07 -07:00
Amitoj Kaur Chawla a0fd4b57ba staging: sm750fb: Remove space after cast
Remove unnecessary space after cast. Problem found using checkpatch.pl
CHECK: No space is necessary after a cast

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:32:07 -07:00
Shraddha Barke 80fb74c387 Staging: sm750fb: Use ARRAY_SIZE macro
ARRAY_SIZE is more concise to use when the size of an array is divided
by the size of its first element.

Changes made using Coccinelle-

@@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:32:07 -07:00
Amitoj Kaur Chawla 0ce5fdb14b staging: sm750fb: Remove multiple blank lines
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:50:08 +01:00
Amitoj Kaur Chawla 07387cba81 staging: sm750fb: Add space around ':'
Add space around operator ':'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that ':' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla 31418e3701 staging: sm750fb: Add space around '?'
Add space around operator '?'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '?' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla f40917ea0b staging: sm750fb: Add space around '*'
Add space around operator '*'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '*' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla c18c331193 staging: sm750fb: Add space around '/'
Add space around operator '/'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '/' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Mike Rapoport 4dc4d22555 staging: sm750fb: remove clear method from lynxfb_{crtc,output}
The clear methods of lynxfb_crtc and lynxfb_output are empty 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-10-02 11:50:52 +02:00
Mike Rapoport efca4885b2 staging: sm750fb: remove proc_checkMode method from lynxfb_output
The proc_checkMode of lynxfb_output is set to function that always
returns 0. Calling that function and checking for its return value is
meaningless.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:50:52 +02:00
Mike Rapoport 104f456ce1 staging: sm750fb: remove unneeded switch statement
The lynxfb_ops_check_var function has two switch statements, the first
one checks for validity of var->bits_per_pixel and it is is immediatly
followed by another one that sets parameters according to
var->bits_per_pixel value. These switch statements can be merged into
one.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:50:52 +02:00
Mike Rapoport 4221c59587 staging: sm750fb: remove unused enable{ZVPort,SSP,PWM} functions
The functions that enable/disable power for some sub-devices 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 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