[PATCH][next] staging: rtl8188eu: Replace one-element array with flexible-array in struct ndis_802_11_var_ie

2021-03-03 Thread Gustavo A. R. Silva
~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Signed-off-by: Gustavo A. R. Silva --- drivers/

Re: [PATCH 1/2] staging: rtl8192e: Pass array value to memcpy instead of struct pointer

2021-02-20 Thread Gustavo A. R. Silva
On 2/20/21 12:21, Atul Gopinathan wrote: > The variable "info_element" is of the following type: > struct rtllib_info_element *info_element > > rtllib_info_element is a struct containing the following fields as > defined in drivers/staging/rtl8192e/rtllib.h: > > struct rtllib_info_element { >

Re: [PATCH][next] staging: rtl8723bs: Replace one-element array with flexible-array member in struct ndis_80211_var_ie

2021-02-11 Thread Gustavo A. R. Silva
On 2/11/21 05:06, Dan Carpenter wrote: > On Wed, Feb 10, 2021 at 04:49:37PM -0600, Gustavo A. R. Silva wrote: >> There is a regular need in the kernel to provide a way to declare having >> a dynamically sized set of trailing elements in a structure. Kernel code >> should

[PATCH][next] staging: rtl8723bs: Replace one-element array with flexible-array member in struct ndis_80211_var_ie

2021-02-10 Thread Gustavo A. R. Silva
https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/602434b8.jc5doxj0bmhoxgil%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/staging/rtl8723bs/include/wlan_bssdef.h | 2 +- 1

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-12-01 Thread Gustavo A. R. Silva
On Tue, Dec 01, 2020 at 12:52:27AM -0500, Martin K. Petersen wrote: > > Gustavo, > > > This series aims to fix almost all remaining fall-through warnings in > > order to enable -Wimplicit-fallthrough for Clang. > > Applied 20-22,54,120-124 to 5.11/scsi-staging, thanks. Awesome! :) Thanks,

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-24 Thread Gustavo A. R. Silva
On Mon, Nov 23, 2020 at 08:38:46PM +, Mark Brown wrote: > On Fri, 20 Nov 2020 12:21:39 -0600, Gustavo A. R. Silva wrote: > > This series aims to fix almost all remaining fall-through warnings in > > order to enable -Wimplicit-fallthrough for Clang. > > > > In prepa

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-24 Thread Gustavo A. R. Silva
On Mon, Nov 23, 2020 at 04:03:45PM -0400, Jason Gunthorpe wrote: > On Fri, Nov 20, 2020 at 12:21:39PM -0600, Gustavo A. R. Silva wrote: > > > IB/hfi1: Fix fall-through warnings for Clang > > IB/mlx4: Fix fall-through warnings for Clang > > IB/qedr: Fix fall-th

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
Hi, On 11/20/20 12:53, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: >> This series aims to fix almost all remaining fall-through warnings in >> order to enable -Wimplicit-fallthrough for Clang. >> >> In preparation to en

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
On 11/20/20 12:28, Joe Perches wrote: > On Fri, 2020-11-20 at 12:21 -0600, Gustavo A. R. Silva wrote: >> Hi all, >> >> This series aims to fix almost all remaining fall-through warnings in >> order to enable -Wimplicit-fallthrough for Clang. >> >> In prepa

[PATCH 128/141] staging: vt6656: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/staging/vt6656/main_usb.c | 1

[PATCH 127/141] staging: qlge: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/staging/qlge/qlge_main.c | 1

[PATCH 094/141] media: atomisp: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/staging/media/atomisp/pci

[PATCH 024/141] staging: vt6655: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH 023/141] staging: rtl8723bs: core: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
cc.gnu.org/bugzilla/show_bug.cgi?id=91432 [4] https://godbolt.org/z/xgkvIh [5] commit a035d552a93b ("Makefile: Globally enable fall-through warning") [6] commit 4169e889e588 ("include: jhash/signal: Fix fall-through warnings for Clang") Thanks! Gustavo A. R. Silva (141):

Re: [PATCH v2] staging: atomisp: Remove unnecessary 'fallthrough'

2020-08-31 Thread Gustavo A. R. Silva
On Mon, Aug 31, 2020 at 04:51:04PM +0300, Cengiz Can wrote: > commit df561f6688fe ("treewide: Use fallthrough pseudo-keyword") from > Gustavo A. R. Silva replaced and standardized /* fallthrough */ comments > with 'fallthrough' pseudo-keyword. > > However, in one of t

[PATCH][next] staging: wfx: Use flex_array_size() helper in memcpy()

2020-07-29 Thread Gustavo A. R. Silva
. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/wfx/hif_tx_mib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 1689cb42acc0..05f1e1e98af9 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers

[PATCH][next] staging: rtl8192e: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH][next] staging: gdm724x: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH][next] staging: rtl8723bs: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH][next] staging: ks7010: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH][next] staging: rtl8712: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH][next] staging: comedi: s526: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH][next] staging: qlge: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging

[PATCH][next] staging: vc04_services: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging

Re: [PATCH] staging: rtl8723bs: core: Using comparison to true is error prone

2020-07-10 Thread Gustavo A. R. Silva
On 7/10/20 15:16, John Oldman wrote: > clear below issues reported by checkpatch.pl: > > CHECK: Using comparison to true is error prone > > Signed-off-by: John Oldman > --- > drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >

[PATCH] staging: rts5208: Assign array_size() to a variable

2020-07-10 Thread Gustavo A. R. Silva
Assign array_size() to variable _size_ and use it in multiple places. This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva --- drivers/staging/rts5208/rtsx_chip.c | 12

[PATCH] staging: vt6655: Use fallthrough pseudo-keyword

2020-07-07 Thread Gustavo A. R. Silva
-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging/vt6655/channel.c |2 +- drivers/staging/vt6655/key.c |6 +++--- drivers/staging/vt6656/channel.c |2 +- drivers/staging/vt6656/key.c |2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH] staging: rtl8188eu: Use fallthrough pseudo-keyword

2020-07-07 Thread Gustavo A. R. Silva
-fall-through Signed-off-by: Gustavo A. R. Silva --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c|2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c |2 +- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v2][next] staging: rts5208: Use array_size() helper in vmalloc() and memset()

2020-06-16 Thread Gustavo A. R. Silva
/issues/83 Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Fix subject line and commit message. Previously, part of the subject line, unintentionally, sneaked into the commit message. drivers/staging/rts5208/ms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH][next] staging: rts5208: Use array_size() helper in vmalloc()

2020-06-16 Thread Gustavo A. R. Silva
On Tue, Jun 16, 2020 at 01:13:12PM +0300, Dan Carpenter wrote: > On Mon, Jun 15, 2020 at 06:08:11PM -0500, Gustavo A. R. Silva wrote: > > and memset() > > Please don't start the commit message in the middle of a sentence. It's > That was, certainly, unintentional. Thanks f

[PATCH][next] staging: rts5208: Use array_size() helper in vmalloc()

2020-06-15 Thread Gustavo A. R. Silva
://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva --- drivers/staging/rts5208/ms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c index d53dd138a356..9001570a8c94 100644 --- a/drivers/staging/rts5208

Re: [PATCH] staging: qlge: add braces on all arms of if-else

2020-02-21 Thread Gustavo A. R. Silva
On 2/21/20 14:29, Kaaira Gupta wrote: > fix all checkpatch.pl warnings of 'braces {} should be used on all arms > of this statement' in the file qlge_ethtool.c by adding the braces. > > Signed-off-by: Kaaira Gupta Acked-by: Gustavo A. R. Silva Thanks for you patch

Re: [PATCH] staging: Replace zero-length array with flexible-array member

2020-02-20 Thread Gustavo A. R. Silva
Hi, On 2/20/20 13:04, adham.aboza...@microchip.com wrote: > Hi Gustavo > > On 2/20/20 6:29 AM, Gustavo A. R. Silva wrote: >> The current codebase makes use of the zero-length array language >> extension to the C90 standard, but the preferred mechanism to declare >

[PATCH] staging: Replace zero-length array with flexible-array member

2020-02-20 Thread Gustavo A. R. Silva
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva --- drivers/staging/gdm724x/gdm_mux.h | 2 +- drivers/staging/gdm724x/hci_pa

Re: [greybus-dev] [PATCH] staging: greybus: Replace zero-length array with flexible-array member

2020-02-11 Thread Gustavo A. R. Silva
On 2/11/20 16:15, Alex Elder wrote: > On 2/11/20 3:12 PM, Gustavo A. R. Silva wrote: >> The current codebase makes use of the zero-length array language >> extension to the C90 standard, but the preferred mechanism to declare >> variable-length types such as these one

[PATCH] staging: unisys: visorinput: Replace zero-length array with flexible-array member

2020-02-11 Thread Gustavo A. R. Silva
of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva --- drivers/staging/unisys/visorinput/visorinput.c | 2 +- 1 file changed, 1

[PATCH] staging: greybus: Replace zero-length array with flexible-array member

2020-02-11 Thread Gustavo A. R. Silva
of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva --- drivers/staging/greybus/raw.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH v2 2/2] staging: rtl8192u: ieee80211: Fix spelling mistake

2019-04-26 Thread Gustavo A. R. Silva
cky here, but be sure that any extra time you invest in the first stages as a kernel contributor will pay off in the future. :) Anyway, here is my Acked-by: Gustavo A. R. Silva for both patches. Thanks and keep contributing. -- Gustavo > drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 3

Re: [PATCH] staging: rtl8192u: ieee80211: Replace bit shifting with BIT macro

2019-04-25 Thread Gustavo A. R. Silva
Hi Vatsala, On 4/25/19 1:33 PM, Vatsala Narang wrote: > Challenge suggested by coccinelle. > I think you mean *change*. See more comments below... > Replace bit shifting on 1 with the BIT(x) macro. > Coccinelle script: > > @@ > expression c; > @@ > > -(1 << c) > +BIT(c) > > Signed-off-by:

[PATCH] staging: most: core: replace strcpy() by strscpy()

2019-04-22 Thread Gustavo A. R. Silva
0 ("Copy into fixed size buffer") Fixes: 131ac62253db ("staging: most: core: use device description as name") Signed-off-by: Gustavo A. R. Silva --- drivers/staging/most/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/most/cor

Re: [PATCH v2] staging: greybus: power_supply: use struct_size() helper

2019-04-18 Thread Gustavo A. R. Silva
On 4/18/19 1:27 AM, Johan Hovold wrote: > On Wed, Apr 17, 2019 at 01:44:40PM -0500, Gustavo A. R. Silva wrote: >> Make use of the struct_size() helper instead of an open-coded version >> in order to avoid any potential type mistakes, in particular in the >> context in whi

[PATCH v2] staging: greybus: power_supply: use struct_size() helper

2019-04-17 Thread Gustavo A. R. Silva
) with: struct_size(resp, props, props_count) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Rebase on top of 47830c1127ef ("staging: greybus: power_supply: fix prop-descriptor request size") drivers/staging/greybus/power_su

Re: [PATCH] staging: greybus: power_supply: Use struct_size() helper

2019-04-10 Thread Gustavo A. R. Silva
Johan, On 4/4/19 2:24 AM, Johan Hovold wrote: > On Thu, Apr 04, 2019 at 08:09:51AM +0100, Rui Miguel Silva wrote: >> Hi Gustavo, >> Thanks a lot for the patch. >> >> On Wed 03 Apr 2019 at 21:58, Gustavo A. R. Silva wrote: >>> Make use of the struct_si

Re: [PATCH] staging: greybus: power_supply: Use struct_size() helper

2019-04-10 Thread Gustavo A. R. Silva
Hi Johan, On 4/4/19 1:57 AM, Johan Hovold wrote: > > This patch looks good, but I noticed a bug here in the current code, > which should be fixed before applying this clean up. > > sizeof(req) should have been sizeof(*req) above. > Good catch. >> - sizeof(struct

[PATCH] staging: greybus: power_supply: Use struct_size() helper

2019-04-03 Thread Gustavo A. R. Silva
) with: struct_size(resp, props, props_count) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/greybus/power_supply.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/power_supply.c b/drivers

[PATCH] staging: ralink-gdma: Use struct_size() in kzalloc()

2019-04-03 Thread Gustavo A. R. Silva
on the above, replace gdma_dma_alloc_desc() with kzalloc() and use the new struct_size() helper. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/ralink-gdma/ralink-gdma.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions

Re: [PATCH] staging: comedi: ni_660x: fix missing break in switch statement

2019-02-18 Thread Gustavo A. R. Silva
Hi Sasha, On 2/18/19 3:14 PM, Sasha Levin wrote: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a "Fixes:" tag, > fixing commit: 58dd7c0a2a6e Staging: comedi: add ni_660x driver. > > The bot has tested the following trees: v4.20.8, v4.19.21,

[PATCH] staging: vt6656: key: Mark expected switch fall-throughs

2019-02-18 Thread Gustavo A. R. Silva
vel 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/vt6656/key.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/key.c b/driv

Re: [PATCH v2] staging: comedi: ni_660x: fix missing break in switch statement

2019-02-13 Thread Gustavo A. R. Silva
On 2/13/19 4:41 AM, Ian Abbott wrote: > On 12/02/2019 18:44, Gustavo A. R. Silva wrote: >> Add missing break statement in order to prevent the code from falling >> through to the default case and return -EINVAL every time. >> >> This bug was found thanks to th

Re: [PATCH] staging: comedi: ni_660x: fix missing break in switch statement

2019-02-12 Thread Gustavo A. R. Silva
Hi, Please, drop this. I've just sent v2 with the right Fixes tag: https://lore.kernel.org/patchwork/patch/1041301/ Thanks -- Gustavo On 2/12/19 12:08 PM, Gustavo A. R. Silva wrote: > Add missing break statement in order to prevent the code from falling > through to the defaul

[PATCH v2] staging: comedi: ni_660x: fix missing break in switch statement

2019-02-12 Thread Gustavo A. R. Silva
uting()") Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Fix Fixes tag. drivers/staging/comedi/drivers/ni_660x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index e7

[PATCH] staging: comedi: ni_660x: fix missing break in switch statement

2019-02-12 Thread Gustavo A. R. Silva
;) Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- drivers/staging/comedi/drivers/ni_660x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index e70a461e723f..405573e927cf 100644 --- a/drivers/staging/come

[PATCH] staging: rtl8188eu: Replace kzalloc with kcalloc

2019-01-14 Thread Gustavo A. R. Silva
Replace kzalloc() function with its 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a, b, gfp) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/rtl8188eu/core

[PATCH] staging: mt7621-dma: Use struct_size() in devm_kzalloc()

2019-01-04 Thread Gustavo A. R. Silva
. Signed-off-by: Gustavo A. R. Silva --- drivers/staging/mt7621-dma/ralink-gdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/mt7621-dma/ralink-gdma.c b/drivers/staging/mt7621-dma/ralink-gdma.c index 792a63bd55d4..d78042eba6dd 100644 --- a/drivers/staging

[PATCH] staging: wilc1000: fix memory leak in wilc_add_rx_gtk

2018-12-22 Thread Gustavo A. R. Silva
In case *mode* happens to be different than WILC_AP_MODE and WILC_STATION_MODE, gtk_key is not released, hence leanding to a memory leak. So, in this case it is safer to release gtk_key just before returning to callers. Addresses-Coverity-ID: 1476020 ("Resource leak") Signed-off-by: Gu

Re: [PATCH 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

2018-10-16 Thread Gustavo A. R. Silva
On 10/17/18 7:07 AM, Greg KH wrote: > On Wed, Oct 17, 2018 at 03:14:04AM +, k...@linuxonhyperv.com wrote: >> From: Dexuan Cui >> >> In kvp_send_key(), we do need call process_ib_ipinfo() if >> message->kvp_hdr.operation is KVP_OP_GET_IP_INFO, because it turns out >> the userland

Re: [PATCH] staging: comedi: tio: fix multiple missing break in switch bugs

2018-10-12 Thread Gustavo A. R. Silva
On 10/12/18 11:04 AM, Ian Abbott wrote: > On 11/10/2018 20:05, Gustavo A. R. Silva wrote: >> Currently, there are multiple missing break statements in two switch code >> blocks. This makes the execution path to fall all the way down through >> to the default cases, whi

[PATCH] staging: comedi: tio: fix multiple missing break in switch bugs

2018-10-11 Thread Gustavo A. R. Silva
;Structurally dead code") Fixes: 347e244884c3 ("staging: comedi: tio: implement global tio/ctr routing") Signed-off-by: Gustavo A. R. Silva --- drivers/staging/comedi/drivers/ni_tio.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/d

Re: [PATCH] staging: erofs: adds a space around '*'

2018-10-08 Thread Gustavo A. R. Silva
Hi, On 10/8/18 1:45 PM, Daeseok Youn wrote: > fix checkpatch.pl error: > ERROR: need consistent spacing around '*' (ctx:WxV) > + memcpy(vin + PAGE_SIZE *i, t, PAGE_SIZE); > > Signed-off-by: Daeseok Youn > --- > drivers/staging/erofs/unzip_vle_lz4.c | 2 +- > 1 file

Re: [PATCH] staging: emxx_udc: remove unused code

2018-10-08 Thread Gustavo A. R. Silva
Hi, On 10/8/18 9:33 AM, Loic Tourlonias wrote: > Remove useless code inside if_0 endif > > Signed-off-by: Loic Tourlonias > --- > drivers/staging/emxx_udc/emxx_udc.h | 4 > 1 file changed, 4 deletions(-) > > diff --git a/drivers/staging/emxx_udc/emxx_udc.h >

Re: [PATCH] Staging: rts5208: rtsx_card: Fixed multiple coding style issues

2018-10-06 Thread Gustavo A. R. Silva
Hi, On 9/29/18 4:03 AM, Maxime Desroches wrote: > Fixed multiple coding style issues > What kind of style issues are you trying to fix? Please, always be specific about what you are trying to fix. This makes it easier for the maintainers to review your patch and give you feedback. Thanks --

Re: [PATCH] staging/rtlwifi: Fixing formatting warnings.

2018-10-05 Thread Gustavo A. R. Silva
On 10/5/18 10:58 PM, Scott Tracy wrote: > Signed-off-by: Scott Tracy > --- > drivers/staging/rtlwifi/core.c | 5 +++-- > drivers/staging/rtlwifi/efuse.c | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/rtlwifi/core.c

[PATCH] Drivers: hv: hv_kvp: Mark expected switch fall-through

2018-07-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/hv/hv_kvp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index 5eed1e7..9b1adcb 100644

[PATCH] staging: wilc1000: fix infinite loop and out-of-bounds access

2018-04-30 Thread Gustavo A. R. Silva
wilc1000: refactor scan() to free kmalloc memory on failure cases") Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- BTW... at first sight it seems to me that variables slot_id and i should be of type unsigned instead of signed. drivers/staging/wilc1000/wilc_wfi_cfgoperat

[PATCH] staging: media: davinci_vpfe: fix spin_lock/unlock imbalance

2018-04-18 Thread Gustavo A. R. Silva
rk") Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resize

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

2018-04-12 Thread Gustavo A. R. Silva
cit null dereferenced") Suggested-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- Changes in v3: - Update subject and improve changelog. - Add Suggested-by: Dan Carpenter <dan.carpen...@oracle.com> Changes in v

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_

[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 <gust...@embeddedor.com> --- Changes

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

2018-04-12 Thread Gustavo A. R. Silva
ull checking priv before dererefencing it and free netdev before return. Addresses-Coverity-ID: 1467844 ("Explicit null dereferenced") Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/staging/ks7010/ks7010_sdio.c | 8 ++-- 1 file changed, 6 inserti

Re: [PATCH 4/4] video: Remove stack VLA usage

2018-03-08 Thread Gustavo A. R. Silva
I sent a patch for this six hours ago: https://patchwork.kernel.org/patch/10268591/ -- Gustavo On 03/09/2018 12:11 AM, Tycho Andersen wrote: On Thu, Mar 08, 2018 at 10:01:07PM -0800, Joe Perches wrote: On Fri, 2018-03-09 at 16:50 +1100, Tobin C. Harding wrote: The kernel would like to have

[PATCH] staging/imx: Fix inconsistent IS_ERR and PTR_ERR

2018-02-28 Thread Gustavo A. R. Silva
Fix inconsistent IS_ERR and PTR_ERR in imx_csi_probe. The proper pointer to be passed as argument is pinctrl instead of priv->vdev. This issue was detected with the help of Coccinelle. Fixes: 52e17089d185 ("media: imx: Don't initialize vars that won't be used") Signed-off-by: Gustav

Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

2018-02-19 Thread Gustavo A. R. Silva
Hi Philipp, On 02/19/2018 08:23 AM, Philipp Zabel wrote: Hi Gustavo, On Wed, 2018-02-14 at 14:57 -0600, Gustavo A. R. Silva wrote: Hi all, I was just wondering about the status of this patch. It is en route as commit dcd71a9292b1 ("staging: imx-media-vdic: fix inconsistent I

Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

2018-02-14 Thread Gustavo A. R. Silva
Hi all, I was just wondering about the status of this patch. Thanks -- Gustavo On 01/24/2018 06:14 PM, Steve Longerbeam wrote: Acked-by: Steve Longerbeam <steve_longerb...@mentor.com> On 01/23/2018 04:43 PM, Gustavo A. R. Silva wrote: Fix inconsistent IS_ERR and P

Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

2018-01-25 Thread Gustavo A. R. Silva
Quoting Arnd Bergmann <a...@arndb.de>: On Wed, Jan 24, 2018 at 1:43 AM, Gustavo A. R. Silva <gust...@embeddedor.com> wrote: Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch. This issue was detected with the help o

[PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

2018-01-23 Thread Gustavo A. R. Silva
Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch. This issue was detected with the help of Coccinelle. Fixes: 0b2e9e7947e7 ("media: staging/imx: remove confusing IS_ERR_OR_NULL usage") Signed-off-by: Gustavo A. R. S

[PATCH] android: binder: Use true and false for boolean values

2018-01-23 Thread Gustavo A. R. Silva
Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com> --- drivers/android/binder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d

[PATCH] staging: speakup: selection: replace _manual_ swap with swap macro

2017-11-10 Thread Gustavo A. R. Silva
Make use of the swap macro instead of _manually_ swapping values and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/s

Re: [PATCH 00/20] mark expected switch fall-throughs

2017-10-23 Thread Gustavo A. R. Silva
Quoting "Gustavo A. R. Silva" <garsi...@embeddedor.com>: In preparation to enabling -Wimplicit-fallthrough, this patchset aims to mark switch cases where we are expecting to fall through. In Kees Cook words: "This is an unfortunate omission in the C language, and thankful

[PATCH] staging: media: imx: fix inconsistent IS_ERR and PTR_ERR

2017-10-17 Thread Gustavo A. R. Silva
Fix inconsistent IS_ERR and PTR_ERR in csi_link_validate. The proper pointer to be passed as argument is sensor. This issue was detected with the help of Coccinelle. Reported-by: Julia Lawall <julia.law...@lip6.fr> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> -

[PATCH 19/20] staging: lustre: ptlrpc: mark expected switch fall-throughs

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 10/20] staging: rtl8188eu: usb_ops_linux: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1077613 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 + 1 file changed, 1 ins

[PATCH 04/20] staging: rtl8723bs: rtw_mlme_ext: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[PATCH 06/20] staging: comedi: s526: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/comedi/drivers/s526.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/d

[PATCH 18/20] staging: lustre: osc: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1077598 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lustre/osc/osc_cache.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 03/20] staging: rtl8192e: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/rtl8192e/rtllib_wx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/s

[PATCH 08/20] staging: vc04_services: vchiq_core: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 del

[PATCH 00/20] mark expected switch fall-throughs

2017-10-12 Thread Gustavo A. R. Silva
them with proper "fall through" comments, which is what GCC is expecting to find. For the rest of the cases, please double check if the actual intention of the code is to fall through. Thanks! Gustavo A. R. Silva (20): staging: ks7010: ks_wlan_net: mark expected switch fall-through

[PATCH 01/20] staging: ks7010: ks_wlan_net: mark expected switch fall-throughs

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1364489 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/ks7010/ks_wlan_net.c | 10 ++ 1 file changed, 10 inse

[PATCH 05/20] staging: lustre: lnet: net_fault: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lnet/lnet/net_fault.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/

[PATCH 12/20] staging: lustre: lnet: selftest: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lnet/selftest/conctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/

[PATCH 20/20] staging: lustre: rpc: mark expected switch fall-throughs

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1077604 Addresses-Coverity-ID: 1077605 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lnet/selftest/rpc.

[PATCH 16/20] staging: lustre: lprocfs: mark expected switch fall-throughs

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1271166 Addresses-Coverity-ID: 1271167 Addresses-Coverity-ID: 1271168 Addresses-Coverity-ID: 1271169 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.

[PATCH 14/20] staging: lustre: lnet: selftest: mark expected switch fall-throughs

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lnet/selftest/module.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH 02/20] staging: lustre: lnet: socklnd: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 07/20] staging: rtl8188eu: usb_halinit: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1373894 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 09/20] staging: vt6656: card: mark expected switch fall-throughs

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/vt6656/card.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/vt6656/ca

[PATCH 11/20] staging: r8822be: mark expected switch fall-throughs

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/d

[PATCH 15/20] staging: lustre: llite: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lustre/llite/namei.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/d

[PATCH 17/20] staging: lustre: ldlm: mark expected switch fall-through

2017-10-12 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/s

  1   2   >