Re: [PATCH] staging: rts5208: add check on NULL before dereference

2018-06-09 Thread okaya
On 2018-06-09 15:34, Andy Shevchenko wrote: On Sat, Jun 9, 2018 at 7:58 PM, wrote: On 2018-06-09 12:38, Anton Vasilyev wrote: If rtsx_probe fails to allocate dev->chip, then NULL pointer dereference occurs at rtsx_release_resources(). Patch adds checks chip on NULL before its dereference

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

2018-06-09 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 8/8] staging: mt7621-gpio: implement high level and low level irqs

2018-06-09 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 | 57 +-- 1 file changed, 46 insertions(+), 11 deletions(-)

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

2018-06-09 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 4/8] staging: mt7621-gpio: implement '.irq_[request|release]_resources' functions

2018-06-09 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 7/8] staging: mt7621-gpio: avoid custom irq_domain for gpio

2018-06-09 Thread Sergio Paracuellos
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 until you find a hit. There were some problems with

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

2018-06-09 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 3/8] staging: mt7621-gpio: make use of 'builtin_platform_driver'

2018-06-09 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 1/8] staging: mt7621-gpio: make use 'bgpio_init' from GPIO_GENERIC

2018-06-09 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

Re: [PATCH] staging: rts5208: add check on NULL before dereference

2018-06-09 Thread Andy Shevchenko
On Sat, Jun 9, 2018 at 7:58 PM, wrote: > On 2018-06-09 12:38, Anton Vasilyev wrote: >> >> If rtsx_probe fails to allocate dev->chip, then NULL pointer >> dereference occurs at rtsx_release_resources(). >> >> Patch adds checks chip on NULL before its dereference at >> rtsx_release_resources and

Dear Sir/Madam

2018-06-09 Thread Mr. Knight Stephen
Dear Sir/Madam, Good day, how are you doing? i hope you're okay today, I am a marketer and a consultant representing some private and large bulk investors based in the Gulf Region and Africa. They are seeking means of expanding and relocating business interest abroad in the following sectors

Re: [PATCH] staging: rts5208: add check on NULL before dereference

2018-06-09 Thread okaya
On 2018-06-09 12:38, Anton Vasilyev wrote: If rtsx_probe fails to allocate dev->chip, then NULL pointer dereference occurs at rtsx_release_resources(). Patch adds checks chip on NULL before its dereference at rtsx_release_resources and passing with dereference inside rtsx_release_chip. Found

[PATCH] staging: rts5208: add check on NULL before dereference

2018-06-09 Thread Anton Vasilyev
If rtsx_probe fails to allocate dev->chip, then NULL pointer dereference occurs at rtsx_release_resources(). Patch adds checks chip on NULL before its dereference at rtsx_release_resources and passing with dereference inside rtsx_release_chip. Found by Linux Driver Verification project

Re: [PATCH v2] staging: pi433: add mutex fixing concurrency issues.

2018-06-09 Thread Hugo Lefeuvre
> > After discussing this issue on the kernel newbies mailing list[0] we > > came to the conclusion that it is very unlikely that pi433_release and > > pi433_ioctl would ever run concurrently in this case. This is also > > true for read/write. Unless one can find a situation where this might > >

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

2018-06-09 Thread Greg Kroah-Hartman
On Sat, Jun 09, 2018 at 04:23:21PM +0200, Chris Opperman wrote: > Signed-off-by: Chris Opperman > --- > drivers/staging/comedi/drivers.c | 29 ++--- > 1 file changed, 14 insertions(+), 15 deletions(-) I can not take patches without any changelog text at all :(

[PATCH] staging: mt7621-pci: Fix coding style error

2018-06-09 Thread Abdun Nihaal
This patch removes space after * to fix the following checkpatch error: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Abdun Nihaal --- drivers/staging/mt7621-pci/pci-mt7621.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

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

2018-06-09 Thread Chris Opperman
Signed-off-by: Chris Opperman --- drivers/staging/comedi/drivers.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 9d73347..3207ae2 100644 ---

Re: [PATCH] staging: comedi: shortened a long line

2018-06-09 Thread chris
Hi Joe, Thank you for the feedback! I understand better now and will resend the patch. Regards, Chris Opperman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: comedi: shortened a long line

2018-06-09 Thread Joe Perches
On Sat, 2018-06-09 at 12:54 +0200, Chris Opperman wrote: > Shortened a long line to improve readability in > drivers/staging/comedi/drivers.c Hi Chris. Look at the whole function and see if you can find a better way to write it instead of merely doing what a brainless tool like checkpatch asks.

[PATCH] staging: comedi: shortened a long line

2018-06-09 Thread Chris Opperman
Shortened a long line to improve readability in drivers/staging/comedi/drivers.c Signed-off-by: Chris Opperman --- drivers/staging/comedi/drivers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index

Re: [PATCH] Fixed coding style problems.

2018-06-09 Thread chris
Thanks for the feedback! I will retry the submission. Regards, Chris ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] staging: pi433: add mutex fixing concurrency issues.

2018-06-09 Thread Valentin Vidic
On Thu, Jun 07, 2018 at 08:45:03AM -0400, Hugo Lefeuvre wrote: > After discussing this issue on the kernel newbies mailing list[0] we > came to the conclusion that it is very unlikely that pi433_release and > pi433_ioctl would ever run concurrently in this case. This is also > true for read/write.

Re: [PATCH 2/2] staging: rtl8192e: fix line over 80 characters

2018-06-09 Thread Joe Perches
On Sat, 2018-06-09 at 15:07 +0900, thtlwlsmsgk...@gmail.com wrote: > *fix checkpatch.pl warnings: > WARNING: line over 80 characters Consider using a temporary for these ieee->current_network. dereferences. > diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c >

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

2018-06-09 Thread Sergio Paracuellos
On Fri, Jun 8, 2018 at 2:17 PM, Linus Walleij wrote: > A second thought: Second thought is always a good thing :-) > > On Fri, Jun 8, 2018 at 1:59 PM, Linus Walleij > wrote: > >>> + select GPIOLIB_IRQCHIP >> >> You are not using this so I guess remove that line. > (...) >>> +static int

[PATCH 2/2] staging: rtl8192e: fix line over 80 characters

2018-06-09 Thread thtlwlsmsgkfla
*fix checkpatch.pl warnings: WARNING: line over 80 characters Signed-off-by: Hyunil Kim --- drivers/staging/rtl8192e/rtllib_softmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c

[PATCH 1/2] staging: rtl8192e: remove brace for single statement

2018-06-09 Thread thtlwlsmsgkfla
* fix checkpatch.pl warning: WARNING: braces { are not necessary for single statement blocks Signed-off-by: Hyunil Kim --- drivers/staging/rtl8192e/rtllib_softmac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c

[PATCH 2/2] staging: mt7621-spi: fix indentation for switch statement

2018-06-09 Thread JoonHwan.Kim
* fix checkpatch.pl error: ERROR: switch and case should be at the same indent Signed-off-by: Joonhwan Kim --- drivers/staging/mt7621-spi/spi-mt7621.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c

[PATCH 1/2] staging: mt7621-spi: change indentation from space to tab

2018-06-09 Thread JoonHwan.Kim
* fix checkpatch.pl error: ERROR: code indent should use tabs where possible Signed-off-by: Joonhwan Kim --- drivers/staging/mt7621-spi/spi-mt7621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c