Re: [PATCH RFC] staging: fieldbus: anybus-s: use proper type for wait_for_completion_timeout

2019-04-27 Thread Nicholas Mc Guire
On Sat, Apr 27, 2019 at 02:17:42AM -0400, Sven Van Asbroeck wrote: > Hello Nicholas, thank you for your contribution, I really appreciate it ! > See inline comments below. > > On Sat, Apr 27, 2019 at 12:32 AM Nicholas Mc Guire wrote: > > > > wait_for_completion_timeout() returns unsigned long (0

Re: [PATCH RFC] staging: fieldbus: anybus-s: use proper type for wait_for_completion_timeout

2019-04-27 Thread Sven Van Asbroeck
On Sat, Apr 27, 2019 at 3:01 AM Nicholas Mc Guire wrote: > > > (some unrelated sparse warnings (cast to restricted __be16)) > > > > That sounds interesting too. Could you provide more details? > > make C=1 > drivers/staging/fieldbus/anybuss/host.c:1350:25: warning: cast to restricted > __be16 > d

[PATCH RFC V2] staging: kpc2000: use int for wait_for_completion_interruptible

2019-04-27 Thread Nicholas Mc Guire
weit_for_completion_interruptible returns in (0 on completion and -ERESTARTSYS on interruption) - so use an int not long for API conformance and simplify the logic here a bit: need not check explicitly for == 0 as this is either -ERESTARTSYS or 0. Signed-off-by: Nicholas Mc Guire --- Problem lo

Re: [PATCH RFC] staging: fieldbus: anybus-s: use proper type for wait_for_completion_timeout

2019-04-27 Thread Nicholas Mc Guire
On Sat, Apr 27, 2019 at 03:20:54AM -0400, Sven Van Asbroeck wrote: > On Sat, Apr 27, 2019 at 3:01 AM Nicholas Mc Guire wrote: > > > > (some unrelated sparse warnings (cast to restricted __be16)) > > > > > > That sounds interesting too. Could you provide more details? > > > > make C=1 > > drivers/s

Re: [PATCH] staging: comedi: comedi_isadma: Use a non-NULL device for DMA API

2019-04-27 Thread Greg Kroah-Hartman
On Fri, Apr 26, 2019 at 10:41:20AM +0100, Ian Abbott wrote: > On 25/04/2019 18:13, Greg Kroah-Hartman wrote: > > On Thu, Apr 25, 2019 at 05:26:44PM +0100, Ian Abbott wrote: > > > The "comedi_isadma" module calls `dma_alloc_coherent()` and > > > `dma_free_coherent()` with a NULL device pointer which

Re: [PATCH RFC] staging: fieldbus: anybus-s: use proper type for wait_for_completion_timeout

2019-04-27 Thread Sven Van Asbroeck
On Sat, Apr 27, 2019 at 7:18 AM Nicholas Mc Guire wrote: > > so the issue is simply that the endiannes anotatoin is missing even > though the conversion is being done - with other words there is no code > lvel funcitonal bug here but rather sparse needs the anotation to verify > correctness and th

[PATCH] staging: vc04_services: bcm2835-camera: Modify return statement.

2019-04-27 Thread Vatsala Narang
Modify return statement and remove the respective assignment. Issue found by Coccinelle. Signed-off-by: Vatsala Narang --- drivers/staging/vc04_services/bcm2835-camera/controls.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-ca

[PATCH] Staging: sm750fb: Change *array into *const array

2019-04-27 Thread Kelsey Skunberg
Resolve checkpatch warning for static const char * array by using const pointers. Checkpatch Warning in sm750.c: static const char * array should probably be static const char * const Signed-off-by: Kelsey Skunberg --- drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 2/2] staging: kpc2000_spi: eliminated duplicate initialization of master local variable.

2019-04-27 Thread Jeremy Sowden
master was being initialized to a particular value and then having the same value assigned to it immediately afterwards. Removed the initializer. Since the value assigned to master was dynamically allocated, this fixes a memory-leak. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc

[PATCH 0/2] staging: kpc2000_spi: eliminated duplicate initialization of two local variables.

2019-04-27 Thread Jeremy Sowden
A couple of the local variables in kp_spi_probe had initializers which were being overwritten by immediate assignment of the same values. One of them was dynamically allocated and so would leak memory. Checkpatch whinges about the formatting, but fixing that would be rather a large job. Jeremy S

[PATCH 1/2] staging: kpc2000_spi: eliminated duplicate initialization of drvdata local variable.

2019-04-27 Thread Jeremy Sowden
drvdata was being initialized to a particular value and then having the same value assigned to it immediately afterwards. Removed the initializer. Since the value assigned, pldev->dev.platform_data, is a pointer-to- void, removed superfluous cast. Signed-off-by: Jeremy Sowden --- drivers/stagi

Re: [PATCH] staging: vc04_services: bcm2835-camera: Modify return statement.

2019-04-27 Thread Stefan Wahren
Am 27.04.19 um 18:07 schrieb Vatsala Narang: > Modify return statement and remove the respective assignment. > > Issue found by Coccinelle. > > Signed-off-by: Vatsala Narang Acked-by: Stefan Wahren ___ devel mailing list de...@linuxdriverproject.org htt

Re: [PATCH v3] Staging: vc04_services: Cleanup in ctrl_set_bitrate()

2019-04-27 Thread Stefan Wahren
Am 23.04.19 um 16:47 schrieb Madhumitha Prabakaran: > Remove unnecessary variable from the function and make a corresponding > change w.r.t the variable. In addition to that align the parameters in > the parentheses to maintain Linux kernel coding style > > Issue suggested by Coccinelle. > > Signed

[PATCH] staging: fieldbus: anybus-s: force endiannes annotation

2019-04-27 Thread Nicholas Mc Guire
While the endiannes is being handled correctly sparse was unhappy with the missing annotation as be16_to_cpu() expects a __be16. Signed-off-by: Nicholas Mc Guire --- Problem reported by sparse As far as I understand sparse here the __force is actually the only solution possible to inform spar

[PATCH V2] staging: fieldbus: anybus-s: consolidate wait_for_completion_timeout return handling

2019-04-27 Thread Nicholas Mc Guire
wait_for_completion_timeout() returns unsigned long (0 on timeout or remaining jiffies) not int - so rather than introducing an additional variable simply wrap the completion into an if(). Signed-off-by: Nicholas Mc Guire --- Problem located with experimental API conformance checking cocci scrip