John Whitmore
d48cc3c398
staging:rtl8192u: Rename List > list - Coding style
...
In struct TS_COMMON_INFO rename the member List to list. This clears the
checkpatch issue concerning CamelCase naming of variables.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:55:56 +02:00
John Whitmore
6ae62698ee
staging:rtl8192u: remove typedef of struct TS_COMMON_INFO - Style
...
To clear a checkpatch issue removed the typedef of the structure
TS_COMMON_INFO.
This change removes the previous declaration, which defined two types, both
TS_COMMON_INFO and a pointer type PTS_COMMON_INFO:
typedef struct _TS_COMMON_INFO {
...
} TS_COMMON_INFO, *PTS_COMMON_INFO;
The pointer type has been completely removed from the code, as:
"(so-called Hungarian notation) is brain damaged" according to the coding
standard.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:55:56 +02:00
John Whitmore
336b25773c
staging:rtl8192u: remove typedef of enumeration TR_SELECT - Style
...
To clear a checkpatch issue removed the typedef of the enumeration TR_SELECT
this should not impact runtime code as it's only a coding style change.
Signed-off-by: John Whitmore <johnfwhitmore@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:55:56 +02:00
Ali Aminian
67e6ee898e
staging: rts5208: xd.c fixed a brace coding style issue
...
Fixing a coding style issue
Signed-off-by: Ali Aminian <aminian.opensource@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:54:11 +02:00
Michael Straube
0a31edbbf8
staging: rtl8188eu: remove blank lines
...
Remove unrequired blank lines as reported by checkpatch.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:53:59 +02:00
Michael Straube
11790bbdf3
staging: rtl8188eu: use is_multicast_ether_addr
...
Use is_multicast_ether_addr instead of IS_MCAST.
By definition the broadcast address is also a multicast address,
so checking for !multicast in the conditional is sufficient.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:53:59 +02:00
Michael Straube
cfd6456434
staging: rtl8188eu: remove MacAddr_isBcst macro
...
Use is_broadcast_ether_addr instead of the MacAddr_isBcst macro.
The macro is not used anywhere else, so remove it.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:53:59 +02:00
Todd Poynor
56edc4e3f9
staging: gasket: common ioctls add __user annotations
...
Add __user annotation to gasket common ioctl pointer arguments for
sparse checking.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:36 +02:00
Todd Poynor
de3690d025
staging: gasket: common ioctl dispatcher add __user annotations
...
Add __user annotation to gasket core common ioctl pointer arguments for
sparse checking.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:36 +02:00
Todd Poynor
c13435deaa
staging: gasket: apex ioctl add __user annotations
...
Add __user annotation to ioctl pointer argument, for sparse checking.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:36 +02:00
Todd Poynor
761d8db714
staging: gasket: top ioctl handler add __user annotations
...
Add __user annotation to gasket_core top-level ioctl handling pointer
arguments, for sparse checking.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
ed74277bd8
staging: gasket: always allow root open for write
...
Always allow root to open device for writing.
Drop special-casing of ioctl permissions for root vs. owner.
Convert to bool types as appropriate.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
563f3bb51f
staging: gasket: fix multi-line comment syntax in gasket_core.h
...
Use consistent kernel-style multi-line comment syntax.
Reported-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
40eb350231
staging: gasket: remove extra parens in gasket_write_mappable_regions
...
Remove unneeded parentheses around subexpressions.
Reported-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
fd5d76ab69
staging: gasket: gasket_mmap use PAGE_MASK
...
gasket_mmap use PAGE_MASK, instead of performing math on PAGE_SIZE, for
simplicity and clarity.
Reported-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
0b184cc865
staging: gasket: remove unnecessary parens in page table code
...
gasket_alloc_coherent_memory() extra parentheses in statement.
Reported-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
4e48c29fe0
staging: gasket: fix comment syntax in apex.h
...
Use kernel-style multi-line comment syntax.
Reported-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
6d8a1d564b
staging: gasket: remove else clause after return in if clause
...
Else after return is unnecessary and may cause static code checkers to
complain.
Reported-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
c5172a29d7
staging: gasket: gasket page table functions use bool return type
...
Convert from int to bool return type for gasket page table functions
that return values used as booleans.
Reported-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
9116223b84
staging: gasket: apex_clock_gating simplify logic, reduce indentation
...
Collapse together two checks and return immediately, avoid conditional
indentation for most of function code.
Reported-by: Guenter Roeck <groeck@chromium.org >
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
e80d8afc97
staging: gasket: gasket_mmap return error instead of valid BAR index
...
When offset to be mapped matches both a BAR region and a coherent mapped
region return an error as intended, not the BAR index.
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
ec45f01668
staging: gasket: don't treat no device reset callback as an error
...
It is not an error for a device to not have a reset callback registered.
Signed-off-by: Simon Que <sque@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
ed6e96c795
staging: gasket: remove unnecessary code in coherent allocator
...
Remove extraneous statement in gasket_config_coherent_allocator()
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
ae27b2f9f7
staging: gasket: fix class create bug handling
...
class_create() never returns NULL, and this driver should never return
PTR_ERR(NULL) anyway.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Reviewed-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
b6fdbbb743
staging: gasket: remove code for no physical device
...
gasket_enable_dev code for enabling a gasket device with no physical PCI
device registered shouldn't be necessary.
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:35 +02:00
Todd Poynor
7a013c5026
staging: gasket: gasket_enable_dev remove unnecessary variable
...
Remove unnecessary variable, pass constant param instead.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:34 +02:00
Todd Poynor
ec54d1abef
staging: gasket: allow compile for ARM64 in Kconfig
...
The gasket and apex drivers are also to be used on ARM64 architectures.
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-21 08:50:34 +02:00
Todd Poynor
d7db5843bc
staging: gasket: drop gasket_cdev_get_info, use container_of
...
Remove gasket_cdev_get_info(), use container_of() directly instead,
drop unnecessary NULL checks.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
45042402ae
staging: gasket: bail out of reset sequence on device callback error
...
If device reset callback returns an error, error out at the gasket
level.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
72a23054a9
staging: gasket: gasket_wait_with_reschedule use 32 bits of retry count
...
Don't need a 64-bit retry counter.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
a42ea3d61c
staging: gasket: gasket_wait_with_reschedule simplify logic
...
gasket_wait_with_reschedule() is a little more clear if we just return
directly when the waited-for condition is hit. This also allows the
following condition check to be removed and identation of the
conditionally-executed code to be reduced.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
c17acfdf4a
staging: gasket: gasket_wait_with_reschedule use msleep
...
Replace schedule_timeout() call with msleep() for simplicity.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
24dfee40e6
staging: gasket: fix gasket_wait_with_reschedule timeout return code
...
Return -ETIMEDOUT, not -EINVAL, on timeout, including callers.
Reported-by: Dmitry Torokhov <dtor@chromium.org >
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
e24fbaf73f
staging: gasket: convert gasket_mmap_has_permissions to bool return
...
gasket_mmap_has_permissions() should return a boolean value.
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
03c25b3ad0
staging: gasket: Remove stale pointers on error allocating attr array
...
If gasket_sysfs_create_mapping() hits errors allocating the attribute
array, remove stale pointers to device info from the mapping object.
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
cf2865a0c7
staging: gasket: Return EBUSY on mapping create when already in use
...
gasket_sysfs_create_mapping() return EBUSY if sysfs mapping already in
use, as a more appropriate error code than the current return of EINVAL,
which would indicate invalid parameters.
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
722c902aac
staging: gasket: hold mutex on gasket driver unregistration
...
Take the global mutex on driver unregistration updates for proper
ordering of updates and consistent access procedures.
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
ba6585847e
staging: gasket: remove driver registration on class creation failure
...
If class_create() fails, remove the gasket driver from the global
registration table.
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
b17cef4d08
staging: gasket: whitespace fix in gasket_page_table_init
...
Tab replaced with space.
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:47 +02:00
Todd Poynor
920953ab4e
staging: gasket: fix typo in gasket_core.h comments
...
Grammar fixup in gasket_core.h comments describing struct
gasket_interrupt_desc.
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:46 +02:00
Todd Poynor
7e8a450aa0
staging: gasket: fix typo in apex_enter_reset
...
Fix typo in log message.
Signed-off-by: Zhongze Hu <frankhu@chromium.org >
Signed-off-by: Todd Poynor <toddpoynor@google.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-19 11:39:46 +02:00
Tobias Lindskog
173a4906ae
staging: android: ashmem: Shrink directly through shmem_fallocate
...
When ashmem_shrink is called from direct reclaim on a user thread, a
call to do_fallocate will check for permissions against the security
policy of that user thread. It can thus fail by chance if called on a
thread that isn't permitted to modify the relevant ashmem areas.
Because we know that we have a shmem file underneath, call the shmem
implementation of fallocate directly instead of going through the
user-space interface for fallocate.
Signed-off-by: Tobias Lindskog <tobias.lindskog@sonymobile.com >
Signed-off-by: Jeff Vander Stoep <jeffv@google.com >
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 11:49:16 +02:00
Matthias Wolf
ab608b341b
staging: fbtft: Fix line continuation
...
Fix checkpatch warning: avoid unnecessary line continuation
to allow grepping of whole error message.
Signed-off-by: Matthias Wolf <der_wolf_@web.de >
Signed-off-by: Felix Siegel <felix.siegel@stud.uni-hannover.de >
Signed-off-by: Tim Cofala <cofala@stud.uni-hannover.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 11:47:12 +02:00
Matthias Wolf
66558395e1
staging: fbtft: Fix line over 80 characters
...
Fix checkpatch line over 80 characters where it seemed appropriate
Signed-off-by: Matthias Wolf <der_wolf_@web.de >
Signed-off-by: Felix Siegel <felix.siegel@stud.uni-hannover.de >
Signed-off-by: Tim Cofala <cofala@stud.uni-hannover.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 11:47:12 +02:00
Nishad Kamdar
642e0692be
staging: comedi: comedi_fops: Shift assignment operator '=' to previous line
...
Shift '=' assignment operator to the end of previous
line to conform to preferred kernel style line wrapping.
Issue reported by checkpatch CHECK.
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com >
Reviewed-by: Ian Abbott <abbotti@mev.co.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 11:47:12 +02:00
Michael Straube
65f3264177
staging: rtl8188eu: remove redundant header file
...
Both functions declared in rtl8188e_led.h are also declared in
rtw_led.h which is included from drv_types.h. Remove rtl8188e_led.h
and it's includes.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 10:38:19 +02:00
Michael Straube
cfd707e2f7
staging: rtl8188eu: add spaces around '+'
...
Add spaces around '+' to follow kernel coding style.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 10:38:19 +02:00
Michael Straube
3cedbfb851
staging: rtl8188eu: rename variable
...
Rename variable to avoid CamelCase.
tmpV16 -> tmpv16
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 10:38:19 +02:00
Michael Straube
b5a870456f
staging: rtl8188eu: rename function parameters
...
Rename function parameters to avoid CamelCase.
bWrite -> write
PwrState -> pwrstate
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 10:38:19 +02:00
Michael Straube
c7279e34cb
staging: rtl8188eu: rename Efuse_PowerSwitch
...
Rename function to avoid CamelCase.
Efuse_PowerSwitch -> efuse_power_switch
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-16 10:38:19 +02:00