[PATCH 25/41] scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through

2018-11-27 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/scsi/lpfc/lpfc_nportdisc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc

Re: linux-next: build warning after merge of the f2fs tree

2018-11-26 Thread Gustavo A. R. Silva
On 11/26/18 4:22 PM, Jaegeuk Kim wrote: On 11/27, Stephen Rothwell wrote: [..] Oh, thanks~ Is this okay? Yep. This fix the warning. :) Thanks, Jaegeuk -- Gustavo From 79e24f1509e5b6a07069be9cc8163969da78c57a Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 26 Nov 2018 14:20:32

Re: mtd: cfi_cmdset_0020: Mark expected switch fall-throughs

2018-11-09 Thread Gustavo A. R. Silva
On 11/9/18 1:40 PM, Boris Brezillon wrote: Applied to http://git.infradead.org/linux-mtd.git mtd/next, thanks. Thanks, Boris. -- Gustavo

Re: [PATCH v2] wireless: mark expected switch fall-throughs

2018-10-23 Thread Gustavo A. R. Silva
On 10/23/18 10:59 AM, Gustavo A. R. Silva wrote: > > On 10/23/18 9:01 AM, Johannes Berg wrote: >> On Tue, 2018-10-23 at 02:13 +0200, Gustavo A. R. Silva wrote: >>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >>> where we are expecting to

[PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through

2018-10-22 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/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtlwifi

[PATCH 20/20] zd1201: mark expected switch fall-through

2018-10-22 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/net/wireless/zydas/zd1201.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/zydas/zd1201.c b/drivers/net/wireless

[PATCH 05/20] carl9170: rx: mark expected switch fall-through

2018-10-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056534 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/ath/carl9170/rx.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH] RDMA/hns: Use 64-bit arithmetic instead of 32-bit

2018-10-22 Thread Gustavo A. R. Silva
On 10/22/18 8:15 PM, Jason Gunthorpe wrote: > On Thu, Oct 18, 2018 at 10:02:58AM +0200, Gustavo A. R. Silva wrote: >> Cast *max_num_sg* to u64 in order to give the compiler complete >> information about the proper arithmetic to use. >> >> Notice that such va

[PATCH 2/2] rtl8xxxu: Fix missing break in switch

2018-10-22 Thread Gustavo A. R. Silva
Add missing break statement in order to prevent the code from falling through to the default case. Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 1 + 1 file changed, 1 insertio

[PATCH 1/2] rtl8xxxu: Mark expected switch fall-throughs

2018-10-22 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1357355 ("Missing break in switch") Addresses-Coverity-ID: 1357378 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/

[PATCH] scsi: hisi_sas: Fix NULL pointer dereference

2018-10-18 Thread Gustavo A. R. Silva
SMP/internal IO") Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 2e5eaf1..e3f7c7b 100644 --- a/drivers/scsi/h

[PATCH v2 2/2] phy: ocelot-serdes: fix out-of-bounds read

2018-10-18 Thread Gustavo A. R. Silva
ad") Addresses-Coverity-ID: 1473959 ("Out-of-bounds read") Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing") Reviewed-by: Quentin Schulz Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Rebase and add Quentin's Reviewed-by to commit log. d

[PATCH v2 0/2] phy: ocelot-serdes: fix out-of-bounds read

2018-10-18 Thread Gustavo A. R. Silva
log in both patches. Thanks! Gustavo A. R. Silva (2): dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1 phy: ocelot-serdes: fix out-of-bounds read drivers/phy/mscc/phy-ocelot-serdes.c| 4 ++-- include/dt-bindings/phy/phy-ocelot-serdes.h | 2 +- 2 files changed, 3 insertions(+),

[PATCH v2 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1

2018-10-18 Thread Gustavo A. R. Silva
ERDES_MAX to be SERDES6G_MAX + 1. Notice that this is the first part of the solution to the out-of-bounds bug mentioned above. Although this change is not dependent on any other one. Suggested-by: Quentin Schulz Reviewed-by: Quentin Schulz Acked-by: Rob Herring Signed-off-by: Gustavo A. R. Silva --- Chan

Re: [PATCH] RDMA/ucma: Fix Spectre v1 vulnerability

2018-10-18 Thread Gustavo A. R. Silva
On 10/16/18 6:49 PM, Doug Ledford wrote: >> >> Cc: sta...@vger.kernel.org >> Signed-off-by: Gustavo A. R. Silva > > Thanks, applied to for-rc. > Thanks, Doug. -- Gustavo

[PATCH] RDMA/hns: Use 64-bit arithmetic instead of 32-bit

2018-10-18 Thread Gustavo A. R. Silva
arithmetic: length = max_num_sg * page_size; Addresses-Coverity-ID: 1474517 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva --- drivers/infiniband/hw/hns/hns_roce_mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hns/hns_ro

Re: [PATCH 2/2] phy: ocelot-serdes: fix out-of-bounds read

2018-10-17 Thread Gustavo A. R. Silva
Hi Kishon, On 10/16/18 10:48 AM, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 16 October 2018 02:16 PM, Gustavo A. R. Silva wrote: >> Hi, >> >> On 10/9/18 9:28 AM, Quentin Schulz wrote: >>> Hi Gustavo, >>> >>> On Tue, Oct 0

Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1

2018-10-17 Thread Gustavo A. R. Silva
On 10/17/18 5:23 PM, Rob Herring wrote: >>> Friendly ping. Who can you take this? >> >> Applied. No need (nor benefit) to ping me. You can check the status of >> DT patches on patchwork[1]. If it is there and in the "New" state, it is >> in my queue. > > Actually, this doesn't apply to my

Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1

2018-10-17 Thread Gustavo A. R. Silva
On 10/17/18 5:09 PM, Rob Herring wrote: >> >> Friendly ping. Who can you take this? > > Applied. No need (nor benefit) to ping me. You can check the status of > DT patches on patchwork[1]. If it is there and in the "New" state, it is > in my queue. > OK. I've got it. I just didn't know

[PATCH] afs: Mark expected switch fall-throughs

2018-10-17 Thread Gustavo A. R. Silva
break in switch") Addresses-Coverity-ID: 1467807 ("Missing break in switch") Addresses-Coverity-ID: 1467811 ("Missing break in switch") Addresses-Coverity-ID: 115041 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- fs/afs/cmservice.c | 6 ++ f

Re: [PATCH] skbuff: Mark expected switch fall-throughs

2018-10-17 Thread Gustavo A. R. Silva
On 10/17/18 12:41 AM, Kees Cook wrote: > > Actually, since this is skbuff, can you resend this to netdev instead? > Andrew took the other two, but this one seems like it should go via > David Miller. > Sure thing. Will do. Thanks -- Gustavo

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

[PATCH v2] scsi: mark expected switch fall-throughs

2018-10-16 Thread Gustavo A. R. Silva
ses-Coverity-ID: 114985 ("Missing break in switch") Addresses-Coverity-ID: 114988 ("Missing break in switch") Addresses-Coverity-ID: 114994 ("Missing break in switch") Addresses-Coverity-ID: 114995 ("Missing break in switch") Signed-off-by: Gustavo A. R. S

Re: [PATCH] Input: uinput - fix Spectre v1 vulnerability

2018-10-16 Thread Gustavo A. R. Silva
Hi Dmitry, On 10/16/18 7:21 PM, Dmitry Torokhov wrote: > Hi Gustavo, > > On Tue, Oct 16, 2018 at 01:13:13PM +0200, Gustavo A. R. Silva wrote: >> setup.code can be indirectly controlled by user-space, hence leading to >> a potential exploitation of the Spectre va

Re: [PATCH] Input: uinput - fix Spectre v1 vulnerability

2018-10-16 Thread Gustavo A. R. Silva
On 10/16/18 8:09 PM, Dmitry Torokhov wrote: > > /dev/uinput I've got it. This explains it all. :) > must be 0600, or accessible to equally privileged user, or you'll be opening > your system to much mischief. > Thanks, Dmitry. -- Gustavo

Re: [PATCH net-next v2 2/2] net: phy: mscc: fix memory leak in vsc8574_config_pre_init

2018-10-16 Thread Gustavo A. R. Silva
On 10/16/18 6:54 PM, David Miller wrote: >> >> Friendly ping. Dave, can you take this? > > It needs to be posted properly to netdev, just like all networking > patches do. > mmh... I don't know how I missed it. :/ OK. I'll send the series to netdev. Thanks! -- Gustavo

[PATCH] RDMA/ucma: Fix Spectre v1 vulnerability

2018-10-16 Thread Gustavo A. R. Silva
=152449131114778=2 Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- drivers/infiniband/core/ucma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index 21863dd..01d68ed 100644 --- a/drivers/infiniband/core/ucma.c +++ b

[PATCH] IB/ucm: Fix Spectre v1 vulnerability

2018-10-16 Thread Gustavo A. R. Silva
=152449131114778=2 Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- drivers/infiniband/core/ucm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index faa9e61..73332b9 100644 --- a/drivers/infiniband/core/ucm.c +++ b

Re: [PATCH] signal: Mark expected switch fall-throughs

2018-10-16 Thread Gustavo A. R. Silva
On 10/15/18 11:29 PM, Kees Cook wrote: > On Sat, Oct 13, 2018 at 4:48 AM, Gustavo A. R. Silva > wrote: >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> Signed-off-by: Gustavo A. R. Silva >

[PATCH] Input: uinput - fix Spectre v1 vulnerability

2018-10-16 Thread Gustavo A. R. Silva
kernel=152449131114778=2 Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- drivers/input/misc/uinput.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 8ec483e..97b0809 100644 --- a/drivers/input/misc/uinput.c

Re: [PATCH] iio: dpot-dac: mark expected switch fall-through

2018-10-16 Thread Gustavo A. R. Silva
On 10/14/18 7:01 PM, Jonathan Cameron wrote: > > Done the first of the above... > Thank you, Jonathan. -- Gustavo

[PATCH] drivers/misc/sgi-gru: fix Spectre v1 vulnerability

2018-10-16 Thread Gustavo A. R. Silva
=linux-kernel=152449131114778=2 Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- drivers/misc/sgi-gru/grukdump.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/misc/sgi-gru/grukdump.c b/drivers/misc/sgi-gru/grukdump.c index 313da31..1540a77 100644 --- a/drivers/misc

Re: [PATCH net-next v2 1/2] net: phy: mscc: fix signedness bug in vsc85xx_downshift_get

2018-10-16 Thread Gustavo A. R. Silva
Hi, On 10/10/18 10:30 AM, Gustavo A. R. Silva wrote: > Currently, the error handling for the call to function > phy_read_paged() doesn't work because *reg_val* is of > type u16 (16 bits, unsigned), which makes it impossible > for it to hold a value less than 0. > > Fix this by

Re: [PATCH net-next v2 2/2] net: phy: mscc: fix memory leak in vsc8574_config_pre_init

2018-10-16 Thread Gustavo A. R. Silva
Hi, On 10/10/18 10:34 AM, Quentin Schulz wrote: > Hi Gustavo, > > On Wed, Oct 10, 2018 at 10:31:39AM +0200, Gustavo A. R. Silva wrote: >> In case memory resources for *fw* were successfully allocated, >> release them before return. >> >> Addresses-Coverity-ID: 1

Re: [PATCH 2/2] phy: ocelot-serdes: fix out-of-bounds read

2018-10-16 Thread Gustavo A. R. Silva
Hi, On 10/9/18 9:28 AM, Quentin Schulz wrote: > Hi Gustavo, > > On Tue, Oct 09, 2018 at 12:22:33AM +0200, Gustavo A. R. Silva wrote: >> Currently, there is an out-of-bounds read on array ctrl->phys, >> once variable i reaches the maximum array size of SERDES_MAX >&

Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1

2018-10-16 Thread Gustavo A. R. Silva
Hi, On 10/9/18 9:27 AM, Quentin Schulz wrote: > Hi Gustavo, > > On Tue, Oct 09, 2018 at 12:21:36AM +0200, Gustavo A. R. Silva wrote: >> SERDES_MAX is a valid value to index ctrl->phys in >> drivers/phy/mscc/phy-ocelot-serdes.c. But, currently, >> there is an out-

Re: [PATCH] Input: atmel_mxt_ts - mark expected switch fall-through

2018-10-15 Thread Gustavo A. R. Silva
On 10/15/18 8:21 PM, Dmitry Torokhov wrote: > On Mon, Oct 08, 2018 at 07:03:55PM +0200, Gustavo A. R. Silva wrote: >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> Signed-off-by: Gustavo A. R. Sil

Re: [PATCH] iio: dpot-dac: mark expected switch fall-through

2018-10-13 Thread Gustavo A. R. Silva
On 10/13/18 2:38 PM, Jonathan Cameron wrote: > On Mon, 8 Oct 2018 20:42:41 + > Peter Rosin wrote: > >> On 2018-10-08 19:35, Gustavo A. R. Silva wrote: >>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >>> where we are expecting to fa

[PATCH] skbuff: Mark expected switch fall-throughs

2018-10-13 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 --- include/linux/skbuff.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 119d092

[PATCH] compat: Mark expected switch fall-throughs

2018-10-13 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 --- include/linux/compat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/compat.h b/include/linux/compat.h index d30e4db

[PATCH] signal: Mark expected switch fall-throughs

2018-10-13 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 --- include/linux/signal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/signal.h b/include/linux/signal.h index 200ed96

[PATCH] firewire: core-topology: mark expected switch fall-through

2018-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: 741234 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/firewire/core-topology.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH] pinctrl: rzn1: remove unnecessary unsigned integer comparison

2018-10-12 Thread Gustavo A. R. Silva
rzn1.c Linus Walleij (maintainer:PIN CONTROL SUBSYSTEM) linux-g...@vger.kernel.org (open list:PIN CONTROL SUBSYSTEM) linux-kernel@vger.kernel.org (open list) Thanks -- Gustavo > Yours, > Linus Walleij > > On Thu, Oct 11, 2018 at 10:40 PM Gustavo A. R. Silva > wrote: >> >

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

Re: [PATCH v2] pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux

2018-10-12 Thread Gustavo A. R. Silva
On 10/11/18 10:40 AM, Linus Walleij wrote: >> Changes in v2: >> - Initialize variable ret to 0 instead of -1. Thanks to Charles Keepax >>for pointing this out. >> - Update subject and commit log. > > Patch applied with Charles' ACK. > Thanks, Linus. -- Gustavo

[PATCH] pinctrl: rzn1: remove unnecessary unsigned integer comparison

2018-10-11 Thread Gustavo A. R. Silva
There is no need to compare ipctl->mdio_func[mdio] with => 0, because such comparison is always true. Notice that *mdio_func* is of type u32 (32 bits, unsigned). Fix this by removing such comparison. Addresses-Coverity-ID: 1474166 ("Unsigned compared against 0") Signed-off-

[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

[PATCH] mtd: rawnand: fsmc: Fix unchecked return value in fsmc_read_page_hwecc

2018-10-10 Thread Gustavo A. R. Silva
* to the top of fsmc_read_page_hwecc(). Addresses-Coverity-ID: 1471968 ("Unchecked return value") Signed-off-by: Gustavo A. R. Silva --- drivers/mtd/nand/raw/fsmc_nand.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mt

[PATCH v2] pinctrl: madera: Fix uninitialized variable bug in madera_mux_set_mux

2018-10-10 Thread Gustavo A. R. Silva
g, ret); Fix this by initializing variable *ret* to 0 in order to avoid unpredictable or unintended results. Addresses-Coverity-ID: 1471969 ("Uninitialized scalar variable") Fixes: 218d72a77b0b ("pinctrl: madera: Add driver for Cirrus Logic Madera codecs") Signed-off-by: Gusta

Re: [PATCH] pinctrl: madera: Fix uninitialized variable issue in madera_mux_set_mux

2018-10-10 Thread Gustavo A. R. Silva
Hi Charles, > I don't believe this would fully address the issue since if you > initialise ret to -1 you will still drop into the if statement > and you will use the reg variable which should also be > uninitialised on that code path. > > Feels like initialising to 0 would probably be better

[PATCH] pinctrl: madera: Fix uninitialized variable issue in madera_mux_set_mux

2018-10-10 Thread Gustavo A. R. Silva
g, ret); Fix this by initializing variable *ret* to -1. Addresses-Coverity-ID: 1471969 ("Uninitialized scalar variable") Fixes: 218d72a77b0b ("pinctrl: madera: Add driver for Cirrus Logic Madera codecs") Signed-off-by: Gustavo A. R. Silva --- drivers/pinctrl/cirrus/pinctrl-madera

[PATCH] tpm: fix unused-value issues in tpm_try_transmit

2018-10-10 Thread Gustavo A. R. Silva
this by removing such assignments. Addresses-Coverity-ID: 1470245 ("Unused value") Addresses-Coverity-ID: 1470250 ("Unused value") Addresses-Coverity-ID: 1470251 ("Unused value") Fixes: 627448e85c76 ("tpm: separate cmd_ready/go_idle from runtime_pm") Signed-off-by: Gu

[PATCH net-next v2 2/2] net: phy: mscc: fix memory leak in vsc8574_config_pre_init

2018-10-10 Thread Gustavo A. R. Silva
In case memory resources for *fw* were successfully allocated, release them before return. Addresses-Coverity-ID: 1473968 ("Resource leak") Fixes: 00d70d8e0e78 ("net: phy: mscc: add support for VSC8574 PHY") Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Jump

[PATCH net-next v2 1/2] net: phy: mscc: fix signedness bug in vsc85xx_downshift_get

2018-10-10 Thread Gustavo A. R. Silva
("Unsigned compared against 0") Fixes: 6a0bfbbe20b0 ("net: phy: mscc: migrate to phy_select/restore_page functions") Reviewed-by: Quentin Schulz Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Add Quentin's Reviewed-by to the commit log. drivers/net/phy/mscc.c | 2 +

[PATCH net-next v2 0/2] fix signedness bug and memory leak in mscc driver

2018-10-10 Thread Gustavo A. R. Silva
. Thanks to Quentin Schulz for pointing this out. Thanks Gustavo A. R. Silva (2): net: phy: mscc: fix signedness bug in vsc85xx_downshift_get net: phy: mscc: fix memory leak in vsc8574_config_pre_init drivers/net/phy/mscc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH net-next 2/2] net: phy: mscc: fix memory leak in vsc8574_config_pre_init

2018-10-10 Thread Gustavo A. R. Silva
Hey Quentin, On 10/10/18 8:49 AM, Quentin Schulz wrote: >> >> out: >> phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD); >> - >> +release_fw: >> release_firmware(fw); > > You can reuse the out goto label instead, I would like all functions in > the driver to exit

[PATCH v3] smb2: fix uninitialized variable bug in smb2_ioctl_query_info

2018-10-09 Thread Gustavo A. R. Silva
unpredictable or unintended results. Addresses-Coverity-ID: 1473971 ("Uninitialized scalar variable") Fixes: c5d25bdb2967 ("cifs: add IOCTL for QUERY_INFO passthrough to userspace") Signed-off-by: Gustavo A. R. Silva --- Changes in v3: - Initialize resp_buftype to CIFS_NO_BUF

Re: [PATCH v2] smb2: fix uninitialized variable bug in smb2_ioctl_query_info

2018-10-09 Thread Gustavo A. R. Silva
Hey Ronnie, On 10/9/18 11:47 PM, Ronnie Sahlberg wrote: > Good catch, but I think it should be : > > int resp_buftype = CIFS_NO_BUFFER; > Oh okay. I'll send v3 shortly. Thanks for the feedback. -- Gustavo

[PATCH v2] smb2: fix uninitialized variable bug in smb2_ioctl_query_info

2018-10-09 Thread Gustavo A. R. Silva
or unintended results. Addresses-Coverity-ID: 1473971 ("Uninitialized scalar variable") Fixes: c5d25bdb2967 ("cifs: add IOCTL for QUERY_INFO passthrough to userspace") Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Fix Coverity and Fixes tag. - Update commit log. f

Re: [PATCH] smb2: fix uninitialized variable bug in smb2_ioctl_query_info

2018-10-09 Thread Gustavo A. R. Silva
On 10/9/18 10:07 PM, Gustavo A. R. Silva wrote: > There is a potential execution path in which variable *resp_buftype* > is passed as an argument to function free_rsp_buf(), in which is used > without being properly initialized previously. > > Fix this by initializing variabl

[PATCH] smb2: fix uninitialized variable bug in smb2_ioctl_query_info

2018-10-09 Thread Gustavo A. R. Silva
. Addresses-Coverity-ID: 1472116 ("Uninitialized scalar variable") Fixes: 1473971 ("Uninitialized scalar variable") Signed-off-by: Gustavo A. R. Silva --- fs/cifs/smb2ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2

[PATCH net-next 2/2] net: phy: mscc: fix memory leak in vsc8574_config_pre_init

2018-10-09 Thread Gustavo A. R. Silva
In case memory resources for *fw* were successfully allocated, release them before return. Addresses-Coverity-ID: 1473968 ("Resource leak") Fixes: 00d70d8e0e78 ("net: phy: mscc: add support for VSC8574 PHY") Signed-off-by: Gustavo A. R. Silva --- drivers/net/phy/mscc.c | 4

[PATCH net-next 1/2] net: phy: mscc: fix signedness bug in vsc85xx_downshift_get

2018-10-09 Thread Gustavo A. R. Silva
("Unsigned compared against 0") Fixes: 6a0bfbbe20b0 ("net: phy: mscc: migrate to phy_select/restore_page functions") Signed-off-by: Gustavo A. R. Silva --- drivers/net/phy/mscc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/mscc.c b/drivers/

[PATCH net-next 0/2] fix signedness bug and memory leak in mscc driver

2018-10-09 Thread Gustavo A. R. Silva
This patchset aims to fix a signedness bug in function vsc85xx_downshift_get() and a memory leak in function vsc8574_config_pre_init(). Thanks Gustavo A. R. Silva (2): net: phy: mscc: fix signedness bug in vsc85xx_downshift_get net: phy: mscc: fix memory leak in vsc8574_config_pre_init

Re: [PATCH 0/2] phy: ocelot-serdes: fix out-of-bounds bug

2018-10-09 Thread Gustavo A. R. Silva
On 10/9/18 9:28 AM, Quentin Schulz wrote: > Hi Gustavo, > > On Tue, Oct 09, 2018 at 12:20:28AM +0200, Gustavo A. R. Silva wrote: >> This patchset aims to fix an out-of-bounds bug in >> the phy-ocelot-serdes driver. >> >> Currently, there is an out-of-bounds

[PATCH 2/2] phy: ocelot-serdes: fix out-of-bounds read

2018-10-08 Thread Gustavo A. R. Silva
ad") Addresses-Coverity-ID: 1473959 ("Out-of-bounds read") Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing") Signed-off-by: Gustavo A. R. Silva --- drivers/phy/mscc/phy-ocelot-serdes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1

2018-10-08 Thread Gustavo A. R. Silva
ERDES_MAX to be SERDES6G_MAX + 1. Notice that this is the first part of the solution to the out-of-bounds bug mentioned above. Although this change is not dependent on any other one. Suggested-by: Quentin Schulz Signed-off-by: Gustavo A. R. Silva --- include/dt-bindings/phy/phy-ocelot-serdes.h | 2 +- 1 fil

[PATCH 0/2] phy: ocelot-serdes: fix out-of-bounds bug

2018-10-08 Thread Gustavo A. R. Silva
ted an error when I first tried to integrate the whole solution into a singe patch. So, changes to dt-bindings should be sent as a separate patch. Thanks Gustavo A. R. Silva (2): dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1 phy: ocelot-serdes: fix out-of-bounds read drivers/

Re: [PATCH] phy: ocelot-serdes: fix out-of-bounds read

2018-10-08 Thread Gustavo A. R. Silva
Hey Quentin, On 10/8/18 10:55 PM, Quentin Schulz wrote: > Hi Gustavo, > > On Mon, Oct 08, 2018 at 08:06:49PM +0200, Gustavo A. R. Silva wrote: >> Currently, there is an out-of-bounds read on array ctrl->phys, >> once variable i reaches the maximum array size of SERDE

[PATCH] phy: ocelot-serdes: fix out-of-bounds read

2018-10-08 Thread Gustavo A. R. Silva
ad") Addresses-Coverity-ID: 1473959 ("Out-of-bounds read") Fixes: 51f6b410fc22 ("phy: add driver for Microsemi Ocelot SerDes muxing") Signed-off-by: Gustavo A. R. Silva --- drivers/phy/mscc/phy-ocelot-serdes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[PATCH] iio: dpot-dac: mark expected switch fall-through

2018-10-08 Thread Gustavo A. R. Silva
2408 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/iio/dac/dpot-dac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/dpot-dac.c b/drivers/iio/dac/dpot-dac.c index a791d0a..e353946 100644 --- a/drivers/iio/dac/dpot-dac.c ++

[PATCH] iio: cros_ec_accel_legacy: Mark expected switch fall-throughs

2018-10-08 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1397962 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/iio/accel/cros_ec_accel_legacy.c | 2 ++ 1 file changed, 2 insertion

[PATCH] Input: atmel_mxt_ts - mark expected switch fall-through

2018-10-08 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/input/touchscreen/atmel_mxt_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen

[PATCH] Input: cyapa - mark expected switch fall-throughs

2018-10-08 Thread Gustavo A. R. Silva
-Coverity-ID: 114758 ("Missing break in switch") Addresses-Coverity-ID: 114759 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/input/mouse/cyapa_gen3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/mouse/cyapa_gen3.c

[PATCH] Input: xen-kbdfront - mark expected switch fall-through

2018-10-08 Thread Gustavo A. R. Silva
("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/input/misc/xen-kbdfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c index 594f72e..24bc5c5 100644 --- a/dr

[PATCH] isdn/gigaset/isocdata: mark expected switch fall-through

2018-10-08 Thread Gustavo A. R. Silva
Notice that in this particular case, I replaced the "--v-- fall through --v--" comment with a proper "fall through", which is what GCC is expecting to find. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva ---

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/EMXX_UDC: emxx_udc.c: Fixed all meaningful sparse errors: 1. Added static to udc_controller 2. Added mising __iomem modifier to handle p_regs 3. Added missing le16_to_cpu

2018-10-06 Thread Gustavo A. R. Silva
Hi, Please, separate the commit log from the subject. And mention exactly what are all those errors that sparse reported and that you are trying to fix. Notice that you didn't send this patch to all the relevant people. Use the get_maintainer.pl script for that. On 10/5/18 8:27 PM, Carmeli

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] mmc: meson-mx-sdio: mark expected switch fall-through

2018-10-05 Thread Gustavo A. R. Silva
Hi Martin, On 10/5/18 11:10 PM, Martin Blumenstingl wrote: > On Fri, Oct 5, 2018 at 12:15 PM Gustavo A. R. Silva > wrote: >> >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> Notice that

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] memstick: tifm_ms: mark expected switch fall-through

2018-10-05 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1357317 ("Missing break in switch") Addresses-Coverity-ID: 1460342 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- d

[PATCH] mmc: meson-mx-sdio: mark expected switch fall-through

2018-10-05 Thread Gustavo A. R. Silva
D: 1373880 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/mmc/host/meson-mx-sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c index 2cfec33..abe253c 100644 --- a/dr

[PATCH] mmc: tifm_sd: Mark expected switch fall-through

2018-10-05 Thread Gustavo A. R. Silva
is expecting to find. Addresses-Coverity-ID: 1373887 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/mmc/host/tifm_sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index a3d8380..b6644ce

[PATCH] UBI: mark expected switch fall-throughs

2018-10-05 Thread Gustavo A. R. Silva
ak in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/mtd/ubi/attach.c | 1 + drivers/mtd/ubi/build.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index 93ceea4..e294d39 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drive

Re: [PATCH] nvmem: lpc18xx_eeprom: fix compile warning

2018-10-05 Thread Gustavo A. R. Silva
On 10/5/18 10:06 AM, Srinivas Kandagatla wrote: > > > On 05/10/18 08:03, Gustavo A. R. Silva wrote: >> Fix the following warning by removing unused variable ret: >> >> drivers/nvmem/lpc18xx_eeprom.c: In function ‘lpc18xx_eeprom_remove’: >> drivers/nvmem/lpc18x

[PATCH] ntb: ntb_transport: Mark expected switch fall-throughs

2018-10-05 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1373888 ("Missing break in switch") Addresses-Coverity-ID: 1373889 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers

[PATCH] nvmem: lpc18xx_eeprom: fix compile warning

2018-10-05 Thread Gustavo A. R. Silva
Fix the following warning by removing unused variable ret: drivers/nvmem/lpc18xx_eeprom.c: In function ‘lpc18xx_eeprom_remove’: drivers/nvmem/lpc18xx_eeprom.c:258:6: warning: unused variable ‘ret’ [-Wunused-variable] int ret; ^~~ Signed-off-by: Gustavo A. R. Silva --- drivers/nvmem

[PATCH] parport: parport_pc: Mark expected switch fall-through

2018-10-04 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114730 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/parport/parport_pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH] PCI / ACPI: Mark expected switch fall-through

2018-10-04 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1472052 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/pci/pci-acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/d

[PATCH] power: max8925: mark expected switch fall-through

2018-10-04 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 201510 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/power/supply/max8925_power.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH] rtc: m41t80: fix fall-through annotation

2018-10-04 Thread Gustavo A. R. Silva
On 10/4/18 2:53 PM, Alexandre Belloni wrote: > Hi, > > On 04/10/2018 14:35:28+0200, Gustavo A. R. Silva wrote: >> Replace "Fall" with a proper "Fall through" annotation. >> >> This fix is part of the ongoing efforts to enabling

[PATCH v2] rtc: m41t80: mark expected switch fall-through

2018-10-04 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced "Fall" with a proper "Fall through" comment. Addresses-Coverity-ID: 1373875 ("Missing break in switch") Sign

[PATCH] regulator: axp20x: Mark expected switch fall-throughs

2018-10-04 Thread Gustavo A. R. Silva
e, which is what GCC is expecting to find. Addresses-Coverity-ID: 1436594 ("Missing break in switch") Addresses-Coverity-ID: 1364475 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/regulator/axp20x-regulator.c | 3 ++- 1 file changed, 2 insertions

[PATCH] rtc: m41t80: fix fall-through annotation

2018-10-04 Thread Gustavo A. R. Silva
Replace "Fall" with a proper "Fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Addresses-Coverity-ID: 1373875 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/rtc/rtc-m41t80.c | 2 +

Re: [PATCH] ALSA: intel8x0: Fix fall-through annotations

2018-10-03 Thread Gustavo A. R. Silva
On 10/3/18 8:34 PM, Takashi Iwai wrote: >> >> You are correct. It does not trigger a warning. >> >> There are about 50 similar instances in the whole codebase. And, as they >> are just a few, what I'm trying to do is to replace them with the most >> commonly used form: "fall through" > > Hm,

Re: [PATCH] spi: slave: Fix missing break in switch

2018-10-03 Thread Gustavo A. R. Silva
On 10/3/18 5:10 PM, Geert Uytterhoeven wrote: > Hi Gustavo, > > On Wed, Oct 3, 2018 at 5:05 PM Gustavo A. R. Silva > wrote: >> On 10/3/18 5:01 PM, Mark Brown wrote: >>> On Wed, Oct 03, 2018 at 04:46:45PM +0200, Geert Uytterhoeven wrote: >>>> On Wed, Oct

Re: [PATCH] ALSA: intel8x0: Fix fall-through annotations

2018-10-03 Thread Gustavo A. R. Silva
On 10/3/18 6:19 PM, Takashi Iwai wrote: > On Wed, 03 Oct 2018 18:08:07 +0200, > Takashi Iwai wrote: >> >> On Wed, 03 Oct 2018 12:38:36 +0200, >> Gustavo A. R. Silva wrote: >>> >>> Replace "fallthru" with a proper "fall through&quo

[PATCH] spi: pxa2xx: Rewrite switch code block in interrupt_transfer

2018-10-03 Thread Gustavo A. R. Silva
Rewrite switch code block to directly do the expected number of shifts in each case and have break statements. Addresses-Coverity-ID: 1056539 ("Missing break in switch") Suggested-by: Mark Brown Signed-off-by: Gustavo A. R. Silva --- drivers/spi/spi-pxa2xx.c | 4 +++- 1 file

Re: [PATCH] spi: pxa2xx: Mark expected switch fall-through

2018-10-03 Thread Gustavo A. R. Silva
On 10/3/18 5:27 PM, Gustavo A. R. Silva wrote: > > > On 10/3/18 5:22 PM, Mark Brown wrote: >> On Wed, Oct 03, 2018 at 02:12:11PM +0200, Gustavo A. R. Silva wrote: >> >>> switch (drv_data->n_bytes) { >>> case 4:

  1   2   3   4   5   6   7   8   9   10   >