[PATCH] staging: comedi: comedi_internal.h: Avoid '(' at the end of line

2018-07-14 Thread Nishad Kamdar
Bring function argument 'struct comedi_subdevice *s' to the previous line to avoid ending the line with open parenthesis. Issue found by checkpatch. Signed-off-by: Nishad Kamdar --- drivers/staging/comedi/comedi_internal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dri

[PATCH 1/2] staging: olpc_dcon: prefer 'help' in KConfig

2018-07-14 Thread Cristian Kubis
Fix for a style warning reported by checkpatch.pl in KConfig suggesting to use 'help' instead of '---help---'. Signed-off-by: Cristian Kubis --- drivers/staging/olpc_dcon/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/olpc_dcon/Kconfig b/driver

[PATCH 0/2] staging: olpc_dcon: fix style warnings

2018-07-14 Thread Cristian Kubis
Series of patches fixing two different kinds of style warnings in olpc_dcon as reported by checkpatch.pl. Cristian Kubis (2): staging: olpc_dcon: prefer 'help' in KConfig staging: olpc_dcon: add missing identifier names drivers/staging/olpc_dcon/Kconfig | 6 +++--- drivers/staging/olpc_d

[PATCH 2/2] staging: olpc_dcon: add missing identifier names

2018-07-14 Thread Cristian Kubis
Add missing function argument identifier names as suggested by checkpatch.pl. Signed-off-by: Cristian Kubis --- drivers/staging/olpc_dcon/olpc_dcon.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/olpc_dcon/olpc_dcon.h b/drivers/staging/olpc_dcon/olpc_

Re: [PATCH] vme: ca91cx42: remove redundant variable i

2018-07-14 Thread Martyn Welch
On Sat, Jul 14, 2018 at 05:33:32PM +0100, Colin King wrote: > From: Colin Ian King > > Variable i is being assigned but is never used hence it is redundant > and can be removed. > > Cleans up clang warning: > warning: variable 'i' set but not used [-Wunused-but-set-variable] > > Signed-off-by:

Re: [PATCH 12/18] staging: gasket: annotate ioctl arg with __user

2018-07-14 Thread Todd Poynor
>> I think I'm following >> http://www.kroah.com/log/linux/linux-staging-update.html, >> but if I'm off in the weeds do clue me in, thanks. > > That's something I wrote 9 years ago :) Still the top search result for how to work in staging, suggest an update. :) ___

[PATCH 4.17 REGRESSION fix 0/1] Revert "staging:r8188eu: Use lib80211 to support TKIP"

2018-07-14 Thread Hans de Goede
Hi Greg, While running some ASOC tests on a VIOS LTH17 laptop I noticed that wifi was broken and often the machine would hard freeze shortly after bringing up the wifi connection. One of the oopses pointed to the commit which this patch reverts and that fixes both the wifi being broken and the ha

[PATCH 4.17 REGRESSION fix] Revert "staging:r8188eu: Use lib80211 to support TKIP"

2018-07-14 Thread Hans de Goede
Commit b83b8b1881c4 ("staging:r8188eu: Use lib80211 to support TKIP") is causing 2 problems for me: 1) One boot the wifi on a laptop with a r8188eu wifi device would not connect and dmesg contained an oops about scheduling while atomic pointing to the tkip code. This went away after revertin

[PATCH 1/2] staging:r8188eu: Use lib80211 to encrypt (TKIP) tx frames

2018-07-14 Thread Ivan Safonov
Put data to skb, decrypt with lib80211_crypt_tkip, and place back to tx buffer. MIC calculation will be replaced later. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_security.c | 419 +- 1 file changed, 77 insertions(+), 342 deletions(-) diff --git

[PATCH 2/2] staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames

2018-07-14 Thread Ivan Safonov
Put data to skb, decrypt with lib80211_crypt_ccmp, and place back to tx buffer. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_security.c | 778 +++--- 1 file changed, 72 insertions(+), 706 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_secu

[PATCH] vme: ca91cx42: remove redundant variable i

2018-07-14 Thread Colin King
From: Colin Ian King Variable i is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'i' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- drivers/vme/bridges/vme_ca91cx42.c | 2 -- 1 file changed

[PATCH] staging: comedi: comedi_fops: Shift assignment operator '=' to previous line

2018-07-14 Thread Nishad Kamdar
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 --- drivers/staging/comedi/comedi_fops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH v3 14/15] staging: mt7621-pci: remove duplicated include

2018-07-14 Thread Sergio Paracuellos
linux/pci.h is being included twice. Remove one of them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 41e03e3..3befd76 1006

[PATCH v3 12/15] staging: mt7621-pci: use BIT macro in preprocessor definitions

2018-07-14 Thread Sergio Paracuellos
Some preprocessor definitions are using a custom implementation of BIT macro. Just use linux kernel BIT macro instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH v3 11/15] staging: mt7621-pci: remove RALINK_PCI_BASE from remaining definitions

2018-07-14 Thread Sergio Paracuellos
RALINK_PCI_BASE has no sense and this driver has base address readed and mapped from device tree. Remove remaining uses of it and change code to use pcie_read and pcie_write functions in places where this was being used. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621

[PATCH v3 07/15] staging: mt7621-pci: remove unused macros

2018-07-14 Thread Sergio Paracuellos
There some macros that are not being used. Remove them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 29 + 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt762

[PATCH v3 06/15] staging: mt7621-pci: simplify write_config function

2018-07-14 Thread Sergio Paracuellos
write_config function is always called with bus and func being 0. Avoid those params and just use 0 inside the function. Review parameter types changing for more proper ones. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 20 +--- 1 file changed,

[PATCH v3 13/15] staging: mt7621-pci: rename RALINK_PCI_CONFIG_DATA_VIRTUAL_REG definition

2018-07-14 Thread Sergio Paracuellos
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit shorter renaming it to RALINK_PCI_CONFIG_DATA. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-pc

[PATCH v3 05/15] staging: mt7621-pci: simplify read_config function

2018-07-14 Thread Sergio Paracuellos
read_config function is always called with bus and func being 0. Avoid those params and just use 0 inside the function. Return readed value instead pass a reference parameter. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++- 1 f

[PATCH v3 10/15] staging: mt7621-pci: use pcie_[read|write] in RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR

2018-07-14 Thread Sergio Paracuellos
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly referenced for read and write. Use pcie_read and pcie_write instead changing its definition to a simple relative offset to pcie base address. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c

[PATCH v3 04/15] staging: mt7621-pci: use pcie_[read|write] in [write|read]_config

2018-07-14 Thread Sergio Paracuellos
Instead of custom macros use pcie_read and pcie_write functions. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 67 - 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/driver

[PATCH v3 15/15] staging: mt7621-pci: remove remaining pci_legacy dependant code

2018-07-14 Thread Sergio Paracuellos
pcibios_* remaining code is not neccessary at all. We are mapping irq using of_irq_parse_and_map_pci and swizzle_irq which are set in driver 'probe' function. Remove this code. No kernel config option CONFIG_PCI_DRIVERS_LEGACY should be included anymore. Signed-off-by: Sergio Paracuellos --- dri

[PATCH v3 08/15] staging: mt7621-pci: avoid register duplication per controller using pcie_[read|write]

2018-07-14 Thread Sergio Paracuellos
Use pcie_[read|write] fucntions to read and write controller registers. Define those only by offset and pass controller offset + register offset relative to base address to functions. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 62 -

[PATCH v3 02/15] staging: mt7621-pci: remove dead code derived to not use custom reads and writes

2018-07-14 Thread Sergio Paracuellos
Driver is using now pci subsystem generics reads and writes and requesting bus resources without using legacy code functions. Because of this there is a lot of dead code that can be removed. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 172 +

[PATCH v3 09/15] staging: mt7621-pci: remove unused includes

2018-07-14 Thread Sergio Paracuellos
Some includes are not needed at all. Remove them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 7fa2436..212028a 100644 --

[PATCH v3 03/15] staging: mt7621-pci: add pcie_write and pcie_read helpers

2018-07-14 Thread Sergio Paracuellos
Introdice this functions to make easier to write/read to/from an offset relative to base address Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/stagin

[PATCH v3 01/15] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-14 Thread Sergio Paracuellos
map_bus callback is called before every .read/.write operation. Implement it and change custom read write operations for the pci subsystem generics. Make the probe function to don't use legacy stuff and request bus resources directly. Get pci register base from device tree. Signed-off-by: Sergio P

[PATCH v3 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-14 Thread Sergio Paracuellos
This patch series include an attempt to avoid the use of custom read and writes in driver code and use PCI subsystem common ones. In order to do this 'map_bus' callback is implemented and also data structures for driver are included. The regs base address is being readed from device tree and the d

Re: [PATCH 06/18] staging: gasket: fix deadlock in pci driver unregister path

2018-07-14 Thread Greg Kroah-Hartman
On Sat, Jul 14, 2018 at 11:07:21AM +0300, Dmitry Torokhov wrote: > On Sat, Jul 14, 2018 at 8:58 AM Todd Poynor wrote: > > > > From: Todd Poynor > > > > g_mutex held across pci_unregister_driver() call, also held in > > gasket_pci_remove(), which deadlocks. > > > > Reported-by: Dmitry Torokhov >

[PATCH 4/6] staging: rtl8188eu: rename variable

2018-07-14 Thread Michael Straube
Rename variable to avoid CamelCase. tmpV16 -> tmpv16 Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 26 +++--- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/

[PATCH 6/6] staging: rtl8188eu: remove redundant header file

2018-07-14 Thread Michael Straube
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 --- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 1 - drivers/staging/rtl8188eu/hal/usb_halinit.c | 1 - ...

[PATCH 3/6] staging: rtl8188eu: rename function parameters

2018-07-14 Thread Michael Straube
Rename function parameters to avoid CamelCase. bWrite -> write PwrState -> pwrstate Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c| 8 drivers/staging/rtl8188eu/include/rtw_efuse.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/

[PATCH 2/6] staging: rtl8188eu: rename Efuse_PowerSwitch

2018-07-14 Thread Michael Straube
Rename function to avoid CamelCase. Efuse_PowerSwitch -> efuse_power_switch Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c| 8 drivers/staging/rtl8188eu/include/rtw_efuse.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/

[PATCH 5/6] staging: rtl8188eu: add spaces around '+'

2018-07-14 Thread Michael Straube
Add spaces around '+' to follow kernel coding style. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c

[PATCH 1/6] staging: rtl8188eu: do not line break function definition

2018-07-14 Thread Michael Straube
Do not line break function definition of Efuse_PowerSwitch(). Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efu

Re: [PATCH 2/3] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-14 Thread Sergio Paracuellos
On Sat, Jul 14, 2018 at 10:04:32AM +1000, NeilBrown wrote: > On Tue, Jul 10 2018, Sergio Paracuellos wrote: > > > map_bus callback is called before every .read/.write operation. > > Implement it and change custom read write operations for the > > pci subsystem generics. Make the probe function to

Re: [PATCH 11/18] staging: gasket: always allow root open for write

2018-07-14 Thread Dmitry Torokhov
On Sat, Jul 14, 2018 at 8:58 AM Todd Poynor wrote: > > From: Todd Poynor > > Always allow root to open device for writing. > > Drop special-casing of ioctl permissions for root vs. owner. > > Reported-by: Dmitry Torokhov > Signed-off-by: Zhongze Hu > Signed-off-by: Todd Poynor I think this pa

Re: [PATCH 14/18] staging: gasket: fix class create bug handling

2018-07-14 Thread Dmitry Torokhov
On Sat, Jul 14, 2018 at 8:59 AM Todd Poynor wrote: > > 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

Re: [PATCH 06/18] staging: gasket: fix deadlock in pci driver unregister path

2018-07-14 Thread Dmitry Torokhov
On Sat, Jul 14, 2018 at 8:58 AM Todd Poynor wrote: > > From: Todd Poynor > > g_mutex held across pci_unregister_driver() call, also held in > gasket_pci_remove(), which deadlocks. > > Reported-by: Dmitry Torokhov > Signed-off-by: Zhongze Hu > Signed-off-by: Todd Poynor > --- > drivers/staging

Re: [PATCH 10/18] staging: gasket: gasket_open use container_of()

2018-07-14 Thread Dmitry Torokhov
On Sat, Jul 14, 2018 at 8:58 AM Todd Poynor wrote: > > From: Todd Poynor > > Use container_of(), drop unnecessary NULL check. > > Reported-by: Dmitry Torokhov > Signed-off-by: Zhongze Hu > Signed-off-by: Todd Poynor > --- > drivers/staging/gasket/gasket_core.c | 7 ++- > 1 file changed, 2

Re: [PATCH 12/18] staging: gasket: annotate ioctl arg with __user

2018-07-14 Thread Greg Kroah-Hartman
On Sat, Jul 14, 2018 at 12:12:38AM -0700, Todd Poynor wrote: HTML email gets rejected by the mailing lists :( Please fix your email client to not do that. > On Fri, Jul 13, 2018 at 11:35 PM, Greg Kroah-Hartman < > gre...@linuxfoundation.org> wrote: > > On Fri, Jul 13, 2018 at 10:58:10PM -07