OSDN Git Service

uclinux-h8/linux.git
5 years agostaging: rtl8188eu: core: Use sizeof(*p) instead of sizeof(struct P) for memory alloc...
Mamta Shukla [Sat, 13 Oct 2018 06:56:06 +0000 (12:26 +0530)]
staging: rtl8188eu: core: Use sizeof(*p) instead of sizeof(struct P) for memory allocation

Use sizeof(*ptr) instead of sizeof(ptr_type) makes memory
allocation easy in case the type of pointer changes.
Fix all checkpatch reported issues for "CHECK: Prefer
kzalloc(sizeof(*<p>)...) over kzalloc(sizeof(struct <P>)...)".

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: ks7010: Remove extra blank line
Maya Nakamura [Tue, 16 Oct 2018 07:53:09 +0000 (00:53 -0700)]
staging: ks7010: Remove extra blank line

Remove extra blank line. Issue found by checkpatch.pl.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Vaishali Thakkar <vthakkar@vaishalithakkar.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: Remove extra blank line
Maya Nakamura [Wed, 17 Oct 2018 06:15:21 +0000 (23:15 -0700)]
staging: gasket: Remove extra blank line

Remove extra blank line. Issue found by checkpatch.pl.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Reviewed-by: Vaishali Thakkar <vthakkar@vaishalithakkar.in>
Acked-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: media: davinci_vpfe: Fix spelling mistake in enum
Kimberly Brown [Thu, 18 Oct 2018 01:14:27 +0000 (21:14 -0400)]
staging: media: davinci_vpfe: Fix spelling mistake in enum

Fix the spelling mistake in enumerator identifier
RESIZER_MODE_CONTINIOUS. 'CONTINIOUS' should be 'CONTINUOUS'. Issue
found by checkpatch.

Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
Reviewed-by: Vaishali Thakkar <vthakkar@vaishalithakkar.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: speakup: Add a pair of braces
Maya Nakamura [Thu, 18 Oct 2018 01:16:00 +0000 (18:16 -0700)]
staging: speakup: Add a pair of braces

Add a pair of braces to make all arms of the if statement consistent.
Issue found by checkpatch.pl.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wlan-ng: Replace long int with long
Maya Nakamura [Thu, 18 Oct 2018 08:29:42 +0000 (01:29 -0700)]
staging: wlan-ng: Replace long int with long

Replace long int with long as int is unnecessary according to the
checkpatch.pl warning. K&R write, 'The word int can be omitted... and
typically is.'

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: MAINTAINERS: remove obsolete IPX staging directory
Greg Kroah-Hartman [Tue, 16 Oct 2018 10:45:13 +0000 (12:45 +0200)]
staging: MAINTAINERS: remove obsolete IPX staging directory

The IPX code was removed from staging back in November 2017, but the
MAINTAINERS entry stuck around.  Remove the invalid directory from the
file as it does not actually point to anything anymore.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: MAINTAINERS: remove NCP filesystem entry
Greg Kroah-Hartman [Tue, 16 Oct 2018 10:42:50 +0000 (12:42 +0200)]
staging: MAINTAINERS: remove NCP filesystem entry

The ncp filesystem got removed in November of 2017, yet the MAINTAINERS
entry persisted.  Remove that now.

Reported-by: Joe Perches <joe@perches.com>
Cc: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup comparsions to false
Michael Straube [Sun, 14 Oct 2018 19:09:33 +0000 (21:09 +0200)]
staging: rtl8188eu: cleanup comparsions to false

Cleanup remaining comparsions to false.
if(x == false) -> if(!x)

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: Update device virtual address comment
Nick Ewalt [Mon, 15 Oct 2018 04:59:27 +0000 (21:59 -0700)]
staging: gasket: Update device virtual address comment

Add that number of page table entries and extended address bit offset
are configurable. Update example virtual address format to be more
consistent with typical usage.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: sysfs: fix attribute release comment
Nick Ewalt [Mon, 15 Oct 2018 04:59:26 +0000 (21:59 -0700)]
staging: gasket: sysfs: fix attribute release comment

Comments for gasket_sysfs_get_attr() incorrectly describe reference
release procedure.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: apex: fix sysfs_show
Nick Ewalt [Mon, 15 Oct 2018 04:59:25 +0000 (21:59 -0700)]
staging: gasket: apex: fix sysfs_show

sysfs_show was incorrectly extracting the sysfs_attribute_type from the
gasket_sysfs_attribute. This prevented dispatch from working properly.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: page_table: simplify gasket_components_to_dev_address
Nick Ewalt [Mon, 15 Oct 2018 04:59:24 +0000 (21:59 -0700)]
staging: gasket: page_table: simplify gasket_components_to_dev_address

Refactor gasket_components_to_dev_address to be faster and easier to
understand. The old implementation was unnecessarily complex and masked
the page_index for simple addresses but not extended ones. It makes the
most sense for this function to perform no such masking.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: page_table: fix comment in components_to_dev_address
Nick Ewalt [Mon, 15 Oct 2018 04:59:23 +0000 (21:59 -0700)]
staging: gasket: page_table: fix comment in components_to_dev_address

Comments in components_to_dev_address() describing examples are
inconsistent, fix these to be accurate.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: page table: fixup error path allocating coherent mem
Nick Ewalt [Mon, 15 Oct 2018 04:59:22 +0000 (21:59 -0700)]
staging: gasket: page table: fixup error path allocating coherent mem

Correctly clean up data structure state in gasket_alloc_coherent_memory
error path, to ensure no double free on the stale pointer value.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: page_table: rearrange gasket_page_table_entry
Nick Ewalt [Mon, 15 Oct 2018 04:59:21 +0000 (21:59 -0700)]
staging: gasket: page_table: rearrange gasket_page_table_entry

Rearrange gasket_page_table entry to reduce padding slop.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: page_table: remove unnecessary PTE status set to free
Nick Ewalt [Mon, 15 Oct 2018 04:59:20 +0000 (21:59 -0700)]
staging: gasket: page_table: remove unnecessary PTE status set to free

Remove unnecessary ptes[i].status update in gasket_perform_unmapping.
The vaaue will be cleared in the following memset.

Signed-off-by: Nick Ewalt <nicholasewalt@google.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: page table: remove dead code in coherent mem alloc
Todd Poynor [Mon, 15 Oct 2018 04:59:19 +0000 (21:59 -0700)]
staging: gasket: page table: remove dead code in coherent mem alloc

gasket_alloc_coherent_memory() has some unnecessary code related to out
of memory checking that will never hit the condition checked, remove.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: page table: return valid error code on map fail
Todd Poynor [Mon, 15 Oct 2018 04:59:18 +0000 (21:59 -0700)]
staging: gasket: page table: return valid error code on map fail

Return -EINVAL on mapping failures, instead of -1, which triggers a
checkpatch error.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove whitespace - style
Michael Straube [Sun, 14 Oct 2018 10:17:42 +0000 (12:17 +0200)]
staging: rtl8188eu: remove whitespace - style

Remove extra space in variable declaration.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename Hal_MappingOutPipe() - style
Michael Straube [Sun, 14 Oct 2018 10:17:41 +0000 (12:17 +0200)]
staging: rtl8188eu: rename Hal_MappingOutPipe() - style

Rename Hal_MappingOutPipe() to avoid CamelCase.
Hal_MappingOutPipe -> hal_mapping_out_pipe

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename parameters of Hal_MappingOutPipe() - style
Michael Straube [Sun, 14 Oct 2018 10:17:40 +0000 (12:17 +0200)]
staging: rtl8188eu: rename parameters of Hal_MappingOutPipe() - style

Rename parameters of Hal_MappingOutPipe() in header to avoid CamelCase
and match the names used in the function definition in hal_com.c.
pAdapter -> adapter
NumOutPipe -> numoutpipe

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 hal_com_get_channel_plan() - style
Michael Straube [Sun, 14 Oct 2018 10:17:39 +0000 (12:17 +0200)]
staging: rtl8188eu: rename parameter of hal_com_get_channel_plan() - style

Rename parameter of hal_com_get_channel_plan() in header to avoid
CamelCase and match the name used in the function definition in
hal_com.c. AutoLoadFail -> load_fail

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unused parameter of hal_com_get_channel_plan()
Michael Straube [Sun, 14 Oct 2018 10:17:38 +0000 (12:17 +0200)]
staging: rtl8188eu: remove unused parameter of hal_com_get_channel_plan()

The parameter 'struct adapter *padapter' of hal_com_get_channel_plan()
is unused, so remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename HalSetBrateCfg() - style
Michael Straube [Sun, 14 Oct 2018 10:17:37 +0000 (12:17 +0200)]
staging: rtl8188eu: rename HalSetBrateCfg() - style

Rename HalSetBrateCfg() to avoid CamelCase.
HalSetBrateCfg -> hal_set_brate_cfg

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename parameters of HalSetBrateCfg() - style
Michael Straube [Sun, 14 Oct 2018 10:17:36 +0000 (12:17 +0200)]
staging: rtl8188eu: rename parameters of HalSetBrateCfg() - style

Rename parameters of HalSetBrateCfg() in header to avoid CamelCase
and match the names used in the function definition in hal_com.c.
mBratesOS -> brates
BrateCfg -> rate_cfg

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unused parameter of HalSetBrateCfg()
Michael Straube [Sun, 14 Oct 2018 10:17:35 +0000 (12:17 +0200)]
staging: rtl8188eu: remove unused parameter of HalSetBrateCfg()

The parameter 'struct adapter *adapt' of HalSetBrateCfg() is unused,
so remove it.

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 qos_acm()
Michael Straube [Thu, 11 Oct 2018 19:57:12 +0000 (21:57 +0200)]
staging: rtl8188eu: remove whitespace in qos_acm()

Remove whitespace in qos_acm() to improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup long lines in stop_sta_xmit()
Michael Straube [Thu, 11 Oct 2018 19:57:11 +0000 (21:57 +0200)]
staging: rtl8188eu: cleanup long lines in stop_sta_xmit()

Line break lines over 80 characters in stop_sta_xmit() to
clear checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup long lines in rtw_get_sta_pending()
Michael Straube [Thu, 11 Oct 2018 19:57:10 +0000 (21:57 +0200)]
staging: rtl8188eu: cleanup long lines in rtw_get_sta_pending()

Line break lines over 80 characters in rtw_get_sta_pending() to
clear checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup block comments
Michael Straube [Thu, 11 Oct 2018 19:57:09 +0000 (21:57 +0200)]
staging: rtl8188eu: cleanup block comments

Cleanup block comments to clear 'please, no space before tabs'
and 'line over 80 characters' checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove commented code
Michael Straube [Thu, 11 Oct 2018 19:57:08 +0000 (21:57 +0200)]
staging: rtl8188eu: remove commented code

Remove unused commented code in the file core/rte_xmit.c.
Clears 'please, no space before tabs' and 'line over 80
characters' checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup alignment issue
Michael Straube [Thu, 11 Oct 2018 19:57:07 +0000 (21:57 +0200)]
staging: rtl8188eu: cleanup alignment issue

Clear a 'Alignment should match open parenthesis'
checkpatch issue.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: use __func__ in qos_acm()
Michael Straube [Thu, 11 Oct 2018 19:57:06 +0000 (21:57 +0200)]
staging: rtl8188eu: use __func__ in qos_acm()

Use __func__ instead of hardcoded name in qos_acm().
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: cleanup missing spaces around operators
Michael Straube [Thu, 11 Oct 2018 19:57:05 +0000 (21:57 +0200)]
staging: rtl8188eu: cleanup missing spaces around operators

Clear all missing spaces around operators checkpatch issues
in the file core/rtw_xmit.c. Use '+=' or '-=' where possible.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: fix spelling mistake "EINPROGESS" -> "EINPROGRESS"
Colin Ian King [Fri, 12 Oct 2018 22:31:37 +0000 (23:31 +0100)]
staging: rtl8188eu: fix spelling mistake "EINPROGESS" -> "EINPROGRESS"

Trivial fix to spelling mistake in RT_TRACE message text.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: phydm: fix spelling mistake "Abnrormal" -> "Abnormal"
Colin Ian King [Fri, 12 Oct 2018 15:07:27 +0000 (16:07 +0100)]
staging: rtlwifi: phydm: fix spelling mistake "Abnrormal" -> "Abnormal"

Trivial fix to spelling mistake in message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: fix spelling mistake "Abnornally" -> "Abnormally"
Colin Ian King [Fri, 12 Oct 2018 15:02:36 +0000 (16:02 +0100)]
staging: rtl8188eu: fix spelling mistake "Abnornally" -> "Abnormally"

Trivial fix to spelling mistake in ODM_RT_TRACE trace message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: tio: fix multiple missing break in switch bugs
Gustavo A. R. Silva [Thu, 11 Oct 2018 19:05:20 +0000 (21:05 +0200)]
staging: comedi: tio: fix multiple missing break in switch bugs

Currently, there are multiple missing break statements in two switch code
blocks. This makes the execution path to fall all the way down through
to the default cases, which makes the function ni_tio_set_gate_src() to
always return -EINVAL.

Fix this by adding the missing break statements.

Also, notice that due to the absence of the break statements,
the following pieces of code are unreachable:

1078    if (ret)
1079            return ret;
1080    /* 3.  reenable & set mode to starts things back up */
1081    ni_tio_set_gate_mode(counter, src);

1098    if (ret)
1099            return ret;
1100    /* 3.  reenable & set mode to starts things back up */
1101    ni_tio_set_gate2_mode(counter, src);

So, by adding the missing breaks, this patch also fixes the problem
above.

Addresses-Coverity-ID: 1474165 ("Missing break in switch")
Addresses-Coverity-ID: 1474162 ("Structurally dead code")
Fixes: 347e244884c3 ("staging: comedi: tio: implement global tio/ctr routing")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Use BIT macro instead of explicit shifting in dbg.h
Nishad Kamdar [Thu, 11 Oct 2018 16:09:29 +0000 (21:39 +0530)]
staging: mt7621-mmc: Use BIT macro instead of explicit shifting in dbg.h

Replace explicit shifting with BIT macro in dbg.h.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Fix lines over 80 characters in dbg.h
Nishad Kamdar [Thu, 11 Oct 2018 16:07:57 +0000 (21:37 +0530)]
staging: mt7621-mmc: Fix lines over 80 characters in dbg.h

This patch fixes lines over 80 characters in dbg.h.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Fix lines over 80 characters in dbg.c
Nishad Kamdar [Thu, 11 Oct 2018 16:06:19 +0000 (21:36 +0530)]
staging: mt7621-mmc: Fix lines over 80 characters in dbg.c

This patch fixes lines over 80 characters in dbg.c.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name
Mamta Shukla [Fri, 12 Oct 2018 17:31:07 +0000 (23:01 +0530)]
staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name

Shift * to be adjacent to pointer name to follow Linux coding style.
Issue found with checkpatch.pl
ERROR: "foo * bar" should be "foo *bar"

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: rtl8723bs: fix spelling mistake "Abnrormal" -> "Abnormal"
Colin Ian King [Fri, 12 Oct 2018 15:05:32 +0000 (16:05 +0100)]
staging: rtl8723bs: fix spelling mistake "Abnrormal" -> "Abnormal"

Trivial fix to spelling mistake in message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: os_dep: Remove space after cast
Mamta Shukla [Thu, 11 Oct 2018 17:46:26 +0000 (23:16 +0530)]
staging: rtl8723bs: os_dep: 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>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: os_dep: Remove true and false comparison
Mamta Shukla [Thu, 11 Oct 2018 17:44:42 +0000 (23:14 +0530)]
staging: rtl8723bs: os_dep: 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: greybus: loopback.c: remove unused gb_loopback::lbid
Rasmus Villemoes [Fri, 5 Oct 2018 14:28:24 +0000 (16:28 +0200)]
staging: greybus: loopback.c: remove unused gb_loopback::lbid

It's not obvious how the code prevents adding more than 31 elements to
the list and thus invoking undefined behaviour in the 1 << new_lbid
expression, and in practice causing ->lbid values to repeat every 32
elements.

But the definition of struct gb_loopback is local to loopback.c, and the
lbid field is entirely unused outside of this function, so it seems we
can just drop it entirely.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: prefer 'help' in KConfig
Ioannis Valasakis [Wed, 10 Oct 2018 14:47:56 +0000 (15:47 +0100)]
staging: wilc1000: prefer 'help' in KConfig

Fix for a style warning using the help without the
deprecated help included between dashes.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: make a couple of funcs static
Craig Kewley [Wed, 10 Oct 2018 20:17:05 +0000 (20:17 +0000)]
staging: vboxvideo: make a couple of funcs static

Fix Sparse warnings:
drivers/staging/vboxvideo/vbox_mode.c:309:6: warning:
symbol 'vbox_primary_atomic_disable' was not declared. Should it be static?

drivers/staging/vboxvideo/vbox_mode.c:452:6: warning:
symbol 'vbox_cursor_atomic_disable' was not declared. Should it be static?

Signed-off-by: Craig Kewley <craigkewley@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: unlock on error in vbox_cursor_atomic_update()
Dan Carpenter [Thu, 11 Oct 2018 07:59:41 +0000 (10:59 +0300)]
staging: vboxvideo: unlock on error in vbox_cursor_atomic_update()

We need to unlock before returning on this error path.

Fixes: 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to universal plane")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-dma: Delete unused define
Bhanusree Pola [Wed, 10 Oct 2018 01:10:35 +0000 (06:40 +0530)]
staging: mt7621-dma: Delete unused define

delete unused '#define GDMA_REG_CTRL1_CONTINOUS BIT(14)'

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: harden inode lookup for 32-bit platforms
Gao Xiang [Tue, 9 Oct 2018 14:07:13 +0000 (22:07 +0800)]
staging: erofs: harden inode lookup for 32-bit platforms

This patch introduces inode hash function, test and set callbacks,
and iget5_locked to find the right inode for 32-bit platforms.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove whitespace - style
Michael Straube [Tue, 9 Oct 2018 15:48:54 +0000 (17:48 +0200)]
staging: rtl8188eu: remove whitespace - style

Replace tabs with spaces and/or remove extra spaces where
appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup lines over 80 characters - style
Michael Straube [Tue, 9 Oct 2018 15:48:53 +0000 (17:48 +0200)]
staging: rtl8188eu: cleanup lines over 80 characters - style

Clear 'line over 80 characters' checkpatch warnings by adding
appropriate line breaks and moving a comment.

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 operators - style
Michael Straube [Tue, 9 Oct 2018 15:48:52 +0000 (17:48 +0200)]
staging: rtl8188eu: add spaces around operators - style

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: use __func__ instead of hardcoded name - style
Michael Straube [Tue, 9 Oct 2018 15:48:51 +0000 (17:48 +0200)]
staging: rtl8188eu: use __func__ instead of hardcoded name - style

Use __func__ instead of hardcoded function name in rtw_xmit_entry().
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: add the missing __init tags
Gao Xiang [Tue, 9 Oct 2018 13:43:53 +0000 (21:43 +0800)]
staging: erofs: add the missing __init tags

Append __init to `erofs_init_inode_cache',
`z_erofs_init_zip_subsystem' and move these
declarations to internal.h.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: ni_660x: add device-global routing
Spencer E. Olson [Wed, 3 Oct 2018 20:56:12 +0000 (14:56 -0600)]
staging: comedi: ni_660x: add device-global routing

Provides the device-global routing interface for ni_660x devices.  Using
the device-global names in comedi_cmd structures for commands was already
supported through the ni_tio module.

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: ni_660x: clean up pfi routing
Spencer E. Olson [Wed, 3 Oct 2018 20:56:11 +0000 (14:56 -0600)]
staging: comedi: ni_660x: clean up pfi routing

Cleans up the pfi routing code to make it easier to follow, read, and also
to prepare to use this cleaned up code for enabling the device-global
routing interface for ni_660x devices.

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: ni_660x: Add NI PCI-6608 to list of supported devices
Spencer E. Olson [Wed, 3 Oct 2018 20:56:10 +0000 (14:56 -0600)]
staging: comedi: ni_660x: Add NI PCI-6608 to list of supported devices

Previously, only the PXI version of the NI-6608 board was supported.  This
change adds support for the PCI version as well.

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: ni_mio_common: create device-global access to tio
Spencer E. Olson [Wed, 3 Oct 2018 20:56:09 +0000 (14:56 -0600)]
staging: comedi: ni_mio_common: create device-global access to tio

Adds tio sub-devices of ni_mio_common supported hardware to the
implementation of test_route, connect_route, disconnect_route.  This change
delegates the actual functionality to the ni_tio module.

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: tio: implement global tio/ctr routing
Spencer E. Olson [Wed, 3 Oct 2018 20:56:08 +0000 (14:56 -0600)]
staging: comedi: tio: implement global tio/ctr routing

Adds ability to use device-global names in command args, in particular
cmd->start_arg (for NI_CtrArmStartTrigger), and cmd->scan_begin_arg or
cmd->convert_arg (either is used to specify NI_CtrGate, with preference
given to cmd->scan_begin_arg, if it is set).

The actual arguments of cmd->start_arg are not fully checked against known
register values for the particular devices because these are not documented
or currently known.  This follows the precedence of prior versions of the
tio driver.  Should these become known, they should be annotated in the
route_values tables and the set of lines in ni_tio_cmdtest should be
uncommented to allow the tests to be made.

This patch also adds interface functions that allow routes for particular
counter route destinations to be made/queried/unmade.  This allows overseer
modules to implement test_route, connect_route, and disconnect_route.  As a
part of these changes, various functions were cleaned up and clarified.

These new interface functions allow direct writing/reading of register
values.  This is an example of exactly what the new device-global access
was intended to solve:  the old interface was not consistent with other
portions of the ni_* drivers--it did not allow full register values to be
given for various MUXes.  Instead, the old interface _did_ abstract away
some of the actual hardware from the underlying devices, but it was not
consistent with any other NI hardware.  Allowing the device-global
identifiers to be used, the new patch provides for consistency across all
ni_* drivers.  One final note:  these changes provide for backwards
compatibility by allowing the older values to still be used in through the
pre-existing kernel interfaces--though not in the new device-global
test/dis/connect/route interfaces.

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: ni_mio_common: implement output selection of GPFO_{0, 1}
Spencer E. Olson [Wed, 3 Oct 2018 20:56:07 +0000 (14:56 -0600)]
staging: comedi: ni_mio_common: implement output selection of GPFO_{0, 1}

Implement the ability to route various signals to NI_CtrOut(x) pin.  This
pin is also known as GPFO_{0,1} in the DAQ STC.

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: ni_mio_common: implement global pfi, rtsi routing
Spencer E. Olson [Wed, 3 Oct 2018 20:56:06 +0000 (14:56 -0600)]
staging: comedi: ni_mio_common: implement global pfi, rtsi routing

Implement device-global config interface for ni_mio devices.  In
particular, this patch implements:
INSN_DEVICE_CONFIG_TEST_ROUTE,
INSN_DEVICE_CONFIG_CONNECT_ROUTE,
INSN_DEVICE_CONFIG_DISCONNECT_ROUTE,
INSN_DEVICE_CONFIG_GET_ROUTES
for the ni mio devices.  This means that the new abstracted signal/terminal
names can be used to define signal routing with regards to the PFI
terminals and RTSI trigger bus lines.

This also adds ability to identify PFI and RTSI channels on the PFI and
RTSI subdevices using the new device-global names.  This does not change
the values that are set for channel output selections using the subdevice
interfaces--these still require direct register values.

Annotates and updates tables of register values to reflect this new
implementation status.

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: ni_mio_common: implement new routing for TRIG_EXT
Spencer E. Olson [Wed, 3 Oct 2018 20:56:05 +0000 (14:56 -0600)]
staging: comedi: ni_mio_common: implement new routing for TRIG_EXT

Use new signal routing capability for all comedi command *_src == TRIG_EXT
options.  This new interface allows the user specify signals and terminals
as TRIG_EXT sources using a very consistent naming convention. Furthermore,
the interface allows backwards compatibility to prior behavior of
specifying register-level (or near register-level) values as *_arg options
when *_src == TRIG_EXT.

Annotates and updates tables of register values to reflect this new
implementation status.

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 interface to ni routing table information
Spencer E. Olson [Wed, 3 Oct 2018 20:56:04 +0000 (14:56 -0600)]
staging: comedi: add interface to ni routing table information

Adds interface and associated unittests for accessing/looking-up/validating
the new ni routing table information.

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: ni_routing: Add NI signal routing info
Spencer E. Olson [Wed, 3 Oct 2018 20:56:03 +0000 (14:56 -0600)]
staging: comedi: ni_routing: Add NI signal routing info

See README for a thorough discussion of this content.

Adds tables of all register values for routing various signals to various
terminals on National Instruments hardware.  This information is directly
compared to and taken from register-level programming documentation and/or
register-level programming examples as provided by National Instruments.

Furthermore, this information was mostly compared (favorably) to the
register values already used in the comedi drivers for NI hardware.

Adds tables of valid routes for many devices.  This information is not
consistent from device to device, nor entirely consistent within device
families.  One additional major challenge is that this information does not
seem to be obtainable in any programmatic fashion, neither through the
proprietary NIDAQmx(-base) c-libraries, nor with register level
programming, _nor_ through any documentation.  In fact, the only consistent
source of this information is through the proprietary NI-MAX software,
which currently only runs on Windows platforms.  A further challenge is
that this information cannot be exported from NI-MAX, except by screenshot.

The collection and maintenance of this information is somewhat tedious and
requires frequent re-examination and comparison of NI-MAX and/or the
NI-MHDDK documentation (register programming information) and NI-MHDDK
examples.  Tools are added with this patch to facilitate generating CSV
files from the data tables.  These CSV files can be used with a spreadsheet
program to provide better visual comparision with screenshots gathered from
NI-MAX.  Tools are also added to regenerate the data tables from CSV
content--this greatly enhances updating data tables with large changes
(such as when adding devices).

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 new device-global config interface
Spencer E. Olson [Wed, 3 Oct 2018 20:56:02 +0000 (14:56 -0600)]
staging: comedi: add new device-global config interface

Adds interface for configuring options that are global to all sub-devices.
For now, only options to configure device-globally identified signal routes
have been defined.

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 abstracted NI signal/terminal named constants
Spencer E. Olson [Wed, 3 Oct 2018 20:56:01 +0000 (14:56 -0600)]
staging: comedi: add abstracted NI signal/terminal named constants

This change adds abstracted constants for National Instruments
terminal/signal names.

Some background:
  There have been significant confusions over the past many years for users
  when trying to understand how to connect to/from signals and terminals on
  NI hardware using comedi.  The major reason for this is that the actual
  register values were exposed and required to be used by users.  Several
  major reasons exist why this caused major confusion for users:

  1) The register values are _NOT_ in user documentation, but rather in
    arcane locations, such as a few register programming manuals that are
    increasingly hard to find and the NI-MHDDK (comments in in example
    code).  There is no one place to find the various valid values of the
    registers.

  2) The register values are _NOT_ completely consistent.  There is no way
    to gain any sense of intuition of which values, or even enums one
    should use for various registers.  There was some attempt in prior use
    of comedi to name enums such that a user might know which enums should
    be used for varying purposes, but the end-user had to gain a knowledge
    of register values to correctly wield this approach.

  3) The names for signals and registers found in the various register
    level programming manuals and vendor-provided documentation are _not_
    even close to the same names that are in the end-user documentation.

Similar confusion, albeit less, plagued NI's previous version of their own
proprietary drivers.  Earlier than 2003, NI greatly simplified the
situation for users by releasing a new API that abstracted the names of
signals/terminals to a common and intuitive set of names.  In addition,
this new API provided a much more common interface to use for most of NI
hardware.

The names added here mirror the names chosen and well documented by NI.
These names are exposed to the user via the comedilib user library.  By
keeping the names in this format, in spite of the use of CamelScript,
maintenance will be greatly eased and confusion for users _and_ comedi
developers will be greatly reduced.

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: tests: add unittest framework for comedi
Spencer E. Olson [Wed, 3 Oct 2018 20:56:00 +0000 (14:56 -0600)]
staging: comedi: tests: add unittest framework for comedi

Adds a framework for unittests for comedi drivers.  It was certainly
possible to write some unit tests before and test various aspects of a
particular driver, but this framework makes this a bit easier and hopefully
inspires more unittest modules to be written.

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: comedi_test: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
Spencer E. Olson [Wed, 19 Sep 2018 16:51:06 +0000 (10:51 -0600)]
staging: comedi: comedi_test: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
instruction.

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: ni_pcidio: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
Spencer E. Olson [Wed, 19 Sep 2018 16:51:05 +0000 (10:51 -0600)]
staging: comedi: ni_pcidio: 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 this implementation, based on
spec sheets from NI.

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: 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>