Re: [PATCH v2] staging: wilc1000: Remove unnecessary braces {} around single statement block

2018-04-12 Thread Claudiu Beznea
On 12.04.2018 10:59, Eyal Ilsar wrote: > Remove unnecessary braces {} around an 'if' statement block with a single > statement. Issue found by checkpatch. > > Signed-off-by: Eyal Ilsar Reviewed-by: Claudiu Beznea > --- > Added an empty line

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Lorenzo Pieralisi
On Thu, Apr 12, 2018 at 02:44:42AM +, Sridhar Pitchai wrote: > When Linux runs as a guest VM in Hyper-V and Hyper-V adds the virtual PCI > bus to the guest, Hyper-V always provides unique PCI domain. > > commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain") > overrode unique

Re: [PATCH] staging: wilc1000: Remove unnecessary braces {} around single statement block

2018-04-12 Thread Claudiu Beznea
On 10.04.2018 17:49, Eyal Ilsar wrote: > Remove unnecessary braces {} around an 'if' statement block with a single > statement. Issue found by checkpatch. You should add an empty line before "Signed-off" line as stated in [1]. I would also add a space b/w your name and your email in Signed-off

[PATCH v2] staging: wilc1000: Remove unnecessary braces {} around single statement block

2018-04-12 Thread Eyal Ilsar
Remove unnecessary braces {} around an 'if' statement block with a single statement. Issue found by checkpatch. Signed-off-by: Eyal Ilsar --- Added an empty line before the 'Signed-off-by' line and a space between the name and e-mail address within that line.

[PATCH] staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc_resp_info()

2018-04-12 Thread Ajay Singh
Commit fe014d4e6b55 (staging: wilc1000: free memory allocated for general info message from firmware) introduced a bug by using wrong source address in kmemdup(). 'conn_info.req_ies' is used for source address in kempdup() instead of 'hif_drv->usr_conn_req.ies'. This commit fixes the NULL pointer

[PATCH] staging: ks7010_sdio: fix NULL pointer dereference and memory leak

2018-04-12 Thread Gustavo A. R. Silva
priv is being dereferenced when it is still null, hence there is an explicit null pointer dereference at line 935: free_netdev(priv->net_dev) Also, memory allocated for netdev at line 854: netdev = alloc_etherdev(sizeof(*priv)); is not being free'd, hence there is a memory leak. Fix this by null

[PATCH][next] staging: ks7010: fix null pointer dereference on priv on error exit

2018-04-12 Thread Colin King
From: Colin Ian King In the case where the call to dev_alloc_name fails the current exit path is via err_free_netdev and this calls free_netdev on a null priv pointer, hence causing a null pointer dereference. Fix this by instead exiting via err_release_irq. Detected

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Bjorn Helgaas
On Thu, Apr 12, 2018 at 10:17:42AM +0100, Lorenzo Pieralisi wrote: > On Thu, Apr 12, 2018 at 02:44:42AM +, Sridhar Pitchai wrote: > > When Linux runs as a guest VM in Hyper-V and Hyper-V adds the virtual PCI > > bus to the guest, Hyper-V always provides unique PCI domain. > > > > commit

[PATCH 03/14] staging: ks7010: delete not used definitions in ks7010_sdio source

2018-04-12 Thread Sergio Paracuellos
This commit removes two definitions inside ks7010_sdio source file because they are not being used at all. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH 04/14] staging: ks7010: add REG suffix to sdio register definitions

2018-04-12 Thread Sergio Paracuellos
This commit adds REG suffix to register definitions related with SDIO in order to improve readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 96 ++-- 1 file changed, 48 insertions(+), 48

[PATCH 10/14] staging: ks7010: check sdio_set_block_size return value

2018-04-12 Thread Sergio Paracuellos
This commit checks sdio_set_block_size function return value. If it fails abort driver initialization. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 08/14] staging: ks7010: move MODULE_DEVICE_TABLE related code

2018-04-12 Thread Sergio Paracuellos
This commit moves MODULE_DEVICE_TABLE related code to the end of the file. This is not necessary at all but moving it just before its use improves readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 14 +++--- 1 file

[PATCH 07/14] staging: ks7010: avoid one extra level indentation in ks_wlan_hw_rx function

2018-04-12 Thread Sergio Paracuellos
This commit use an and operator in a if condition to avoid one indentation level which is not needed at all. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

[PATCH 05/14] staging: ks7010: review comment style in ks7010_sdio source file

2018-04-12 Thread Sergio Paracuellos
This commit reviews comment style used in ks7010_sdio source file in order to be coherent with the rest of the code. Most comments in this source are before definitions but only two of them have been written at the right. So, be coherent moving this two to the top of definitions. Also fix one

[PATCH 06/14] staging: ks7010: review debug and error messages in ks7010_sdio source

2018-04-12 Thread Sergio Paracuellos
This commit reviews debug and error messages in code located in ks7010_sdio source file avoiding to use 'error' or 'ks7010' because this file is using netdev_* functions and has non sense to repeat information in log messages. Signed-off-by: Sergio Paracuellos ---

[PATCH 11/14] staging: ks7010: fix error paths in ks7010_sdio_remove function

2018-04-12 Thread Sergio Paracuellos
This commit reviews and fixes error paths in ks7010_sdio_remove driver function. It change logic to handle error directly after priv dereference to avoid one level indentation. It also removes a temporal netdev variable which wasn't being used in all of the function calls. Also if

[PATCH 00/14] cleanups continue

2018-04-12 Thread Sergio Paracuellos
The following series makes new cleanups for ks7010 SDIO related code. All of these needs the previous sent patch series to be applied before. Sergio Paracuellos (14): staging: ks7010: move ROM_FILE definition into source file staging: ks7010: move sdio specific register definitions into

[PATCH 02/14] staging: ks7010: move sdio specific register definitions into source file

2018-04-12 Thread Sergio Paracuellos
This commit moves SDIO related register definitions from header to source file. There is no need to have those into the header because they are only being used in specific SDIO code. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 72

[PATCH 01/14] staging: ks7010: move ROM_FILE definition into source file

2018-04-12 Thread Sergio Paracuellos
This commit moves ROM_FILE from header to source file because there is not being used outside this. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 1 + drivers/staging/ks7010/ks7010_sdio.h | 2 -- 2 files changed, 1 insertion(+), 2

[PATCH v2] staging: ks7010_sdio: fix memory leak

2018-04-12 Thread Gustavo A. R. Silva
Memory allocated for netdev at line 854: netdev = alloc_etherdev(sizeof(*priv)); is not being free'd before return, hence there is a memory leak. Fix this by freeing netdev before return. Addresses-Coverity-ID: 1467844 Signed-off-by: Gustavo A. R. Silva --- Changes in

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Lorenzo Pieralisi
On Thu, Apr 12, 2018 at 03:56:42PM +, Sridhar Pitchai wrote: > > > > >> I am still not happy with this patch. > > >> > > >> - You do not explain at all the dependency on commit > 0c195567a8f6 and > > >>you should because that's fundamental, if that

Re: [PATCH] staging: ks7010_sdio: fix NULL pointer dereference and memory leak

2018-04-12 Thread Gustavo A. R. Silva
Hi Dan, On 04/12/2018 10:08 AM, Dan Carpenter wrote: I added Colin to the Cc list. On Thu, Apr 12, 2018 at 09:30:09AM -0500, Gustavo A. R. Silva wrote: priv is being dereferenced when it is still null, hence there is an explicit null pointer dereference at line 935: free_netdev(priv->net_dev)

[PATCH v3] staging: ks7010_sdio: fix NULL pointer dereference and memory leak

2018-04-12 Thread Gustavo A. R. Silva
priv is being explicitly dereferenced when it is still null, when jumping to goto label err_free_netdev, before it is properly updated with a valid memory address. Also, when this happens, memory allocated for netdev at line 854: netdev = alloc_etherdev(sizeof(*priv)) is not being free'd before

Re: [PATCH 08/15] ASoC: pxa: remove the dmaengine compat need

2018-04-12 Thread Robert Jarzmik
Mark Brown writes: > On Mon, Apr 02, 2018 at 04:26:49PM +0200, Robert Jarzmik wrote: >> As the pxa architecture switched towards the dmaengine slave map, the >> old compatibility mechanism to acquire the dma requestor line number and >> priority are not needed anymore. > >

RE: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Haiyang Zhang
> -Original Message- > From: Sridhar Pitchai > Sent: Thursday, April 12, 2018 11:14 AM > To: Bjorn Helgaas ; Lorenzo Pieralisi > > Cc: Haiyang Zhang ; Dexuan Cui > ; Stephen Hemminger

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-04-12 Thread Valentin Vidic
On Sun, Apr 08, 2018 at 05:22:46PM +0200, Marcus Wolf wrote: > Regarding your patch, I did not understand, why you did not remove > the mutex_lock in pi433_write. Wasn't it the goal to remove it? Is it possible for more than one userspace program to open the pi433 device and send messages? In

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Sridhar Pitchai
> > >> I am still not happy with this patch. > >> > >> - You do not explain at all the dependency on commit 0c195567a8f6 and > >>you should because that's fundamental, if that patch is not present > >>this revert breaks the kernel as per

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-04-12 Thread Valentin Vidic
On Sun, Apr 08, 2018 at 04:15:30PM +0200, Marcus Wolf wrote: > The hardware of Pi433 is working with every Raspberry Pi (on zero, you > need to solder the GPIO-pins) and with several other fruits like banana > pi. The only thing is, that you need different versions of the driver, > according to

[PATCH 12/14] staging: ks7010: use u8 instead of unsigned char for firmware buffers

2018-04-12 Thread Sergio Paracuellos
This commit replaces type unsigned char which is the one which is being used for firmware buffers with u8 type which is preferred. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 14/14] staging: ks7010: use linux circular buffer header macros to handle tx and rx queues

2018-04-12 Thread Sergio Paracuellos
This commit replace current custom implementation of some circular buffer head and tail logic in favour of the use of macros defined in linux circ_buf.h header. It also review internal names and adds a new CIRC_INC macro to make code more readable. Note also that CIRC_INC does not need to go

[PATCH 13/14] staging: ks7010: assign dev_alloc_name() result to variable before check it

2018-04-12 Thread Sergio Paracuellos
This commit assigns dev_alloc_name() call to 'ret' variable to check it after instead of check directly the call in the if condition. This improves a bit readability. It also add an empty line before the new assignment to separate it from the previous check statement block. Signed-off-by: Sergio

[PATCH 09/14] staging: ks7010: replace create_workqueue with alloc_workqueue

2018-04-12 Thread Sergio Paracuellos
This commit replaces deprecated create_workqueue call with the alloc_workqueue one which is the one to be used now for this purpose. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Chargen-Nr .: ES67189098011 / 245679

2018-04-12 Thread Ana Lisa SANCHEZ
Plaza Romano N°19 Planta 5 28011 Madrid, Spain. DATUM: 12.04.2018 INTERNATIONALES SUPER DRAW-PROGRAMM. Promotions / Preisverleihung dept Chargen-Nr .:

Re: [PATCH] staging: comedi: cb_pcidas64: fix alignment of function parameters

2018-04-12 Thread Gabriel Francisco Mandaji
On Wed, Apr 11, 2018 at 10:18:38AM +0100, Ian Abbott wrote: > On 10/04/18 23:50, Gabriel Francisco Mandaji wrote: > >Fix most checkpatch.pl issues of type: > > > >CHECK: Alignment should match open parenthesis > >--- > Looks good, thanks. I guess the remaining case of open parentheses > alignment

[PATCH] staging fbtft: Fixed lines exceeding columns limit

2018-04-12 Thread Renato Soma
Fix checkpatch.pl warnings of line sizes exceeding 80 columns. Break lines in order to reduce the instructions lengths to less than 80 columns. Signed-off-by: Renato Soma --- drivers/staging/fbtft/fbtft-bus.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH v2] staging: Android: Add 'vsoc' driver for cuttlefish.

2018-04-12 Thread Alistair Strachan
From: Greg Hartman The cuttlefish system is a virtual SoC architecture based on QEMU. It uses the QEMU ivshmem feature to share memory regions between guest and host with a custom protocol. Cc: Greg Kroah-Hartman Cc: Arve Hjønnevåg

Re: [PATCH] staging: ks7010_sdio: fix NULL pointer dereference and memory leak

2018-04-12 Thread Dan Carpenter
I added Colin to the Cc list. On Thu, Apr 12, 2018 at 09:30:09AM -0500, Gustavo A. R. Silva wrote: > priv is being dereferenced when it is still null, hence there is an > explicit null pointer dereference at line 935: free_netdev(priv->net_dev) > > Also, memory allocated for netdev at line 854:

Re: [PATCH][next] staging: ks7010: fix null pointer dereference on priv on error exit

2018-04-12 Thread Dan Carpenter
This isn't right. It introduces a leak. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Sridhar Pitchai
>> I am still not happy with this patch. >> >> - You do not explain at all the dependency on commit 0c195567a8f6 and >>you should because that's fundamental, if that patch is not present >>this revert breaks the kernel as per previous discussions[1]. >> - You are

Re: [PATCH][next] staging: ks7010: fix null pointer dereference on priv on error exit

2018-04-12 Thread Colin Ian King
On 12/04/18 16:12, Dan Carpenter wrote: > This isn't right. It introduces a leak. Yup, and I see Gustavo is working on a correct fix, I'll leave that to him. > > regards, > dan carpenter > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a

[PATCH 04/17] media: staging: atomisp: fix string comparation logic

2018-04-12 Thread Mauro Carvalho Chehab
it makes no sense to use strncmp() with a size with is bigger than the string we're comparing with. Fix those warnings: drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c:776 atomisp_open() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32)

[PATCH 12/17] media: staging: atomisp: add missing include

2018-04-12 Thread Mauro Carvalho Chehab
There are two functions used externally: drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:866:6: warning: symbol 'atomisp_do_compat_ioctl' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:1110:6:

[PATCH 11/17] media: atomisp: compat32: use get_user() before referencing user data

2018-04-12 Thread Mauro Carvalho Chehab
The logic at get_atomisp_parameters32() is broken, as pointed by smatch: drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:737:21: warning: dereference of noderef expression drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:744:60: warning:

[PATCH 02/17] media: staging: atomisp: don't declare the same vars as both private and public

2018-04-12 Thread Mauro Carvalho Chehab
The mmu_private.h header is included at mmu.c, with duplicates the already existing definitions at mmu_public.h. Fix this by removing the erroneous header file. Solve those issues: drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h:24:26: warning:

[PATCH 14/17] media: atomisp: get rid of a warning

2018-04-12 Thread Mauro Carvalho Chehab
On smatch, this warning is trigged: drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c:324 __bo_take_off_handling() error: we previously assumed 'bo->prev' could be null (see line 314) Because it can't properly analize the truth table for the above function. So, add an explicit

[PATCH 13/17] media: atomisp: compat32: fix __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
The __user annotations at the compat32 code is not right: drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:81:18: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:81:18: expected void

[PATCH 01/17] media: staging: atomisp: fix number conversion

2018-04-12 Thread Mauro Carvalho Chehab
smatch says that there's an issue with number conversion: drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4154 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)' 4294959104 can't fit into 32767 'converted_macc_table.data[idx]'

[PATCH 08/17] atomisp: remove an impossible condition

2018-04-12 Thread Mauro Carvalho Chehab
Changeset dc9f65cf9aea ("media: staging: atomisp: avoid a warning if 32 bits build") was meant to solve an impossible condition when building with 32 bits. It turns that this impossible condition also happens wit 64 bits:

[PATCH 03/17] media: atomisp: fix __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
There are lots of troubles with atomisp __user annotations. Fix them. drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:357:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:357:49:expected void *userptr

Re: [PATCH 08/15] ASoC: pxa: remove the dmaengine compat need

2018-04-12 Thread Mark Brown
On Mon, Apr 02, 2018 at 04:26:49PM +0200, Robert Jarzmik wrote: > As the pxa architecture switched towards the dmaengine slave map, the > old compatibility mechanism to acquire the dma requestor line number and > priority are not needed anymore. Acked-by: Mark Brown If