[PATCH] staging: dgnc: dgnc_tty.c: Avoid '(' at the end of line

2018-07-21 Thread Nishad Kamdar
Bring the first argument to the previous line and align the other lines to match open parenthesis. Issue found by checkpatch. Signed-off-by: Nishad Kamdar --- drivers/staging/dgnc/dgnc_tty.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.

[RFC PATCH v4] Xilinx AXI-Stream FIFO v4.1 IP core driver

2018-07-21 Thread Jacob Feder
This IP core has read and write AXI-Stream FIFOs, the contents of which can be accessed from the AXI4 memory-mapped interface. This is useful for transferring data from a processor into the FPGA fabric. The driver creates a character device that can be read/written to with standard open/read/write/

[PATCH v2 06/10] staging:rtl8192u: Rename CountryIeBuf to country_ie_buf - Style

2018-07-21 Thread John Whitmore
Rename the member variable CountryIeBuf to country_ie_buf. This change clears the checkpatch issue with CamelCase. The change is purely coding style and should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 2 +- drivers/staging/

[PATCH v2 10/10] staging:rtl8192u: Rename variable State > state - Style

2018-07-21 Thread John Whitmore
Rename the variable State to state, this clears the checkpatch issue with CamelCase naming. The change is purely coding style and should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 10 +- drivers/staging/rtl8192u/ieee8

[PATCH v2 04/10] staging:rtl8192u: Rename bEnabled > enabled - Style

2018-07-21 Thread John Whitmore
Rename the member variable bEnabled to enabled. This change clears the checkpatch issue with CamelCase. Purely a coding style change which should not impact runtime execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 2 +- drivers/staging/rtl8192u/ieee80211/

[PATCH v2 08/10] staging:rtl8192u: Rename CountryIeWatchdog > country_ie_watchdog - Style

2018-07-21 Thread John Whitmore
Rename the member variable CountryIeWatchdog to country_ie_watchdog, this change clears the checkpatch issue with CamelCase naming of variables. The change is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ie

[PATCH v2 09/10] staging:rtl8192u: Rename MaxTxPwrDbmList > max_tx_pwr_dbm_list - Style

2018-07-21 Thread John Whitmore
Rename the member variable MaxTxPwrDbmList to max_tx_pwr_dbm_list. This change clears the checkpatch issue with CamelCase naming. The change is a simple coding style change which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/dot11d.

[PATCH v2 07/10] staging:rtl8192u: Rename variable CountryIeSrcAddr - Style

2018-07-21 Thread John Whitmore
Rename the member variable CountryIeSrcAddr to country_ie_src_addr, this clears the checkpatch issue with CamelCase naming. The change is purely a coding style change and should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/dot11d.h | 6 ++

[PATCH v2 05/10] staging:rtl8192u: Rename CountryIeLen > country_ie_len - Style

2018-07-21 Thread John Whitmore
Rename CountryIeLen to country_ie_len, coding style change to clear checkpatch issue with CamelCase naming. The change should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 6 +++--- drivers/staging/rtl8192u/ieee80211/dot1

[PATCH v2 01/10] staging:rtl8192u: Rename TClasProc > t_clas_proc - Style

2018-07-21 Thread John Whitmore
Rename the struct TS_COMMON_INFO member variable TClasProc to t_clas_proc. This change clears the checkpatch issue with CamelCase variable names. There should be no impact on runtime execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/s

[PATCH v2 00/10] staging:rtl8192u: Coding style changes

2018-07-21 Thread John Whitmore
These patches are previously failed patches from two seperate series of coding style changes. I've just combined the failed from both into this series. I compiled the patches with 'format-patch -v2' Never used the '-v' option previously so hope it's not a mistake to do so. Guess I'll find out if i

[PATCH v2 03/10] staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO - Style

2018-07-21 Thread John Whitmore
Removed the typedef from structure RT_DOT11D_INFO. This change clears the checkpatch issue with declaring new types. Rename the structure from RT_DOT11D_INFO to rt_dot11d_info. Coding style changes which should not impact runtime execution of code. Signed-off-by: John Whitmore --- drivers/stag

[PATCH v2 02/10] staging:rtl8192u: Rename TClasNum > t_clas_num - Style

2018-07-21 Thread John Whitmore
Rename the struct TS_COMMON_INFO member variable TClasNum to t_clas_num. This change clears the checkpatch issue with CamelCase naming. There should be no impact on runtime execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 2 +- drivers/staging/rtl

[PATCH 7/8] staging: rtl8188eu: replace tabs with spaces

2018-07-21 Thread Michael Straube
Replace tabs with spaces or just remove tabs where appropriate. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl

[PATCH 8/8] staging: rtl8188eu: fix lines over 80 characters

2018-07-21 Thread Michael Straube
Fix two lines over 80 characters by removing unnecessary parentheses. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rt

[PATCH 4/8] staging: rtl8188eu: change return type to bool

2018-07-21 Thread Michael Straube
Both rtw_is_cckrates_included() and rtw_is_cckratesonly_included() return true or false. Change the return type from uint to bool. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 4 ++-- drivers/staging/rtl8188eu/include/ieee80211.h | 4 ++-- 2 files changed,

[PATCH 5/8] staging: rtl8188eu: fix comparsions to true

2018-07-21 Thread Michael Straube
Use if(x) instead of if(x == true). Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 6 +++--- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c

[PATCH 6/8] staging: rtl8188eu: remove unnecessary parentheses

2018-07-21 Thread Michael Straube
Remove unnecessary parentheses. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_ieee80211.c| 20 +-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee8021

[PATCH 3/8] staging: rtl8188eu: refactor rtw_is_cckratesonly_included()

2018-07-21 Thread Michael Straube
Refactor rtw_is_cckratesonly_included() to improve readability and slightly reduce object file size. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_i

[PATCH 2/8] staging: rtl8188eu: refactor rtw_is_cckrates_included()

2018-07-21 Thread Michael Straube
Refactor rtw_is_cckrates_included() to improve readability and slightly reduce object file size. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_iee

[PATCH 1/8] staging: rtl8188eu: remove blank lines

2018-07-21 Thread Michael Straube
Remove unrequired blank lines reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/odm.c | 1 - drivers/staging/rtl8188eu/hal/phy.c | 3 --- drivers/staging/rtl8188eu/hal/rf.c | 1 - drivers/staging/rtl8188eu/hal/rtl8188

Re: [PATCH 00/14] staging: gasket: more assorted cleanups

2018-07-21 Thread Greg Kroah-Hartman
On Sat, Jul 21, 2018 at 06:34:53AM -0700, Todd Poynor wrote: > From: Todd Poynor > > More fixups arising from the chromium review of the gasket and apex > drivers. That looks better, I guess you forgot to delete the old patch series from your directory :) greg k-h __

Re: [PATCH] uio: add SPDX license tags

2018-07-21 Thread Greg KH
On Sat, Jul 21, 2018 at 06:31:39AM -0700, Stephen Hemminger wrote: > For those without any license text present or short reference > to GPL, add SPDX tag. > > Signed-off-by: Stephen Hemminger Thanks, now queued up. greg k-h ___ devel mailing list de..

Re: [PATCH 00/14] staging: gasket: assorted cleanups

2018-07-21 Thread Greg KH
On Sat, Jul 21, 2018 at 06:30:33AM -0700, Todd Poynor wrote: > On Sat, Jul 21, 2018 at 6:17 AM Greg Kroah-Hartman > wrote: > > > > On Sat, Jul 21, 2018 at 05:56:39AM -0700, Todd Poynor wrote: > > > From: Todd Poynor > > > > > > Various fixups arising from the chromium review of the gasket and ape

[PATCH 08/14] staging: gasket: apex return error on sysfs show of missing attribute

2018-07-21 Thread Todd Poynor
From: Todd Poynor Apex sysfs show function return -ENODEV if the attribute is not present, rather than silently failing from the standpoint of the userspace accessor. Reported-by: Guenter Roeck Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 4 ++-- 1 file changed, 2 ins

[PATCH 07/14] staging: gasket: gasket_get_device drop check for NULL pci_dev

2018-07-21 Thread Todd Poynor
From: Todd Poynor The pci_dev field of a struct gasket_dev can never be NULL, there's no need to check for this in gasket_get_device(). Reported-by: Guenter Roeck Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 02/14] staging: gasket: remove duplicate call to retrieve device callback

2018-07-21 Thread Todd Poynor
From: Todd Poynor gasket_handle_ioctl() calls gasket_get_ioctl_permissions_cb() twice; simplify the code and avoid duplicated work by fetching the callback pointer only once. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 7 --- 1 file

[PATCH 10/14] staging: gasket: interrupts: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 13/14] staging: gasket: page table: remove unnecessary logs

2018-07-21 Thread Todd Poynor
From: Todd Poynor Some error logs in page table handling code could only be hit in cases of programming errors not expected in the current code base, and aren't likely to be useful on their own. Remove these. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 23 +

[PATCH 12/14] staging: gasket: page table: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 09/14] staging: gasket: core: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 11/14] staging: gasket: ioctl common: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 14/14] staging: gasket: apex: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 03/14] staging: gasket: gasket_handle_ioctl fix ioctl exit trace param

2018-07-21 Thread Todd Poynor
From: Todd Poynor Pass the return value from the device ioctl permissions callback to the tracepoint when the callback returns an error. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 05/14] staging: gasket: print mmap starting address as unsigned long

2018-07-21 Thread Todd Poynor
From: Todd Poynor Page alignment error log should print the offending value as an unsigned long, not as a kernel pointer. Reported-by: Guenter Roeck Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH 06/14] staging: gasket: remove unnecessary NULL checks on calls from VFS

2018-07-21 Thread Todd Poynor
From: Todd Poynor Remove unneeded checks for NULL pointers in struct file pointers passed from the VFS layer or the private_data that must have been properly set at file open time. Reported-by: Guenter Roeck Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 15

[PATCH 01/14] staging: gasket: fix check_and_invoke_callback log param

2018-07-21 Thread Todd Poynor
From: Todd Poynor The message should be passed the callback function pointer, not the pointer to the gasket device. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH 04/14] staging: gasket: avoid copy to user on error in coherent alloc config

2018-07-21 Thread Todd Poynor
From: Todd Poynor gasket_config_coherent_allocator() on error return the error to caller without copying a possibly-update DMA address back to userspace. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 4 +++- 1 file changed, 3 insertions(+)

[PATCH 00/14] staging: gasket: more assorted cleanups

2018-07-21 Thread Todd Poynor
From: Todd Poynor More fixups arising from the chromium review of the gasket and apex drivers. Todd Poynor (14): staging: gasket: fix check_and_invoke_callback log param staging: gasket: remove duplicate call to retrieve device callback staging: gasket: gasket_handle_ioctl fix ioctl exit t

[PATCH] uio: add SPDX license tags

2018-07-21 Thread Stephen Hemminger
For those without any license text present or short reference to GPL, add SPDX tag. Signed-off-by: Stephen Hemminger --- drivers/uio/uio_cif.c | 4 +--- drivers/uio/uio_fsl_elbc_gpcm.c | 1 + drivers/uio/uio_hv_generic.c| 4 +--- drivers/uio/uio_netx.c | 3 +-- drivers/uio

Re: [PATCH 00/14] staging: gasket: assorted cleanups

2018-07-21 Thread Todd Poynor
On Sat, Jul 21, 2018 at 6:30 AM Todd Poynor wrote: > > On Sat, Jul 21, 2018 at 6:17 AM Greg Kroah-Hartman > wrote: > > > > On Sat, Jul 21, 2018 at 05:56:39AM -0700, Todd Poynor wrote: > > > From: Todd Poynor > > > > > > Various fixups arising from the chromium review of the gasket and apex > > >

[PATCH] staging: bcm2835-camera: fix timeout handling in wait_for_completion_timeout

2018-07-21 Thread Nicholas Mc Guire
wait_for_completion_timeout returns unsigned long not int so a variable of proper type is introduced. Further the check for <= 0 is ambiguous and should be == 0 here indicating timeout which is the only error case so no additional check needed here. Signed-off-by: Nicholas Mc Guire Fixes: 7b3ad5a

Re: [PATCH 00/14] staging: gasket: assorted cleanups

2018-07-21 Thread Greg Kroah-Hartman
On Sat, Jul 21, 2018 at 05:56:39AM -0700, Todd Poynor wrote: > From: Todd Poynor > > Various fixups arising from the chromium review of the gasket and apex > drivers. Didn't I just apply this whole series? Why resend it? confused, greg k-h ___ devel

[PATCH 12/14] staging: gasket: page table: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 13/14] staging: gasket: page table: remove unnecessary logs

2018-07-21 Thread Todd Poynor
From: Todd Poynor Some error logs in page table handling code could only be hit in cases of programming errors not expected in the current code base, and aren't likely to be useful on their own. Remove these. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 23 +

[PATCH 12/20] staging: gasket: remove unnecessary parens in page table code

2018-07-21 Thread Todd Poynor
From: Todd Poynor gasket_alloc_coherent_memory() extra parentheses in statement. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/g

[PATCH 14/20] staging: gasket: remove extra parens in gasket_write_mappable_regions

2018-07-21 Thread Todd Poynor
From: Todd Poynor Remove unneeded parentheses around subexpressions. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket_core.

[PATCH 09/20] staging: gasket: gasket page table functions use bool return type

2018-07-21 Thread Todd Poynor
From: Todd Poynor Convert from int to bool return type for gasket page table functions that return values used as booleans. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 58 +++--- drivers/stagi

[PATCH 05/20] staging: gasket: remove unnecessary code in coherent allocator

2018-07-21 Thread Todd Poynor
From: Todd Poynor Remove extraneous statement in gasket_config_coherent_allocator() Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/stagi

[PATCH 11/20] staging: gasket: fix comment syntax in apex.h

2018-07-21 Thread Todd Poynor
From: Todd Poynor Use kernel-style multi-line comment syntax. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/gasket/apex.h b/drivers/st

[PATCH 19/20] staging: gasket: common ioctl dispatcher add __user annotations

2018-07-21 Thread Todd Poynor
From: Todd Poynor Add __user annotation to gasket core common ioctl pointer arguments for sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 8 +--- drivers/staging/gasket/gasket_ioctl.h | 4 +++-

[PATCH 14/14] staging: gasket: apex: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 15/20] staging: gasket: fix multi-line comment syntax in gasket_core.h

2018-07-21 Thread Todd Poynor
From: Todd Poynor Use consistent kernel-style multi-line comment syntax. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gasket/gasket

[PATCH 13/20] staging: gasket: gasket_mmap use PAGE_MASK

2018-07-21 Thread Todd Poynor
From: Todd Poynor gasket_mmap use PAGE_MASK, instead of performing math on PAGE_SIZE, for simplicity and clarity. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 16/20] staging: gasket: always allow root open for write

2018-07-21 Thread Todd Poynor
From: Todd Poynor 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 Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 1

[PATCH 09/14] staging: gasket: core: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 17/20] staging: gasket: top ioctl handler add __user annotations

2018-07-21 Thread Todd Poynor
From: Todd Poynor Add __user annotation to gasket_core top-level ioctl handling pointer arguments, for sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 6 -- drivers/staging/gasket/gasket_core.h

[PATCH 08/20] staging: gasket: apex_clock_gating simplify logic, reduce indentation

2018-07-21 Thread Todd Poynor
From: Todd Poynor Collapse together two checks and return immediately, avoid conditional indentation for most of function code. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 43 +--- 1 file ch

[PATCH 06/14] staging: gasket: remove unnecessary NULL checks on calls from VFS

2018-07-21 Thread Todd Poynor
From: Todd Poynor Remove unneeded checks for NULL pointers in struct file pointers passed from the VFS layer or the private_data that must have been properly set at file open time. Reported-by: Guenter Roeck Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 15

[PATCH 10/14] staging: gasket: interrupts: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 18/20] staging: gasket: apex ioctl add __user annotations

2018-07-21 Thread Todd Poynor
From: Todd Poynor Add __user annotation to ioctl pointer argument, for sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --

[PATCH 20/20] staging: gasket: common ioctls add __user annotations

2018-07-21 Thread Todd Poynor
From: Todd Poynor Add __user annotation to gasket common ioctl pointer arguments for sparse checking. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 102 ++ 1 file changed, 55 insertions(+)

[PATCH 01/14] staging: gasket: fix check_and_invoke_callback log param

2018-07-21 Thread Todd Poynor
From: Todd Poynor The message should be passed the callback function pointer, not the pointer to the gasket device. Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH 00/14] staging: gasket: assorted cleanups

2018-07-21 Thread Todd Poynor
From: Todd Poynor Various fixups arising from the chromium review of the gasket and apex drivers. Todd Poynor (14): staging: gasket: fix check_and_invoke_callback log param staging: gasket: remove duplicate call to retrieve device callback staging: gasket: gasket_handle_ioctl fix ioctl exi

[PATCH 07/14] staging: gasket: gasket_get_device drop check for NULL pci_dev

2018-07-21 Thread Todd Poynor
From: Todd Poynor The pci_dev field of a struct gasket_dev can never be NULL, there's no need to check for this in gasket_get_device(). Reported-by: Guenter Roeck Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 11/14] staging: gasket: ioctl common: convert various logs to debug level

2018-07-21 Thread Todd Poynor
From: Todd Poynor Debugging information is improperly logged at non-debug log level in a number of places, and some logs regarding error conditions may be generated too frequently, such that these could cause performance problems and/or obscure other logs. Convert these to debug log level. Sign

[PATCH 07/20] staging: gasket: gasket_mmap return error instead of valid BAR index

2018-07-21 Thread Todd Poynor
From: Todd Poynor 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 Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 01/20] staging: gasket: allow compile for ARM64 in Kconfig

2018-07-21 Thread Todd Poynor
From: Todd Poynor The gasket and apex drivers are also to be used on ARM64 architectures. Signed-off-by: Todd Poynor --- drivers/staging/gasket/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gasket/Kconfig b/drivers/staging/gasket/Kconfig index c836

[PATCH 08/14] staging: gasket: apex return error on sysfs show of missing attribute

2018-07-21 Thread Todd Poynor
From: Todd Poynor Apex sysfs show function return -ENODEV if the attribute is not present, rather than silently failing from the standpoint of the userspace accessor. Reported-by: Guenter Roeck Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 4 ++-- 1 file changed, 2 ins

[PATCH 03/20] staging: gasket: remove code for no physical device

2018-07-21 Thread Todd Poynor
From: Todd Poynor gasket_enable_dev code for enabling a gasket device with no physical PCI device registered shouldn't be necessary. Reported-by: Greg Kroah-Hartman Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 12 +--- 1 file changed, 1 insertion(+), 11 deleti

[PATCH 06/20] staging: gasket: don't treat no device reset callback as an error

2018-07-21 Thread Todd Poynor
From: Todd Poynor It is not an error for a device to not have a reset callback registered. Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/gasket/gasket_core

[PATCH 10/20] staging: gasket: remove else clause after return in if clause

2018-07-21 Thread Todd Poynor
From: Todd Poynor Else after return is unnecessary and may cause static code checkers to complain. Reported-by: Guenter Roeck Signed-off-by: Simon Que Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_page_table.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --gi

[PATCH 02/20] staging: gasket: gasket_enable_dev remove unnecessary variable

2018-07-21 Thread Todd Poynor
From: Todd Poynor Remove unnecessary variable, pass constant param instead. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/gaske

[PATCH 05/14] staging: gasket: print mmap starting address as unsigned long

2018-07-21 Thread Todd Poynor
From: Todd Poynor Page alignment error log should print the offending value as an unsigned long, not as a kernel pointer. Reported-by: Guenter Roeck Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH 04/20] staging: gasket: fix class create bug handling

2018-07-21 Thread Todd Poynor
From: Todd Poynor class_create() never returns NULL, and this driver should never return PTR_ERR(NULL) anyway. Reported-by: Dmitry Torokhov Signed-off-by: Zhongze Hu Signed-off-by: Todd Poynor Reviewed-by: Dmitry Torokhov --- drivers/staging/gasket/gasket_core.c | 2 +- 1 file changed, 1 in

[PATCH 02/14] staging: gasket: remove duplicate call to retrieve device callback

2018-07-21 Thread Todd Poynor
From: Todd Poynor gasket_handle_ioctl() calls gasket_get_ioctl_permissions_cb() twice; simplify the code and avoid duplicated work by fetching the callback pointer only once. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 7 --- 1 file

[PATCH 03/14] staging: gasket: gasket_handle_ioctl fix ioctl exit trace param

2018-07-21 Thread Todd Poynor
From: Todd Poynor Pass the return value from the device ioctl permissions callback to the tracepoint when the callback returns an error. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 04/14] staging: gasket: avoid copy to user on error in coherent alloc config

2018-07-21 Thread Todd Poynor
From: Todd Poynor gasket_config_coherent_allocator() on error return the error to caller without copying a possibly-update DMA address back to userspace. Reported-by: Dmitry Torokhov Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_ioctl.c | 4 +++- 1 file changed, 3 insertions(+)

Re: [PATCH] Staging: pi433: rf69: fixed a multi line comment issue

2018-07-21 Thread Mark Railton
On Sat, Jul 21, 2018 at 08:53:21AM +0200, Greg KH wrote: > On Thu, Jul 19, 2018 at 10:43:18PM +0100, Mark Railton wrote: > > Fixed a coding style issue > > > > Signed-off-by: Mark Railton > > --- > > drivers/staging/pi433/rf69.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > >

[PATCH 2/2] Drivers: Staging: pi433: remove unsused case

2018-07-21 Thread Mark Railton
Removed a commented out case statement Signed-off-by: Mark Railton --- drivers/staging/pi433/rf69.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 14826fb505dd..b2d69af6d3fe 100644 --- a/drivers/staging/pi433/rf69.c +++ b/d

[PATCH] staging: bcm2835-camera: handle wait_for_completion_timeout return properly

2018-07-21 Thread Nicholas Mc Guire
wait_for_completion_timeout returns unsigned long not int so a variable of proper type is introduced. Further the check for <= 0 is ambiguous and should be == 0 here indicating timeout. Signed-off-by: Nicholas Mc Guire Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driv

Re: [PATCH v2 09/10] staging:trl8192u: Rename TClasProc > t_clas_proc - Style

2018-07-21 Thread John Whitmore
On Sat, Jul 21, 2018 at 09:02:15AM +0200, Greg KH wrote: > On Mon, Jul 16, 2018 at 08:04:53PM +0100, John Whitmore wrote: > > Rename the struct TS_COMMON_INFO member variable TClasProc to > > t_clas_proc. This change clears the checkpatch issue with CamelCase variable > > names. There should be no

Re: [PATCH v2 09/10] staging:trl8192u: Rename TClasProc > t_clas_proc - Style

2018-07-21 Thread Greg KH
On Mon, Jul 16, 2018 at 08:04:53PM +0100, John Whitmore wrote: > Rename the struct TS_COMMON_INFO member variable TClasProc to > t_clas_proc. This change clears the checkpatch issue with CamelCase variable > names. There should be no impact on runtime execution. > > Signed-off-by: John Whitmore >

Re: [PATCH 07/14] staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO - Style

2018-07-21 Thread Greg KH
On Fri, Jul 20, 2018 at 09:21:35PM +0100, John Whitmore wrote: > Removed the typedef from structure RT_DOT11D_INFO. This change clears the > checkpatch issue with declaring new types. > > Rename the structure from RT_DOT11D_INFO to rt_dot11d_info. > > Coding style changes which should not impact