Re: [PATCH] staging: greybus: loopback: Enclose multiple macro statements in do-while loop

2017-07-18 Thread karthik
On Tuesday 18 July 2017 04:41 PM, Bryan O'Donoghue wrote: On 18/07/17 11:56, kart...@techveda.org wrote: From: Karthik Tummala Enclosed multiple macro statements in a do - while loop as per kernel coding standard, pointed by checkpatch. Signed-off-by: Karthik Tummala --- drivers/staging/gr

CONGRATULATIONS

2017-07-18 Thread FROM SAMSUNG
CONGRATULATIONS YOUR MOBILE NUMBER WON 500,000 CASH FROM SAMSUNG PROMO CLAIMS SEND YOUR. NAME MOBILE NO AGE SEX ADDS REPLY TO: deptsamsung06@hotmail.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailm

[PATCH 2/2] Staging: pi433: check error after kthread_run()

2017-07-18 Thread Joseph Wright
Error should be checked with IS_ERR after calling kthread_run() instead of comparing the returned pointer to an int. Found by sparse warning: incompatible types for operation (<) left side has type struct task_struct *tx_task_struct right side has type int Signed-off-by: Joseph Wright -

[PATCH 0/2] Staging: pi433: fix sparse warnings

2017-07-18 Thread Joseph Wright
Two patches included to fix warnings found with sparse. Joseph Wright (2): Staging: pi433: declare functions static Staging: pi433: check error after kthread_run() drivers/staging/pi433/pi433_if.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.3 ___

[PATCH 1/2] Staging: pi433: declare functions static

2017-07-18 Thread Joseph Wright
Declare functions static to fix sparse warnings: warning: symbol 'pi433_receive' was not declared. Should it be static? warning: symbol 'pi433_tx_thread' was not declared. Should it be static? Signed-off-by: Joseph Wright --- drivers/staging/pi433/pi433_if.c | 4 ++-- 1 file changed, 2 insertio

[PATCH v3 3/3] staging: gs_fpgaboot: return valid error codes

2017-07-18 Thread Jacob von Chorus
The return values on error are modified to be valid error codes. Theses error codes are propagated back to the init function's return. Signed-off-by: Jacob von Chorus --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/

[PATCH v3 2/3] staging: gs_fpgaboot: change char to u8

2017-07-18 Thread Jacob von Chorus
The bitstream storage variables were changed from char to u8 arrays to prevent issues such as negative lengths. This change makes the code compatible with the "data" field in "struct firmware" which is of type u8. Signed-off-by: Jacob von Chorus v3: - reduce temporary buffer size in bitstream re

[PATCH v3 1/3] staging: gs_fpgaboot: add buffer overflow checks

2017-07-18 Thread Jacob von Chorus
Four fields in struct fpgaimage are char arrays of length MAX_STR (256). The amount of data read into these buffers is controlled by a length field in the bitstream file read from userspace. If a corrupt or malicious firmware file was supplied, kernel data beyond these buffers can be overwritten ar

[PATCH] staging: fsl-mc: Convert to using %pOF instead of full_name

2017-07-18 Thread Rob Herring
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring Cc: Stuart Yoder Cc: Laurentiu Tudor Cc: Greg Kroah-Hartman Cc: de...@driverdev.osuosl.org

[PATCH 5/6] staging: ccree: Fix alignment issues in ssi_ivgen.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström --- drivers/staging/ccree/ssi_ivgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_ivgen.c b/drivers/staging/ccree/ssi_ivgen.c index f140dbc5195c..86364f81acab 100644 --- a/

[PATCH 6/6] staging: ccree: Fix alignment issues in ssi_request_mgr.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström --- drivers/staging/ccree/ssi_request_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index 3f39150cda4f..2eda82f

[PATCH 4/6] staging: ccree: Fix alignment issues in ssi_cipher.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström --- drivers/staging/ccree/ssi_cipher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index bfe9b1ccbf37..aec7c1480336 100644 ---

[PATCH 2/6] staging: ccree: Fix alignment issues in ssi_hash.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström --- drivers/staging/ccree/ssi_hash.c | 105 +-- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index fba

[PATCH 1/6] staging: ccree: Fix alignment issues in ssi_aead.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström --- drivers/staging/ccree/ssi_aead.c | 47 +--- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index ea2

[PATCH 3/6] staging: ccree: Fix alignment issues in ssi_buffer_mgr.c

2017-07-18 Thread Simon Sandström
Fixes checkpatch.pl alignment warnings. Signed-off-by: Simon Sandström --- drivers/staging/ccree/ssi_buffer_mgr.c | 40 -- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mg

[PATCH 0/6] Fix additional alignment issues in staging/ccree

2017-07-18 Thread Simon Sandström
Here are a few more patches that fixes alignment issues in staging/ccree. Includes the patches that I sent previously which could not be applied plus a few more fixes for issues that I found. These patches should fix all remaining alignment warnings reported by checkpatch.pl in staging/ccree. - Si

Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export

2017-07-18 Thread Okash Khawaja
On Tue, Jul 18, 2017 at 03:26:37PM +0300, Dan Carpenter wrote: > > + if (tty) { > > + /* drop kref from tty_driver_lookup_tty() */ > > + tty_kref_put(tty); > > + tty = ERR_PTR(-EBUSY); > > + } else { /* tty_init_dev returns tty with the tty_lock

[PATCH v2] staging: wlan-ng: Fix endianness warnings

2017-07-18 Thread Alfonso Lima Astor
These variables were set to u16 and u32 although they always hold a little endian value. This patch fixes multiple sparse warnings like: drivers/staging/wlan-ng/prism2sta.c:375:46: warning: cast to restricted __le16 Signed-off-by: Alfonso Lima Astor --- v2: Resubmit patch that wouldn't appl

Re: [PATCH v2 0/7] staging: fsl-mc: make the driver compile on other architectures

2017-07-18 Thread Laurentiu Tudor
Hi Arnd, On 07/18/2017 05:26 PM, Arnd Bergmann wrote: > On Tue, Jul 18, 2017 at 3:37 PM, wrote: >> From: Laurentiu Tudor >> >> Apart from a small change (first patch) which adds a missing comment, >> this series make the bus driver compile on other architectures, as per >> GregKH comment [1]. >

[PATCH] staging: rtl8723bs: rtw_efuse: Fix a misspell

2017-07-18 Thread Xaralampos Mainas
Fix a comment misspell Signed-off-by: Xaralampos Mainas --- drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c index 8e29802..44b92ef 100644 --- a/

Re: [PATCH v3 1/1] Staging: android/ion: declare function static

2017-07-18 Thread Joseph Wright
On Tue, Jul 18, 2017 at 08:58:22AM +0200, Greg KH wrote: > On Sat, Jul 15, 2017 at 11:43:05AM +, Joseph Wright wrote: > > Declare private function static to fix sparse warning: > > > > ion_cma_heap.c:109:5: warning: symbol '__ion_add_cma_heaps' \ > > was not declared. Should it be static?

Re: [PATCH v2 8/8] staging: fsl-mc: allow the driver compile multi-arch

2017-07-18 Thread Laurentiu Tudor
Hi Arnd, On 07/18/2017 05:25 PM, Arnd Bergmann wrote: > On Tue, Jul 18, 2017 at 3:37 PM, wrote: > >> --- a/drivers/staging/fsl-dpaa2/Kconfig >> +++ b/drivers/staging/fsl-dpaa2/Kconfig >> @@ -4,7 +4,7 @@ >> >> config FSL_DPAA2 >> bool "Freescale DPAA2 devices" >> - depends on FSL

Re: [PATCH 4/4] staging: wlan-ng: prism2sta: Use 'in situ' endian conversions in 'prism2sta_inf_chinforesults()'

2017-07-18 Thread Ricardo Silva
Hello Dan, On 07/18/2017 02:52 PM, Dan Carpenter wrote: > No no no no no no... Don't change them in place for no reason just > because it doesn't cause a bug. It's better to just cast away the > warnings except we're going to automatically NAK that patch as well... > But this is even worse. >

[PATCH] staging: goldfish: Use __func__ instead of function name

2017-07-18 Thread Chris Coffey
Replace hard-coded function names in strings with "%s", __func__ in the goldfish_nand.c file. Issue found by checkpatch.pl. Signed-off-by: Chris Coffey --- drivers/staging/goldfish/goldfish_nand.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/

Re: [PATCH v2 6/8] staging: fsl-mc: don't use raw device io functions

2017-07-18 Thread Laurentiu Tudor
Hi Arnd, On 07/18/2017 05:18 PM, Arnd Bergmann wrote: > On Tue, Jul 18, 2017 at 3:37 PM, wrote: >> From: Laurentiu Tudor >> >> As raw device io functions are not portable and don't handle byte-order >> (triggering suspicion that endianness isn't handled well) switch to >> using the standard api

Re: [PATCH v2 8/8] staging: fsl-mc: allow the driver compile multi-arch

2017-07-18 Thread Arnd Bergmann
On Tue, Jul 18, 2017 at 4:36 PM, Laurentiu Tudor wrote: > Good point, I'll take care of it. But don't you mean COMPILE_TEST be > added on the actual MC_BUS config, like so: > > config FSL_MC_BUS > bool "QorIQ DPAA2 fsl-mc bus driver" > - depends on OF && ARCH_LAYERSCAPE > +

Re: [PATCH v2 6/8] staging: fsl-mc: don't use raw device io functions

2017-07-18 Thread Arnd Bergmann
On Tue, Jul 18, 2017 at 4:26 PM, Laurentiu Tudor wrote: > > Maybe i made an error in my previous emails, but the hi-lo variant is > the correct one. The command execution is triggered when the _first_ > 32-bit half of the header (header&0x) is written, so that's why > it must be written la

Re: [PATCH v2 0/7] staging: fsl-mc: make the driver compile on other architectures

2017-07-18 Thread Arnd Bergmann
On Tue, Jul 18, 2017 at 3:37 PM, wrote: > From: Laurentiu Tudor > > Apart from a small change (first patch) which adds a missing comment, > this series make the bus driver compile on other architectures, as per > GregKH comment [1]. > Compiled tested on: > - booke powerpc (corenet{32,64}_smp_de

Re: [PATCH v2 8/8] staging: fsl-mc: allow the driver compile multi-arch

2017-07-18 Thread Arnd Bergmann
On Tue, Jul 18, 2017 at 3:37 PM, wrote: > --- a/drivers/staging/fsl-dpaa2/Kconfig > +++ b/drivers/staging/fsl-dpaa2/Kconfig > @@ -4,7 +4,7 @@ > > config FSL_DPAA2 > bool "Freescale DPAA2 devices" > - depends on FSL_MC_BUS > + depends on FSL_MC_BUS && ARCH_LAYERSCAPE >

Re: [PATCH v2 6/8] staging: fsl-mc: don't use raw device io functions

2017-07-18 Thread Arnd Bergmann
On Tue, Jul 18, 2017 at 3:37 PM, wrote: > From: Laurentiu Tudor > > As raw device io functions are not portable and don't handle byte-order > (triggering suspicion that endianness isn't handled well) switch to > using the standard api. > Since MC expects LE byte-order and the upper layers alread

Re: [PATCH 4/4] staging: wlan-ng: prism2sta: Use 'in situ' endian conversions in 'prism2sta_inf_chinforesults()'

2017-07-18 Thread Dan Carpenter
No no no no no no... Don't change them in place for no reason just because it doesn't cause a bug. It's better to just cast away the warnings except we're going to automatically NAK that patch as well... But this is even worse. regards, dan carpenter

Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export

2017-07-18 Thread Alan Cox
> The patch is untested but I can work on this if that fits in with the > plans for tty. I think this is the right direction. Alan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-de

[PATCH v2 8/8] staging: fsl-mc: allow the driver compile multi-arch

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64), thus leaving this driver compile on other architectures. Also, other drivers depending on the bus are updated to depend on ARCH_LAYERSCAPE until they'll also be made multi-arch. This was compiled tested on:

[PATCH v2 2/8] staging: fsl-mc: use generic memory barriers

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor No need to use arch-specific memory barriers; switch to using generic ones. The rmb()s were useless so drop them. Signed-off-by: Laurentiu Tudor --- Notes: -v2 -no changes drivers/staging/fsl-mc/bus/mc-sys.c | 6 ++ 1 file changed, 2 insertions(+), 4 deleti

[PATCH v2 3/8] staging: fsl-mc: drop useless gic v3 related #include

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor Nothing from linux/irqchip/arm-gic-v3.h is used, so the #include can be safely dropped. Signed-off-by: Laurentiu Tudor --- Notes: -v2 -no changes drivers/staging/fsl-mc/bus/fsl-mc-msi.c| 1 - drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.

[PATCH v2 7/8] staging: fsl-mc: make the driver compile on 32-bit

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor Since there's no real constrain in MC to do only atomic 64-bit we can enable this driver on 32-bit platforms too. Include linux/io-64-nonatomic-hi-lo.h to make quad device io apis used in the driver available on 32-bit platforms. Signed-off-by: Laurentiu Tudor --- Notes:

[PATCH v2 4/8] staging: fsl-mc: fix compilation with non-generic msi domain ops

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor The bus driver relies on generic msi domain ops. Fix compilation for architectures that don't provide it (e.g. x86_64). Signed-off-by: Laurentiu Tudor --- Notes: -v2 -no changes drivers/staging/fsl-mc/bus/fsl-mc-msi.c| 4 drivers/staging/fs

[PATCH v2 6/8] staging: fsl-mc: don't use raw device io functions

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor As raw device io functions are not portable and don't handle byte-order (triggering suspicion that endianness isn't handled well) switch to using the standard api. Since MC expects LE byte-order and the upper layers already take care of that, we need to trick the device io a

[PATCH v2 5/8] staging: fsl-mc: fix formating of phys_addr_t on 32 bits

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor Use correct format specifier for phys_addr_t variables (%pa) instead of %llx. This fixes these warnings on 32 bit targets: "format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'phys_addr_t' [-Wformat=]" Signed-off-by: Laurentiu Tudor

[PATCH v2 1/8] staging: fsl-mc: add missing fsl_mc comment in struct msi_desc

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor The mc-bus specific field, fsl_mc in struct msi_desc is missing its comment so add it. Signed-off-by: Laurentiu Tudor --- Notes: -v2 -no changes include/linux/msi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/msi.h b/include/linux/msi.h in

[PATCH v2 0/7] staging: fsl-mc: make the driver compile on other architectures

2017-07-18 Thread laurentiu.tudor
From: Laurentiu Tudor Apart from a small change (first patch) which adds a missing comment, this series make the bus driver compile on other architectures, as per GregKH comment [1]. Compiled tested on: - booke powerpc (corenet{32,64}_smp_defconfig) with this ppc patch [2] - x86 (i386_defconfig

Re: [PATCH] Staging: pi433: Coding style fixes

2017-07-18 Thread Greg KH
On Tue, Jul 18, 2017 at 02:41:33PM +0200, Simo Koskinen wrote: > Fixes if-statement related warning and errors reported > by checkpatch.pl > > Signed-off-by: Simo Koskinen > --- > drivers/staging/pi433/pi433_if.c | 253 > +-- > drivers/staging/pi433/rf69.c

[PATCH 4/4] staging: wlan-ng: prism2sta: Use 'in situ' endian conversions in 'prism2sta_inf_chinforesults()'

2017-07-18 Thread Ricardo Silva
Function 'prism2sta_inf_chinforesults()' decodes some little-endian 16-bit values from a received Channel Info Results info frame and stores them on the 'struct hfa384x' associated instance. To note that the structs and fields for storing both the little-endian (in info frame struct) and CPU byte

[PATCH 2/4] staging: wlan-ng: prism2sta: Use endian type in 'hfa384x_link_status' struct

2017-07-18 Thread Ricardo Silva
The 'linkstatus' field from struct 'hfa384x_link_status' represents a 16-bit little-endian integer, so declare it as such to avoid the following sparse warning when accessing it through the 'le16_to_cpu()' function: prism2sta.c:1450:31: warning: cast to restricted __le16 Signed-off-by: Ricardo S

[PATCH 3/4] staging: wlan-ng: prism2sta: Use endian type in 'hfa384x_ps_user_count' struct

2017-07-18 Thread Ricardo Silva
The 'usercnt' field from struct 'hfa384x_ps_user_count' represents a 16-bit little-endian integer, so declare it as such to avoid the following sparse warning when accessing it through the 'le16_to_cpu()' function: prism2sta.c:1727:27: warning: cast to restricted __le16 Signed-off-by: Ricardo Si

[PATCH 0/4] staging: wlan-ng: prism2sta: Fix sparse warnings (endian)

2017-07-18 Thread Ricardo Silva
This series intends to fix all sparse warnings left in 'prism2sta.c' from the 'wlan-ng' staging driver. Patch 1 fixes the fields declarations of 'struct hfa384x_comm_tallies_{16.32}' and the way they are accessed from 'prism2sta_inf_tallies()'. Patches 2 and 3 each fix a different struct field de

[PATCH 1/4] staging: wlan-ng: prism2sta: Use endian types in 'comm_tallies_{16, 32}' structs fields

2017-07-18 Thread Ricardo Silva
Fields from structures 'hfa384x_comm_tallies_16' and 'hfa384x_comm_tallies_32' represent little-endian integers (16-bit and 32-bit, respectively), so declare them as such in the containing structure and access them as such in the 'prism2sta_inf_tallies()' function. Fixes the following sparse warni

[PATCH 3/3][staging-next] staging: pi433: fix thread_run failure check

2017-07-18 Thread Colin King
From: Colin Ian King The check for thread_run failure is incorrect, use IS_ERR instead. Cleans up sparse error message: "error: incompatible types for operation (<)" Fixes: 874bcba65f9a ("staging: pi433: New driver") Signed-off-by: Colin Ian King --- drivers/staging/pi433/pi433_if.c | 3 +--

[PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static

2017-07-18 Thread Colin King
From: Colin Ian King The function rf69_set_bandwidth_intern is local to the source and do not need to be in global scope, so make it static. Also break overly wide line. Cleans up sparse warning: symbol 'update_share_count' was not declared. Should it be static? Signed-off-by: Colin Ian King -

[PATCH 1/3][staging-next] staging: pi433: Make a couple of functions static

2017-07-18 Thread Colin King
From: Colin Ian King The functions pi433_receive and pi433_tx_thread are local to the source and do not need to be in global scope, so make them static Cleans up sparse warnings: symbol 'pi433_receive' was not declared. Should it be static? symbol 'pi433_tx_thread' was not declared. Should it be

[PATCH] Staging: pi433: Coding style fixes

2017-07-18 Thread Simo Koskinen
Fixes if-statement related warning and errors reported by checkpatch.pl Signed-off-by: Simo Koskinen --- drivers/staging/pi433/pi433_if.c | 253 +-- drivers/staging/pi433/rf69.c | 69 ++- 2 files changed, 148 insertions(+), 174 deletions(-) diff

[PATCH v3 3/3] Staging: iio: adc: ad7280a.c: Fixed Macro argument reuse

2017-07-18 Thread Jaya Durga
CHECK: Macro argument reuse 'addr' - possible side-effects? convert AD7280A_DEVADDR to ad7280a_devaddr static function to fix checkpath check v3: small style changes Signed-off-by: Jaya Durga --- drivers/staging/iio/adc/ad7280a.c | 21 + 1 file changed, 13 insertions(+), 8

Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export

2017-07-18 Thread Dan Carpenter
On Tue, Jul 18, 2017 at 12:29:52PM +0100, Okash Khawaja wrote: > +struct tty_struct *tty_kopen(dev_t device) > +{ > + struct tty_struct *tty; > + struct tty_driver *driver = NULL; > + int index = -1; > + > + mutex_lock(&tty_mutex); > + driver = tty_lookup_driver(device

Re: [PATCH 6/7] staging: fsl-mc: rewrite mc command send/receive to work on 32-bits

2017-07-18 Thread Arnd Bergmann
On Tue, Jul 18, 2017 at 1:08 PM, Laurentiu Tudor wrote: > On 07/17/2017 06:00 PM, Arnd Bergmann wrote: >> Strictly speaking the __raw_writel() won't guarantee that the >> data is written as a single word, the compiler might decide to >> split it up into byte-sized writes if it believes the destin

Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export

2017-07-18 Thread Okash Khawaja
On Mon, Jul 17, 2017 at 11:04:38PM +0100, Alan Cox wrote: > > > Sure. I can fix the tty->count mismatch based on Alan's suggestion. However > > I don't understand why the exclusivity flag should belong to tty_port and > > not tty_struct. It will be good to know why. > > We are trying to move a

Re: [PATCH v2 3/3] Staging: iio: adc: ad7280a.c: Fixed Macro argument reuse

2017-07-18 Thread Dan Carpenter
On Tue, Jul 18, 2017 at 04:45:04PM +0530, Jaya Durga wrote: > CHECK: Macro argument reuse 'addr' - possible side-effects? > > convert AD7280A_DEVADDR to ad7280a_devaddr static function > to fix checkpath check > > Signed-off-by: Jaya Durga > --- Put a little changelog here: v2: small style cha

[PATCH v2 3/3] Staging: iio: adc: ad7280a.c: Fixed Macro argument reuse

2017-07-18 Thread Jaya Durga
CHECK: Macro argument reuse 'addr' - possible side-effects? convert AD7280A_DEVADDR to ad7280a_devaddr static function to fix checkpath check Signed-off-by: Jaya Durga --- drivers/staging/iio/adc/ad7280a.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git

Re: [BUG] drivers: staging: comedi: do not call blocking ops when !TASK_RUNNING; state=1

2017-07-18 Thread Ian Abbott
[Top-posting fixed. Please don't top-post!] On 17/07/17 19:14, Piotr Gregor wrote: On Mon, Jul 17, 2017 at 05:02:45PM +0100, Ian Abbott wrote: On 17/07/17 15:48, Piotr Gregor wrote: Calling blocking operations from wrong context. Kernel: Linux piotrpc 4.4.70-rt83 #1 SMP PREEMPT RT Thu Jul 13

Re: [PATCH] staging: greybus: loopback: Enclose multiple macro statements in do-while loop

2017-07-18 Thread Bryan O'Donoghue
On 18/07/17 11:56, kart...@techveda.org wrote: From: Karthik Tummala Enclosed multiple macro statements in a do - while loop as per kernel coding standard, pointed by checkpatch. Signed-off-by: Karthik Tummala --- drivers/staging/greybus/loopback.c | 10 ++ 1 file changed, 6 insert

Re: [PATCH 6/7] staging: fsl-mc: rewrite mc command send/receive to work on 32-bits

2017-07-18 Thread Laurentiu Tudor
On 07/17/2017 06:00 PM, Arnd Bergmann wrote: > On Mon, Jul 17, 2017 at 4:27 PM, Laurentiu Tudor > wrote: >> Hi Arnd, >> >> On 07/17/2017 04:45 PM, Arnd Bergmann wrote: >>> On Mon, Jul 17, 2017 at 3:26 PM, wrote: From: Laurentiu Tudor Split the 64-bit accesses in 32-bit accesses

Re: [PATCH] staging: greybus: loopback: Enclose multiple macro statements in do-while loop

2017-07-18 Thread Johan Hovold
On Tue, Jul 18, 2017 at 04:26:40PM +0530, kart...@techveda.org wrote: > From: Karthik Tummala > > Enclosed multiple macro statements in a do - while loop as per kernel > coding standard, pointed by checkpatch. \ > static DEVICE_ATTR

[PATCH v2 3/3] staging: ccree: Use platform_get_irq and devm_request_irq

2017-07-18 Thread sunil . m
as it seems redundant. (e) free_irq is not required any more, devm_request_irq() free's it on driver detach. (f) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh --- Changes for v2: - Rebased on top of next-20170718. --- Note: - Patch was tested and

[PATCH v2 1/3] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-18 Thread sunil . m
detach, otherwise it leads to a double free. (c) remove unnecessary blank lines. Signed-off-by: Suniel Mahesh --- Changes for v2: - Changes done as suggested by Greg-KH. - Rebased on top of next-20170718. --- Note: - Patch was tested and built(ARCH=arm) on next-20170718. No build issues

[PATCH v2 2/3] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-18 Thread sunil . m
region on driver detach. (d) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh --- Changes for v2: - format specifiers changed in log messages. - Rebased on top of next-20170718. --- Note: - Patch was tested and built(ARCH=arm) on next-20170718. No build

[PATCH] staging: greybus: loopback: Enclose multiple macro statements in do-while loop

2017-07-18 Thread karthik
From: Karthik Tummala Enclosed multiple macro statements in a do - while loop as per kernel coding standard, pointed by checkpatch. Signed-off-by: Karthik Tummala --- drivers/staging/greybus/loopback.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/stagi

Re: [PATCH 3/3] Staging: iio: adc: ad7280a.c: Fixed Macro argument reuse

2017-07-18 Thread Dan Carpenter
On Tue, Jul 18, 2017 at 03:17:52PM +0530, Jaya Durga wrote: > diff --git a/drivers/staging/iio/adc/ad7280a.c > b/drivers/staging/iio/adc/ad7280a.c > index d5ab83f..cb94b7f 100644 > --- a/drivers/staging/iio/adc/ad7280a.c > +++ b/drivers/staging/iio/adc/ad7280a.c > @@ -99,9 +99,12 @@ > #define AD7

[PATCH 3/3] Staging: iio: adc: ad7280a.c: Fixed Macro argument reuse

2017-07-18 Thread Jaya Durga
CHECK: Macro argument reuse 'addr' - possible side-effects? convert AD7280A_DEVADDR to inline function to fix checkpath check Signed-off-by: Jaya Durga --- drivers/staging/iio/adc/ad7280a.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/iio/adc/ad72

[PATCH] staging: fbtft: array underflow in fbtft_request_gpios_match()

2017-07-18 Thread Dan Carpenter
"val" can be negative, so we'd write before the start of the par->gpio.db[] array. Fixes: c296d5f9957c ("staging: fbtft: core support") Signed-off-by: Dan Carpenter diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index b742ee786615..6d0363deba61 100644 --- a

Re: [PATCH v2 1/2] staging: gs_fpgaboot: add buffer overflow checks

2017-07-18 Thread Dan Carpenter
On Mon, Jul 17, 2017 at 08:47:25PM -0400, Jacob von Chorus wrote: > -static void readinfo_bitstream(char *bitdata, char *buf, int *offset) > +static int readinfo_bitstream(char *bitdata, char *buf, int size, int > *offset) > { > char tbuf[64]; > s32 len; > @@ -59,9 +59,15 @@ static vo

Re: [PATCH 05/42] staging: unisys: visorinput: visorinput.c: Adjust whitespace usage

2017-07-18 Thread Dan Carpenter
I perhaps judged to early and harshly. This patchset is fine. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 29/42] staging: unisys: visorchipset: remove local_addr in handle_command

2017-07-18 Thread Dan Carpenter
On Mon, Jul 17, 2017 at 04:17:09PM -0400, David Kershner wrote: > + mapping = memremap(addr, bytes, MEMREMAP_WB); > + if (!mapping) > + goto err_finish_ctx; This goto is wrong. It calls parser_done(ctx) when it should just call kfree(ctx). The difference is that parser_done()

Re: [PATCH 05/42] staging: unisys: visorinput: visorinput.c: Adjust whitespace usage

2017-07-18 Thread Dan Carpenter
> @@ -324,11 +322,10 @@ setup_client_keyboard(void *devdata, /* opaque on > purpose */ > static struct input_dev * > setup_client_mouse(void *devdata /* opaque on purpose */) > { > - struct input_dev *visorinput_dev = NULL; > int xres, yres; > struct fb_info *fb0; > + struc

[PATCH v4] staging: unisys: visorbus: Constify attribute_group structures.

2017-07-18 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- Changes in v2: Change log typo was not correct. Changes in v3:

Re: [PATCH v3] staging: unisys: visorbus: Constify attribute_group structures.

2017-07-18 Thread Arvind Yadav
Hi Greg, On Tuesday 18 July 2017 01:30 PM, Greg KH wrote: On Tue, Jul 18, 2017 at 01:24:42PM +0530, Arvind Yadav wrote: attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs a

Re: [PATCH v3] staging: unisys: visorbus: Constify attribute_group structures.

2017-07-18 Thread Greg KH
On Tue, Jul 18, 2017 at 01:24:42PM +0530, Arvind Yadav wrote: > attribute_group are not supposed to change at runtime. All functions > working with attribute_group provided by work > with const attribute_group. So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > driv

Re: [PATCH] staging: gs_fpgaboot: add buffer overflow checks

2017-07-18 Thread Dan Carpenter
On Mon, Jul 17, 2017 at 08:21:20PM -0400, Jacob von Chorus wrote: > On Mon, Jul 17, 2017 at 10:53:25PM +0300, Dan Carpenter wrote: > > > + if (len + 1 > n) { > > > > It's more idiomatic to say "if (len >= n)". Plus that's a good habbit > > My reasoning behind using "((len + 1) > n)" is that len

[PATCH v3] staging: unisys: visorbus: Constify attribute_group structures.

2017-07-18 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- drivers/staging/unisys

[PATCH 2/2] Staging: iio: light: tsl2x7x_core.c: Replace symbolic permission with octal permission

2017-07-18 Thread Jaya Durga
Replace symbolic permissions with their octect representation to fix checkpatch warnings. Signed-off-by: Jaya Durga --- drivers/staging/iio/light/tsl2x7x_core.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/

Re: [PATCH v2 1/2] staging: gs_fpgaboot: add buffer overflow checks

2017-07-18 Thread Greg Kroah-Hartman
On Mon, Jul 17, 2017 at 08:47:25PM -0400, Jacob von Chorus wrote: > Four fields in struct fpgaimage are char arrays of length MAX_STR (256). > The amount of data read into these buffers is controlled by a length > field in the bitstream file read from userspace. If a corrupt or > malicious firmware