platform/kernel/linux-starfive.git
5 years agostaging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
Spencer E. Olson [Wed, 19 Sep 2018 16:51:04 +0000 (10:51 -0600)]
staging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
instruction.  This patch also adds data for digital subdevices that are
streaming capable (within the ni_mio_* family).  Mostly, only the m-series
devices are capable of digital streaming.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: add facility to directly query subdevice timing constraints
Spencer E. Olson [Wed, 19 Sep 2018 16:51:03 +0000 (10:51 -0600)]
staging: comedi: add facility to directly query subdevice timing constraints

Adds facility to directly query the hardware speed limits of subdevices,
in particular for scan_begin and convert signals.  This information can be
critical for integrating comedi with other hardware modules, and also
comedi modules together with software where software requires specific
timing capabilities in order to properly coordinate multiple devices.

Currently, comedi_command_test almost satisfies this need, but really only
for when *_src == TRIG_TIMER.  For *_src == TRIG_EXT, comedi_command_test
does not help at all.  For many subdevices, one might simply use
*_src==TRIG_TIMER in command_test in order to determine these limits.  For
other subdevices, this tactic does not work since *_src == TRIG_TIMER might
not be valid.  There is also the possibility that the timing limits are
different between the TRIG_TIMER and TRIG_EXT modes.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Correct comparison with NULL - Style
John Whitmore [Sun, 7 Oct 2018 21:40:25 +0000 (22:40 +0100)]
staging:rtl8192u: Correct comparison with NULL - Style

Correct code to remote comparison with NULL, this clears the resulting
checkpatch issue.

This is a coding style change which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Correct code alignment - Style
John Whitmore [Sun, 7 Oct 2018 21:40:24 +0000 (22:40 +0100)]
staging:rtl8192u: Correct code alignment - Style

Correct the alignment of a function, this clears checkpatch issue.

This is a simple coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove unnecessary line continuation - Style
John Whitmore [Sun, 7 Oct 2018 21:40:23 +0000 (22:40 +0100)]
staging:rtl8192u: Remove unnecessary line continuation - Style

Remove the unnecessary line continuation character to clear checkpatch
issue.

This is a simple coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Add missing blank lines - Style
John Whitmore [Sun, 7 Oct 2018 21:40:22 +0000 (22:40 +0100)]
staging:rtl8192u: Add missing blank lines - Style

Add missing blank lines after declarations. This clears the resulting
checkpatch issue.

This is a simple coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Correct code indentation - Style
John Whitmore [Sun, 7 Oct 2018 21:40:21 +0000 (22:40 +0100)]
staging:rtl8192u: Correct code indentation - Style

Rewrite code block to correct the indentation of code. This clears the
resulting checkpatch issue.

This is a coding style change which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Add spaces around + operator - Style
John Whitmore [Sun, 7 Oct 2018 21:40:19 +0000 (22:40 +0100)]
staging:rtl8192u: Add spaces around + operator - Style

Add spaces around '+' operator to clear the checkpatch issue.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Remove extra blank lines - Style
John Whitmore [Sun, 7 Oct 2018 21:40:18 +0000 (22:40 +0100)]
staging:rtl8192u: Remove extra blank lines - Style

Remove the extra blank lines to clear checkpatch issue.

This is a simple coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Clear error with line ending ( - Style
John Whitmore [Sun, 7 Oct 2018 21:40:17 +0000 (22:40 +0100)]
staging:rtl8192u: Clear error with line ending ( - Style

Rewrite function call to clear the checkpatch issue with lines ending
with a '(' character.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Removed commented out include - Style
John Whitmore [Sun, 7 Oct 2018 21:40:16 +0000 (22:40 +0100)]
staging:rtl8192u: Removed commented out include - Style

Remove commented out #include directive.

Additionally shorted a block comment to clear the checkpatch issue
with line length.

These are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging:rtl8192u: Add missing SPDX-License-Identifier - Style
John Whitmore [Sun, 7 Oct 2018 21:40:15 +0000 (22:40 +0100)]
staging:rtl8192u: Add missing SPDX-License-Identifier - Style

Add the missing SPDX-License-Identifier tag to file to clear the
checkpatch issue.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Drop no longer needed headers
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:47 +0000 (12:37 +0300)]
staging: vc04_services: Drop no longer needed headers

Previously, connection.h was only required for the definition of
VCHI_CONNECTION_T, but now all usages of it are gone. Remove this unused
header.

After connection.h is gone, message.h and vchi_cfg_internal.h are no
longer referenced by anything either. Drop them as well.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Drop unused parameters from vchi_connect()
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:46 +0000 (12:37 +0300)]
staging: vc04_services: Drop unused parameters from vchi_connect()

Remove two parameters which are never used and all where all callers
just pass in dummy values anyway.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Drop VCHI_SERVICE_INIT and SERVICE_INFO_T
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:45 +0000 (12:37 +0300)]
staging: vc04_services: Drop VCHI_SERVICE_INIT and SERVICE_INFO_T

These types are not used anywhere, remove them.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Drop declaration of vchi_crc_control()
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:44 +0000 (12:37 +0300)]
staging: vc04_services: Drop declaration of vchi_crc_control()

There is no definition for this unused function, so drop its prototype.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Drop trivially unused fields from SERVICE_CREATION_T
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:43 +0000 (12:37 +0300)]
staging: vc04_services: Drop trivially unused fields from SERVICE_CREATION_T

These fields are only initialized with constants and never read. Drop
them.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Drop 'connection' field from SERVICE_CREATION_T
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:42 +0000 (12:37 +0300)]
staging: vc04_services: Drop 'connection' field from SERVICE_CREATION_T

The connection field of SERVICE_CREATION_T is assigned to but its value
is never read. Drop the field and the resulting no longer needed code
from bcm2835-audio and bcm2835-camera.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: Drop pointless stub functions
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:41 +0000 (12:37 +0300)]
staging: vc04_services: Drop pointless stub functions

These functions do nothing besides returning NULL and are unused.
Just drop them.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: ni_mio_common: protect register write overflow
Spencer E. Olson [Wed, 3 Oct 2018 20:54:16 +0000 (14:54 -0600)]
staging: comedi: ni_mio_common: protect register write overflow

Fixes two problems introduced as early as
commit 03aef4b6dc12  ("Staging: comedi: add ni_mio_common code"):
(1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is
    not unduly overwritten on e-series devices.  On e-series devices, the
    first three of the last four bits are reserved.  The last bit defines
    the output selection of the RGOUT0 pin, otherwise known as
    RTSI_Sub_Selection.  For m-series devices, these last four bits are
    indeed used as the output selection of the RTSI7 pin (and the
    RTSI_Sub_Selection bit for the RGOUT0 pin is moved to the
    RTSI_Trig_Direction register.
(2) Allows all 4 RTSI_BRD lines to be treated as valid sources for RTSI
    lines.

This patch also cleans up the ni_get_rtsi_routing command for readability.

Fixes: 03aef4b6dc12  ("Staging: comedi: add ni_mio_common code")
Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: add spaces around operators in odm_rtl8188e.c
Michael Straube [Sat, 6 Oct 2018 13:02:31 +0000 (15:02 +0200)]
staging: rtl8188eu: add spaces around operators in odm_rtl8188e.c

Add spaces around '|', '>>' and '/' to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove dead code from dm_fast_training_init()
Michael Straube [Sat, 6 Oct 2018 13:02:30 +0000 (15:02 +0200)]
staging: rtl8188eu: remove dead code from dm_fast_training_init()

The variable AntCombination is initialized to 2 and never changed.
So the else if path is never used. Remove the dead code and the
variable AntCombination.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove whitespace in rtw_mlme_ext.h
Michael Straube [Thu, 4 Oct 2018 17:57:00 +0000 (19:57 +0200)]
staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h

Remove spaces and/or replace tabs with spaces in some declarations
in rtw_mlme_ext.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: make struct field of action_handler const
Michael Straube [Thu, 4 Oct 2018 17:56:59 +0000 (19:56 +0200)]
staging: rtl8188eu: make struct field of action_handler const

The strings in the use of struct action_handler are constant.
Change the type of field str from 'char *' to 'const char *'.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: make struct field of mlme_handler const
Michael Straube [Thu, 4 Oct 2018 17:56:58 +0000 (19:56 +0200)]
staging: rtl8188eu: make struct field of mlme_handler const

The strings in the uses of struct mlme_handler are constant.
Change the type of field str from 'char *' to 'const char *'.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: change array type to const u8
Michael Straube [Thu, 4 Oct 2018 17:56:57 +0000 (19:56 +0200)]
staging: rtl8188eu: change array type to const u8

Change the type of MCS_rate_1R from unsigned char to const u8.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rewrite if tests - style
Michael Straube [Wed, 3 Oct 2018 20:43:59 +0000 (22:43 +0200)]
staging: rtl8188eu: rewrite if tests - style

Rewrite if tests to clear a 'line over 80 characters' and
'Comparisons should place the constant on the right side of the test'
checkpatch warning.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup array declaration - style
Michael Straube [Wed, 3 Oct 2018 20:43:58 +0000 (22:43 +0200)]
staging: rtl8188eu: cleanup array declaration - style

Cleanup array declaration to clear two 'line over 80 characters'
checkpatch warnings and improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: fix line over 80 characters - style
Michael Straube [Wed, 3 Oct 2018 20:43:57 +0000 (22:43 +0200)]
staging: rtl8188eu: fix line over 80 characters - style

Line break array declaration to clear a 'line over 80 characters'
checkpatch warning. For consistency replace 0x0 with 0x00.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Add blank line after declaration
Jaakko Tyynismaa [Tue, 9 Oct 2018 05:06:48 +0000 (05:06 +0000)]
staging: mt7621-mmc: Add blank line after declaration

Add blank line after declaration.
Reported by checkpatch.

Signed-off-by: Jaakko Tyynismaa <jaakko.tyynismaa@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: emxx_udc: Remove unused device_desc declaration
Nathan Chancellor [Thu, 4 Oct 2018 05:56:00 +0000 (22:56 -0700)]
staging: emxx_udc: Remove unused device_desc declaration

Clang warns:

drivers/staging/emxx_udc/emxx_udc.c:1373:37: warning: variable
'device_desc' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static struct usb_device_descriptor device_desc = {
                                    ^
1 warning generated.

This definition hasn't been attached to anything since the driver was
introduced in commit 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile
USB Gadget driver") and neither GCC nor Clang emit any reference to the
variable in the final assembly. The only reason GCC doesn't warn about
this variable being unused is the sizeof function.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove unnecessary parentheses and dead commented code
Nathan Chancellor [Thu, 4 Oct 2018 01:32:51 +0000 (18:32 -0700)]
staging: rtl8723bs: Remove unnecessary parentheses and dead commented code

Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3351:20: warning:
equality comparison with extraneous parentheses [-Wparentheses-equality]

The commented code is pointless since _HW_STATE_AP_ is handled right
below this block.

Link: https://github.com/ClangBuiltLinux/linux/issues/168
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Remove #if 0 blocks in dbg.h
Nishad Kamdar [Thu, 4 Oct 2018 16:37:26 +0000 (22:07 +0530)]
staging: mt7621-mmc: Remove #if 0 blocks in dbg.h

This patch removes #if 0 code blocks and usages of
functions defined in the #if 0 blocks in dbg.h.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Remove #if 0 blocks in dbg.c
Nishad Kamdar [Thu, 4 Oct 2018 16:36:36 +0000 (22:06 +0530)]
staging: mt7621-mmc: Remove #if 0 blocks in dbg.c

This patch removes #if 0 code blocks and usages of
functions defined in the #if 0 blocks in dbg.c

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Remove #if 0 blocks in sd.c
Nishad Kamdar [Thu, 4 Oct 2018 16:35:38 +0000 (22:05 +0530)]
staging: mt7621-mmc: Remove #if 0 blocks in sd.c

This patch removes #if 0 code blocks and usages of
functions defined in the #if 0 blocks in sd.c.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: Remove unnecessary parentheses
Nathan Chancellor [Thu, 4 Oct 2018 01:21:25 +0000 (18:21 -0700)]
staging: rtlwifi: Remove unnecessary parentheses

Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: warning:
equality comparison with extraneous parentheses [-Wparentheses-equality]
                } else if ((is_enable_la_mode == 1)) {
                            ~~~~~~~~~~~~~~~~~~^~~~
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: remove
extraneous parentheses around the comparison to silence this warning
                } else if ((is_enable_la_mode == 1)) {
                           ~                  ^   ~
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: use '='
to turn this equality comparison into an assignment
                } else if ((is_enable_la_mode == 1)) {
                                              ^~
                                              =
1 warning generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/172
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: axis-fifo: remove duplicated include from axis-fifo.c
YueHaibing [Fri, 5 Oct 2018 11:23:54 +0000 (11:23 +0000)]
staging: axis-fifo: remove duplicated include from axis-fifo.c

Remove duplicated include.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: media: davinci_vpfe: Use __func__ instead of function name
Mamta Shukla [Sat, 6 Oct 2018 22:28:19 +0000 (03:58 +0530)]
staging: media: davinci_vpfe: Use __func__ instead of function name

Access current function name using __func__.
Use %s and __func__ instead of function name.
Use of predefined identifier __func__ prevents typo error in function
name in print calls.

Issue found with checkpatch.pl

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6655: Remove space after cast
Mamta Shukla [Sat, 6 Oct 2018 11:31:35 +0000 (17:01 +0530)]
staging: vt6655: Remove space after cast

Remove space after cast to fix checkpatch issue.
CHECK: No space is necessary after a cast

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6655: Add spaces around operators
Mamta Shukla [Sat, 6 Oct 2018 11:30:00 +0000 (17:00 +0530)]
staging: vt6655: Add spaces around operators

Add spaces around '*' and '-' to fix checkpatch issue.

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6655: Add blank line after function/struct/union/enum declarations
Mamta Shukla [Sat, 6 Oct 2018 11:26:36 +0000 (16:56 +0530)]
staging: vt6655: Add blank line after function/struct/union/enum declarations

Add blank line after function/struct/union/enum declarations to fix
checkpatch issue.
CHECK: Please use a blank line after function/struct/union/enum
declarations

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-pci: Prefer using the BIT macro
Mamta Shukla [Fri, 5 Oct 2018 07:32:06 +0000 (13:02 +0530)]
staging: mt7621-pci: Prefer using the BIT macro

Replace all occurrences of (1<<x) with BIT(x).

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-pci: Add spaces around '<<'
Mamta Shukla [Fri, 5 Oct 2018 07:28:08 +0000 (12:58 +0530)]
staging: mt7621-pci: Add spaces around '<<'

Add spaces around '<<' to fix checkpatch issue.
CHECK: spaces preferred around that '<<' (ctx:VxV)

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-pci: Add spaces around '|'
Mamta Shukla [Fri, 5 Oct 2018 07:23:34 +0000 (12:53 +0530)]
staging: mt7621-pci: Add spaces around '|'

Add spaces around '|' to fix checkpatch issue
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-pci: Add spaces around '&'
Mamta Shukla [Fri, 5 Oct 2018 07:21:41 +0000 (12:51 +0530)]
staging: mt7621-pci: Add spaces around '&'

Add spaces around '&' to fix checkpatch issue.
CHECK: spaces preferred around that '&' (ctx:VxV)

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-pci: Do not initialise statics to 0
Mamta Shukla [Fri, 5 Oct 2018 07:19:38 +0000 (12:49 +0530)]
staging: mt7621-pci: Do not initialise statics to 0

Remove initialisation for static global variable to fix checkpatch issue.
ERROR: do not initialise statics to 0

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove true and false comparison
Mamta Shukla [Mon, 8 Oct 2018 19:00:10 +0000 (00:30 +0530)]
staging: rtl8723bs: core: Remove true and false comparison

Remove comparison to true and false in if statement.
Issue found with checkpatch.pl.
CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: sm750fb: Remove space after cast
Mamta Shukla [Fri, 5 Oct 2018 13:58:20 +0000 (19:28 +0530)]
staging: sm750fb: Remove space after cast

Remove space after cast to fix checkpatch issue.
CHECK: No space is necessary after a cast

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: clocking-wizard: match parenthesis indentation
Ioannis Valasakis [Thu, 4 Oct 2018 12:41:01 +0000 (13:41 +0100)]
staging: clocking-wizard: match parenthesis indentation

Match parenthesis indentation after line end, and fixed alignment
to conform to the coding style guidelines.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: axis-fifo: Remove parentheses in axis-fifo.c
Ioannis Valasakis [Thu, 4 Oct 2018 10:13:21 +0000 (11:13 +0100)]
staging: axis-fifo: Remove parentheses in axis-fifo.c

staging: axis-fifo: remove parentheses in axis-fifo.c

Remove parentheses from the end of line and conform to
the coding style guidelines. Reported by checkpatch.

Add an extra space to the function arguments to fix
indentation.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: add SPDX identifiers
Michael Straube [Wed, 3 Oct 2018 14:17:16 +0000 (16:17 +0200)]
staging: rtl8712: add SPDX identifiers

This satisfies a checkpatch warning and is the preferred
method for notating the license.

The SPDX identifier is a legally binding shorthand, which
can be used instead of the full boiler plate text.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fbtft: Prefer using the BIT macro
Mamta Shukla [Wed, 3 Oct 2018 14:40:15 +0000 (20:10 +0530)]
staging: fbtft: Prefer using the BIT macro

Replacing all occurrences of (1<<x) with BIT(x) to fix checkpatch issue.
CHECK:Prefer using the BIT macro

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: fix spelling mistake in comment
Michael Straube [Sun, 30 Sep 2018 19:53:10 +0000 (21:53 +0200)]
staging: rtl8188eu: fix spelling mistake in comment

Fix a spelling mistake reported by checkpatch.
Caculate -> Calculate

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove braces from single if statement
Michael Straube [Sun, 30 Sep 2018 19:53:09 +0000 (21:53 +0200)]
staging: rtl8188eu: remove braces from single if statement

Remove braces from single line if statement.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c
Michael Straube [Sun, 30 Sep 2018 19:53:08 +0000 (21:53 +0200)]
staging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c

Remove unnecessary parentheses in odm_rtl8188e.c.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: add spaces around '+' in fw.c
Michael Straube [Sun, 30 Sep 2018 19:53:07 +0000 (21:53 +0200)]
staging: rtl8188eu: add spaces around '+' in fw.c

Add spaces around '+' in fw.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: simplify block comment in pwrseq.c
Michael Straube [Sun, 30 Sep 2018 19:53:06 +0000 (21:53 +0200)]
staging: rtl8188eu: simplify block comment in pwrseq.c

Simplify block comment to a single line to clear a checkpatch warning.
WARNING: Block comments use * on subsequent lines

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: correct block comment in bb_cfg.c
Michael Straube [Sun, 30 Sep 2018 19:53:05 +0000 (21:53 +0200)]
staging: rtl8188eu: correct block comment in bb_cfg.c

Correct block comment to clear a checkpatch warning.
WARNING: Block comments should align the * on each line

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:04 +0000 (21:53 +0200)]
staging: rtl8188eu: rename odm_SignalScaleMapping()

Rename odm_SignalScaleMapping to avoid CamelCase.
odm_SignalScaleMapping -> odm_signal_scale_mapping

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename variable in odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:03 +0000 (21:53 +0200)]
staging: rtl8188eu: rename variable in odm_SignalScaleMapping()

Rename variable in odm_SignalScaleMapping() to avoid CamelCase.
RetSig -> retsig

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename parameter of odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:02 +0000 (21:53 +0200)]
staging: rtl8188eu: rename parameter of odm_SignalScaleMapping()

Rename parameter of odm_SignalScaleMapping() to avoid CamelCase.
CurrSig -> currsig

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_EVMdbToPercentage()
Michael Straube [Sun, 30 Sep 2018 19:53:01 +0000 (21:53 +0200)]
staging: rtl8188eu: rename odm_EVMdbToPercentage()

Rename odm_EVMdbToPercentage() to avoid CamelCase.
odm_EVMdbToPercentage -> odm_evm_db_to_percentage

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename parameter of odm_EVMdbToPercentage()
Michael Straube [Sun, 30 Sep 2018 19:53:00 +0000 (21:53 +0200)]
staging: rtl8188eu: rename parameter of odm_EVMdbToPercentage()

Rename parameter of odm_EVMdbToPercentage() to avoid CamelCase.
Value -> value

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_QueryRxPwrPercentage()
Michael Straube [Sun, 30 Sep 2018 19:52:59 +0000 (21:52 +0200)]
staging: rtl8188eu: rename odm_QueryRxPwrPercentage()

Rename odm_QueryRxPwrPercentage() to avoid CamelCase.
odm_QueryRxPwrPercentage -> odm_query_rxpwrpercentage

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage()
Michael Straube [Sun, 30 Sep 2018 19:52:58 +0000 (21:52 +0200)]
staging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage()

Rename parameter of odm_QueryRxPwrPercentage() to avoid CamelCase.
AntPower -> antpower

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:57 +0000 (21:52 +0200)]
staging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c

Replace tabs with spaces in odm_hwconfig.c where appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: add spaces around '*' in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:56 +0000 (21:52 +0200)]
staging: rtl8188eu: add spaces around '*' in odm_hwconfig.c

Add spaces around '*' in odm_hwconfig.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: add spaces around '+' in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:55 +0000 (21:52 +0200)]
staging: rtl8188eu: add spaces around '+' in odm_hwconfig.c

Add spaces around '+' in odm_hwconfig.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove wrapper odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:52:54 +0000 (21:52 +0200)]
staging: rtl8188eu: remove wrapper odm_SignalScaleMapping()

The function odm_SignalScaleMapping() is just a wrapper for
odm_SignalScaleMapping_92CSeries().

Rename odm_SignalScaleMapping_92CSeries() to odm_SignalScaleMapping()
and remove the wrapper.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_HWConfig
Michael Straube [Sun, 30 Sep 2018 19:52:53 +0000 (21:52 +0200)]
staging: rtl8188eu: rename odm_HWConfig

Rename source and header file to avoid CamelCase.
odm_HWConfig.c -> odm_hwconfig.c
odm_HWConfig.h -> odm_hwconfig.h

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup inconsistent indenting
Michael Straube [Sun, 30 Sep 2018 19:52:52 +0000 (21:52 +0200)]
staging: rtl8188eu: cleanup inconsistent indenting

Cleanup all inconsistent indenting reported by smatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: ks7010: Remove unnecessary null check
Aymen Qader [Sun, 30 Sep 2018 08:34:21 +0000 (09:34 +0100)]
staging: ks7010: Remove unnecessary null check

Remove the unnecessary socket buffer null check in hostif_data_request.
There is already an appropriate null check in the calling function:

(ks_wlan_net.c) ks_wlan_start_xmit

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: sm750fb: Remove extra space character
Aymen Qader [Sat, 29 Sep 2018 17:38:07 +0000 (18:38 +0100)]
staging: sm750fb: Remove extra space character

Remove an extra space in ddk750_mode.c to fix indentation

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h
Rick Veens [Sun, 30 Sep 2018 18:29:19 +0000 (20:29 +0200)]
staging: rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h

The following:
 bool efuse_re_pg_sec1flag;
 u8 efuse_re_pg_data[8];
are not referenced anywhere in the rtlwifi code.

Signed-off-by: Rick Veens <rickveens92@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: axis-fifo: add error handling of class_create()
Alexey Khoroshilov [Fri, 28 Sep 2018 21:25:27 +0000 (00:25 +0300)]
staging: axis-fifo: add error handling of class_create()

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: usb: add release function for DCI device
Christian Gromm [Fri, 28 Sep 2018 21:37:19 +0000 (23:37 +0200)]
staging: most: usb: add release function for DCI device

This patch adds the missing release function for the DCI device that frees
the container structure it is embedded in.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoMAINTAINERS: removed staging/ft1000 driver
Deepa Dinamani [Sat, 29 Sep 2018 01:41:40 +0000 (18:41 -0700)]
MAINTAINERS: removed staging/ft1000 driver

Delete the ft1000 MAINTAINERS entry, concluding the
earlier removal of the driver in commit 6512edec48b2
("staging: ft1000: remove obsolete driver").

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: Return -ENOMEM instead of -1
Aymen Qader [Sat, 29 Sep 2018 17:24:29 +0000 (18:24 +0100)]
staging: rtlwifi: Return -ENOMEM instead of -1

Use the ENOMEM constant instead of -1 for kzalloc failure checks in
rtl_halmac.c

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Remove unused single statement macros
Nishad Kamdar [Mon, 1 Oct 2018 14:48:31 +0000 (20:18 +0530)]
staging: mt7621-mmc: Remove unused single statement macros

This patch removes unused single statement macros in sd.c

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Remove single statement macro msdc_irq_restore()
Nishad Kamdar [Mon, 1 Oct 2018 14:46:05 +0000 (20:16 +0530)]
staging: mt7621-mmc: Remove single statement macro msdc_irq_restore()

This patch removes the macro msdc_irq_restore() and replaces its
usage with call to the function called in the macro definition.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: dgnc: delete the driver
Greg Kroah-Hartman [Tue, 2 Oct 2018 22:14:14 +0000 (15:14 -0700)]
staging: dgnc: delete the driver

Digi does not support it, no one has hardware for it, and no one is
working on it, so let's drop it for now.  If anyone wants to pick it
back up, then can revert this patch.

Reported-by: Lidza Louina <lidza.louina@gmail.com>
Reported-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: dgnc: Fix Kconfig help header and text
Sehro Rautenkranz [Tue, 25 Sep 2018 23:41:59 +0000 (17:41 -0600)]
staging: dgnc: Fix Kconfig help header and text

Replace Kconfig help header and text to match other modules. Issue found
by checkpatch.

Spacing adjusted to match Documentation/process/coding-style.rst. Issue
reported by rdunlap@infradead.org.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sehro Rautenkranz <sehro@sehro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: clean up clang warning on extraneous parentheses
Colin Ian King [Sun, 30 Sep 2018 23:10:51 +0000 (00:10 +0100)]
staging: rtl8723bs: clean up clang warning on extraneous parentheses

There are extraneous parantheses that are causing clang to produce a
warning so remove these.

Clean up 3 clang warnings:
equality comparison with extraneous parentheses [-Wparentheses-equality]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Remove unnecessary parentheses
Dafna Hirschfeld [Sat, 29 Sep 2018 15:55:08 +0000 (18:55 +0300)]
staging: rtl8712: Remove unnecessary parentheses

Remove unnecessary parentheses between 'address-of' operators
and struct members.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Mark ACPI table declaration as used
Nathan Chancellor [Wed, 26 Sep 2018 23:20:55 +0000 (16:20 -0700)]
staging: rtl8723bs: Mark ACPI table declaration as used

Clang emits the following warning:

drivers/staging/rtl8723bs/os_dep/sdio_intf.c:25:36: warning: variable
'acpi_ids' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static const struct acpi_device_id acpi_ids[] = {
                                   ^
1 warning generated.

Mark acpi_ids with the attribute __used, which makes it clear to Clang
that we don't want this warning while not inhibiting Clang's dead code
elimination from removing the unreferenced internal symbol when moving
the data to the globally available symbol with MODULE_DEVICE_TABLE.

$ nm -S drivers/staging/rtl8723bs/os_dep/sdio_intf.o | grep acpi
0000000000000000 0000000000000040 R __mod_acpi__acpi_ids_device_table

Link: https://github.com/ClangBuiltLinux/linux/issues/169
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: replace `printk` with preferred API
Dafna Hirschfeld [Sun, 30 Sep 2018 19:04:04 +0000 (22:04 +0300)]
staging: mt7621-mmc: replace `printk` with preferred API

Replace calls to `printk` with `dev_info` and `pr_err`
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Fix comparison to NULL
Dafna Hirschfeld [Sun, 30 Sep 2018 19:04:03 +0000 (22:04 +0300)]
staging: mt7621-mmc: Fix comparison to NULL

Replace comparisons of a variable 'x' to NULL with
either 'x' or '!x'.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: remove unnecessary braces from 'if' statements
Dafna Hirschfeld [Sun, 30 Sep 2018 19:04:02 +0000 (22:04 +0300)]
staging: mt7621-mmc: remove unnecessary braces from 'if' statements

Remove unnecessary braces from one line 'if' statements.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoMerge tag 'iio-for-4.20b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Tue, 2 Oct 2018 01:13:42 +0000 (18:13 -0700)]
Merge tag 'iio-for-4.20b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of IIO new device support features and cleanup for the 4.20 cycle.

One merge commit in here to bring in the SPI_CS_WORD flag patches
that are also going via the SPI tree.

There are a few more fixes than normal for a pull targetting the
next merge window.  These are all long term issues and as we are late
in the cycle, they can wait.

New device support
* ad7606
  - Add support fo the ad7605-4 driver.  This driver is still in staging
    but is heading in the right direction to graduate, motivated partly
    by the requirement for this device support.
* ST VL53L0X ToF ranging sensor
  - New minimal driver. Interrupt support to follow.

New features

* SPI_CS_WORD optimization allows long transfers with the chip select
  toggled every 16bits.   There is a software fallback as well to let
  drivers not care about whether the hardware supports it.

* bh1750
  - Device tree support and bindings.
* ti-ads7950
  - Use the SPI_CS_WORD optmization to save lots of cpu cycles (assuming
    the hardware supports it)

Fixes and cleanups

* ad5064
  - Fix some long incorrect regulator error handling that preventing
    enabling the internal regulator.
* ad7606
  - The ad7606 doesn't actually have a 2.5V range and the values provided
    for scale have always been wrong.  Fix them.
  - Drop some wrong kernel-doc (things that don't exist)
  - Add missing kernel-doc
* at91-adc
  - Fixing missing ack of dataready on sysfs channel reads to avoid spurious
    interrupts.
  - Fix a wrong channel numbers in triggered_buffer_mode
* hmc5843
  - Fix incorrect part number in a comment.
* imx25-gcq
  - Fix a device_node leak in an error path.
* meson-saradc
  - Drop an unused and pointless define.
  - Use of_device_get_match_data instead of opencoding
  - Tidy up how meson_sar_adc_param is accessed.
  - Rework prior to adding some temperature sensor support.

* tag 'iio-for-4.20b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
  iio: ad5064: Fix regulator handling
  iio: adc: meson-saradc: use the address attribute from iio_chan_spec
  iio: adc: meson-saradc: do not use meson_sar_adc_iio_channels directly
  iio: adc: at91: fix wrong channel number in triggered buffer mode
  iio: adc: at91: fix acking DRDY irq on simple conversions
  iio: adc: meson-saradc: simplify access to meson_sar_adc_param
  iio: adc: meson-saradc: use of_device_get_match_data
  iio: adc: meson-saradc: remove #define MESON_SAR_ADC_DELTA_10_TS_C_SHIFT
  iio: light: bh1750: Add device tree support
  dt-bindings: iio: light: bh1750: Add device tree binding documentation
  staging:iio:ad7606: Add support for the ad7605-4
  iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor.
  staging:iio:ad7606: update structs with doc annotations
  iio: magnetometer: hmc5843: Fixed a comment error.
  iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()
  iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage
  spi: add software implementation for SPI_CS_WORD
  spi: add new SPI_CS_WORD flag
  staging:iio:ad7606: Remove incorrect kernel doc annotations
  staging:iio:ad7606: fix voltage scales

5 years agostaging: vboxvideo: Use more drm_fb_helper functions
Hans de Goede [Sat, 29 Sep 2018 12:18:25 +0000 (14:18 +0200)]
staging: vboxvideo: Use more drm_fb_helper functions

Store fbhelper and afb struct directly in vbox_private and use
drm_fb_helper_fbdev_setup to replace vbox_fbdev_init, note we cannot use
drm_fb_helper_fbdev_teardown since we use a private framebuffer for the
fbdev.

And replace vbox_driver_lastclose with drm_fb_helper_lastclose.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Drop unnecessary drm_connector_helper_funcs callbacks
Hans de Goede [Sat, 29 Sep 2018 12:18:24 +0000 (14:18 +0200)]
staging: vboxvideo: Drop unnecessary drm_connector_helper_funcs callbacks

vbox_mode_valid always returns MODE_OK, which is also the default if no
mode_valid callback is defined.

vbox_best_single_encoder chains to drm_encoder_find, the drm-core will
call drm_encoder_find itself if there is no best_encoder call back.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Call drm_atomic_helper_check_plane_state from atomic_check
Hans de Goede [Sat, 29 Sep 2018 12:18:23 +0000 (14:18 +0200)]
staging: vboxvideo: Call drm_atomic_helper_check_plane_state from atomic_check

Extend our planes atomic_check callbacks to be more thorough by calling
the drm_atomic_helper_check_plane_state helper.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Replace crtc_helper enable/disable functions
Hans de Goede [Sat, 29 Sep 2018 12:18:22 +0000 (14:18 +0200)]
staging: vboxvideo: Replace crtc_helper enable/disable functions

Replace vbox_crtc_commit and vbox_crtc_disable with
vbox_crtc_atomic_[en|dis]able which are the preferred callbacks for
these for atomic drivers.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Fix DPMS support after atomic conversion
Hans de Goede [Sat, 29 Sep 2018 12:18:21 +0000 (14:18 +0200)]
staging: vboxvideo: Fix DPMS support after atomic conversion

Atomic modesetting does not use the traditional dpms call backs, instead
we should check crtc_state->active.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Restore page-flip support
Hans de Goede [Sat, 29 Sep 2018 12:18:20 +0000 (14:18 +0200)]
staging: vboxvideo: Restore page-flip support

Restore page-flip support now that the atomic conversion is complete.

Since the mode parameter to vbox_crtc_set_base_and_mode() now never
is NULL call drm_atomic_crtc_needs_modeset() to check if we need to
check for input-mapping changes, to avoid doing unnecesarry work on
a flip. And hookup the drm_atomic_helper_page_flip helper to implement
the page_flip callback.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Atomic phase 3: Switch last bits over to atomic
Hans de Goede [Sat, 29 Sep 2018 12:18:19 +0000 (14:18 +0200)]
staging: vboxvideo: Atomic phase 3: Switch last bits over to atomic

Now that the state objects are wired up, we can:

1) Move to the final atomic handlers
2) Wire up atomic set_config helper
3) Switch to drm_mode_config_helper_suspend/resume for suspend/resume
4) Enable atomic modesetting ioctl

This is all done in one commit because doing this piecemeal leads to
an intermediate state which triggers WARN_ONs in the atomic code because
e.g. plane->fb is still being set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Atomic phase 2: Stop using plane->fb and crtc->*
Hans de Goede [Sat, 29 Sep 2018 12:18:18 +0000 (14:18 +0200)]
staging: vboxvideo: Atomic phase 2: Stop using plane->fb and crtc->*

Once we are fully atomic plane->fb will always be NULL and we also
should not access things like crtc->enabled and crt->[hw]mode.

Now that we've wired up the state object handlers, we always have a
plane_state and crtc_state so change the code referencing plane->fb and
crtc->* to use the data from the plane_state and crt_state instead.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Atomic phase 2: Wire up state object handlers
Hans de Goede [Sat, 29 Sep 2018 12:18:17 +0000 (14:18 +0200)]
staging: vboxvideo: Atomic phase 2: Wire up state object handlers

Wire up state object handlers for the crtc-s and the planes, call
drm_mode_config_reset() after creating all the crtc-s and encoders and
remove the legacy drm_helper_disable_unused_functions() call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Atomic phase 1: Use drm_plane_helpers for primary plane
Hans de Goede [Sat, 29 Sep 2018 12:18:16 +0000 (14:18 +0200)]
staging: vboxvideo: Atomic phase 1: Use drm_plane_helpers for primary plane

Use drm_plane_helpers for the primary plane and replace our custom
mode_set callback with drm_helper_crtc_mode_set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Atomic phase 1: convert cursor to universal plane
Hans de Goede [Sat, 29 Sep 2018 12:18:15 +0000 (14:18 +0200)]
staging: vboxvideo: Atomic phase 1: convert cursor to universal plane

In preparation for atomic conversion, let's use the transitional atomic
helpers drm_plane_helper_update/disable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>