[PATCH v2 4/7] staging: mt7621-gpio: implement '.irq_[request|release]_resources' functions

2018-06-10 Thread Sergio Paracuellos
When implementing custom irqchips it is important to also implement .irq_request_resources() and .irq_release_resources() and make sure these call gpiochip_[un]lock_as_irq(). Add those two for this driver. Also store struct device pointer in global state structure to be able to use 'dev_err' with

[PATCH v2 6/7] staging: mt7621-gpio: add kerneldoc for state data containers

2018-06-10 Thread Sergio Paracuellos
This commit adds kerneldoc for the two data containers in order to better understanding of its existence. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

[PATCH v2 2/7] staging: mt7621-gpio: avoid including 'gpio.h'

2018-06-10 Thread Sergio Paracuellos
Including file '' should be avoided in new drivers code, so just remove it because it is no necessary at all. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c

[PATCH v2 5/7] staging: mt7621-gpio: add COMPILE_TEST

2018-06-10 Thread Sergio Paracuellos
This driver is actually platform-agnostic. Add COMPILE_TEST for the compilation test coverage. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-gpio/Kconfig

[PATCH v2 3/7] staging: mt7621-gpio: make use of 'builtin_platform_driver'

2018-06-10 Thread Sergio Paracuellos
This driver was being registered using 'module_platform_driver' but it is not a module at all. Instead of this use 'builtin_platform_driver' which seems to be the correct one. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v2 7/7] staging: mt7621-gpio: implement high level and low level irqs

2018-06-10 Thread Sergio Paracuellos
This chip support high level and low level interrupts. Those have to be implemented also to get a complete and clean driver. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-gpio/gpio-mt7621.c | 51 +++ 1 file changed, 38 insertions(+), 13 deletions(-)

[PATCH v2 1/7] staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC

2018-06-10 Thread Sergio Paracuellos
Gpio complexity is just masking the fact that offset is always 0..n and writes to bits 0..n of some memory address. Because of this whole thing can just me converted to use GPIO_GENERIC and avoid duplications of a lot of driver custom functions. So use bgpio_init instead of custom code adding

[PATCH v2 0/7] staging: mt7621-gpio: last cleanups

2018-06-10 Thread Sergio Paracuellos
After submiting this driver to try to get mainlined and get out of staging some new cleanups seems to be necessary. According to this main of Linus Walleij: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-June/121742.html this series tries to fix all of the issues in order

[PATCH] staging: gdm724x: add error handling for nlmsg_put

2018-06-10 Thread Zhouyang Jia
When nlmsg_put fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling nlmsg_put. Signed-off-by: Zhouyang Jia --- drivers/staging/gdm724x/netlink_k.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH 1/2] gpio: mediatek: add driver for MT7621

2018-06-10 Thread Sean Wang
Hi, On Fri, 2018-06-08 at 13:59 +0200, Linus Walleij wrote: > Hi Sergio! > > Thanks for your patch! > > Given that we have combined pin control and GPIO drivers for > almost all Mediatek chips in drivers/pinctrl/mediatek/* > I would ideally like to have some input from the Mediatek >

[PATCH] staging: clocking-wizard: prefer 'help' in Kconfig

2018-06-10 Thread Kyle Buzby
Fixes the checkpatch warning: WARNING: prefer 'help' over '---help---' for new help texts +config COMMON_CLK_XLNX_CLKWZRD Signed-off-by: Kyle Buzby --- drivers/staging/clocking-wizard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging:iio:accel: use sign extend function avoiding code duplication

2018-06-10 Thread Karim Eshapa
Use sign_extend32 kernel function instead of code duplication. This function is also safe for 16 bits. Signed-off-by: Karim Eshapa --- drivers/staging/iio/accel/adis16201.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/iio/accel/adis16201.c

RE: [PATCH v5] Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic

2018-06-10 Thread KY Srinivasan
> -Original Message- > From: Sunil Muthuswamy > Sent: Friday, June 8, 2018 11:39 AM > To: Haiyang Zhang > Cc: de...@linuxdriverproject.org; Sunil Muthuswamy > ; KY Srinivasan ; Stephen > Hemminger > Subject: [PATCH v5] Drivers: HV: Send one page worth of kmsg dump over > Hyper-V

Re: [PATCH 7/8] staging: mt7621-gpio: avoid custom irq_domain for gpio

2018-06-10 Thread Sergio Paracuellos
On Sun, Jun 10, 2018 at 07:02:20PM +1000, NeilBrown wrote: > On Sat, Jun 09 2018, Sergio Paracuellos wrote: > > > Instead of create a custom irq_domain for this chip, use > > 'gpiochip_set_chained_irqchip' from GPIOLIB_IRQCHIP. It > > is ok to call this function several times. You only have to >

Re: [PATCH 4/8] staging: mt7621-gpio: implement '.irq_[request|release]_resources' functions

2018-06-10 Thread Sergio Paracuellos
On Sun, Jun 10, 2018 at 06:56:21PM +1000, NeilBrown wrote: > On Sat, Jun 09 2018, Sergio Paracuellos wrote: > > > When implementing custom irqchips it is important to also > > implement .irq_request_resources() and .irq_release_resources() > > and make sure these call gpiochip_[un]lock_as_irq().

Re: [PATCH 8/8] staging: mt7621-gpio: implement high level and low level irqs

2018-06-10 Thread Sergio Paracuellos
On Sun, Jun 10, 2018 at 07:04:56PM +1000, NeilBrown wrote: > On Sat, Jun 09 2018, Sergio Paracuellos wrote: > > > This chip support high level and low level interrupts. Those > > have to be implemented also to get a complete and clean driver. > > > > Signed-off-by: Sergio Paracuellos > > --- > >

Re: [PATCH 1/8] staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC

2018-06-10 Thread Sergio Paracuellos
On Sun, Jun 10, 2018 at 06:53:04PM +1000, NeilBrown wrote: > On Sat, Jun 09 2018, Sergio Paracuellos wrote: > > > Gpio complexity is just masking the fact that offset is always > > 0..n and writes to bits 0..n of some memory address. Because > > of this whole thing can just me converted to use

Re: [PATCH 8/8] staging: mt7621-gpio: implement high level and low level irqs

2018-06-10 Thread NeilBrown
On Sat, Jun 09 2018, Sergio Paracuellos wrote: > This chip support high level and low level interrupts. Those > have to be implemented also to get a complete and clean driver. > > Signed-off-by: Sergio Paracuellos > --- > drivers/staging/mt7621-gpio/gpio-mt7621.c | 57 >

Re: [PATCH 7/8] staging: mt7621-gpio: avoid custom irq_domain for gpio

2018-06-10 Thread NeilBrown
On Sat, Jun 09 2018, Sergio Paracuellos wrote: > Instead of create a custom irq_domain for this chip, use > 'gpiochip_set_chained_irqchip' from GPIOLIB_IRQCHIP. It > is ok to call this function several times. You only have to > mark the line with 'IRQF_SHARED' and then loop over the > three banks

Re: [PATCH 4/8] staging: mt7621-gpio: implement '.irq_[request|release]_resources' functions

2018-06-10 Thread NeilBrown
On Sat, Jun 09 2018, Sergio Paracuellos wrote: > When implementing custom irqchips it is important to also > implement .irq_request_resources() and .irq_release_resources() > and make sure these call gpiochip_[un]lock_as_irq(). > Add those two for this driver. Also store struct device pointer >

Re: [PATCH 1/8] staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC

2018-06-10 Thread NeilBrown
On Sat, Jun 09 2018, Sergio Paracuellos wrote: > Gpio complexity is just masking the fact that offset is always > 0..n and writes to bits 0..n of some memory address. Because > of this whole thing can just me converted to use GPIO_GENERIC > and avoid duplications of a lot of driver custom

Re: [PATCH] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-10 Thread chris
Hi Greg, I've added changelog text to the patch below. Appreciate your feedback! Regards, Chris Opperman >8--8< Improved the readability of comedi_nsamples_left: a) Reduced nesting by using more return calls. b) Separated

[PATCH v2] staging: rtl8192u: remove redundant variables

2018-06-10 Thread Kenneth Lu
Clean up W=1 warning: variable set but not used. Signed-off-by: Kenneth Lu --- v2: Rollback r8192U_core.c for the incorrect removed variables. --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 -- drivers/staging/rtl8192u/r8192U_core.c| 7 +--

[PATCH] staging: wilc1000: Fix type of argument in ieee80211_is_action()

2018-06-10 Thread Nishad Kamdar
Type used is unsigned char but expected is restricted __le16. Warning reported by sparse. Part of eudyptula challenge. Signed-off-by: Nishad Kamdar --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

WARNING in ion_dma_buf_begin_cpu_access

2018-06-10 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:a16afaf7928b Merge tag 'for-v4.18' of git://git.kernel.org.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1480e36f80 kernel config: https://syzkaller.appspot.com/x/.config?x=314f2150f36c16ca