[PATCH] Input: raydium_i2c_ts - use true and false for boolean values

2018-08-04 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/input/touchscreen/raydium_i2c_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] genwqe: card_base: Use true and false for boolean values

2018-08-04 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/misc/genwqe/card_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] s390/qeth: use true and false for boolean values

2018-08-04 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/s390/net/qeth_l3_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] soc: mediatek: pwrap: use true and false for boolean values

2018-08-04 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/soc/mediatek/mtk-pmic-wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] power: supply: max77693_charger: fix unintentional fall-through

2018-08-04 Thread Gustavo A. R. Silva
Hi Sebastian, On 07/22/2018 05:17 PM, Sebastian Reichel wrote: > Hi, > > On Wed, Jul 18, 2018 at 08:14:50AM +0200, Krzysztof Kozlowski wrote: >> On 17 July 2018 at 23:47, Gustavo A. R. Silva wrote: >>> It seems that a *break* is missing in order to avoid a fall-thr

[PATCH] PM / hibernate: Mark expected switch fall-through

2018-08-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: 114713 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- kernel/power/hibernate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ke

Re: [PATCH] mm/kasan/kasan_init: use true and false for boolean values

2018-08-06 Thread Gustavo A. R. Silva
Hi Dmitry, On 08/06/2018 04:04 AM, Dmitry Vyukov wrote: > On Sun, Aug 5, 2018 at 12:08 AM, Gustavo A. R. Silva > wrote: >> Return statements in functions returning bool should use true or false >> instead of an integer value. >> >> This code was detected with the he

Re: [PATCH 11/11] ASoC: wm8994: Mark expected switch fall-through

2018-08-06 Thread Gustavo A. R. Silva
On 08/06/2018 06:34 AM, Mark Brown wrote: > On Fri, Aug 03, 2018 at 01:55:18PM -0400, valdis.kletni...@vt.edu wrote: >> On Fri, 03 Aug 2018 11:56:12 -0500, "Gustavo A. R. Silva" said: >>> On 08/03/2018 11:45 AM, Mark Brown wrote: >>>> Basically nobod

Re: [PATCH 11/11] ASoC: wm8994: Mark expected switch fall-through

2018-08-06 Thread Gustavo A. R. Silva
On 08/06/2018 06:52 AM, Mark Brown wrote: > On Mon, Aug 06, 2018 at 06:48:13AM -0500, Gustavo A. R. Silva wrote: > > Please fix your mail client to word wrap within paragraphs at something > substantially less than 80 columns. Doing this makes your messages much > easier to re

[PATCH] ASoC: wm8994: Fix missing break in switch

2018-08-06 Thread Gustavo A. R. Silva
Add missing break statement in order to prevent the code from falling through to the default case. Cc: sta...@vger.kernel.org Addresses-Coverity-ID: 115050 ("Missing break in switch") Reported-by: Valdis Kletnieks Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8994.c | 2

Re: [PATCH] platform/x86: acer-wmi: use true and false for boolean values

2018-08-06 Thread Gustavo A. R. Silva
On 08/06/2018 11:42 AM, Joe Perches wrote: > On Mon, 2018-08-06 at 16:41 +, David Laight wrote: >> From: Andy Shevchenko >>> Sent: 05 August 2018 11:26 >>> >>> On Sun, Aug 5, 2018 at 3:18 AM, Gustavo A. R. Silva >>> wrote: >>>> Retu

[PATCH] platform/x86: acer-wmi: refactor function has_cap

2018-08-06 Thread Gustavo A. R. Silva
Refactor function has_cap in order to avoid returning integer values, when instead it should return booleans. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/platform/x86/acer-wmi.c | 5 + 1 file changed, 1 insertion(+), 4 deletions

[PATCH v2] platform/x86: acer-wmi: refactor function has_cap

2018-08-06 Thread Gustavo A. R. Silva
Refactor function has_cap in order to avoid returning integer values, when instead it should return booleans. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- Changes in v2: Remove parentheses and unnecessary code. Thank you all for the

Re: [PATCH] platform/x86: acer-wmi: refactor function has_cap

2018-08-06 Thread Gustavo A. R. Silva
On 8/6/18 3:16 PM, Andy Shevchenko wrote: > On Mon, Aug 6, 2018 at 11:00 PM, Gustavo A. R. Silva > wrote: >> Refactor function has_cap in order to avoid returning integer >> values, when instead it should return booleans. >> >> This code was detected with the he

[PATCH] arm64: alternative: Use true and false for boolean values

2018-08-07 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- arch/arm64/kernel/alternative.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH] dma/direct: Use true and false for boolean values

2018-08-07 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- arch/arm/include/asm/dma-direct.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH] drm/i915: mark expected switch fall-through

2018-06-20 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1470102 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/i915/intel_dpll_mgr.c | 1 + 1 file changed, 1 insertion(+)

[PATCH] fs/super.c: Fix lock/unlock imbalance in sget_fc

2018-06-20 Thread Gustavo A. R. Silva
It seems a spin_unlock is missing before return at line 532: return old. Addresses-Coverity-ID: 1470111 ("Missing unlock") Fixes: 4f3911e76e19 ("vfs: Implement a filesystem superblock creation/configuration context") Signed-off-by: Gustavo A. R. Silva --- fs/super.c | 1

[PATCH] spi: spi-fsl-dspi: Fix copy-paste error in dspi_probe

2018-06-21 Thread Gustavo A. R. Silva
It seems that the proper structure field to use in this particular case is *regmap_pushr* instead of regmap. Addresses-Coverity-ID: 1470126 ("Copy-paste error") Fixes: 58ba07ec79e6 ("spi: spi-fsl-dspi: Add support for XSPI mode registers") Signed-off-by: Gustavo A. R. Silva

[PATCH] CIFS: fix structurally dead code in smb311_posix_mkdir

2018-06-21 Thread Gustavo A. R. Silva
code") Fixes: 5539e9b24a38 ("CIFS: fix memory leak and remove dead code") Signed-off-by: Gustavo A. R. Silva --- fs/cifs/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 062a2a5..c9489b1 100644 --- a/fs/cif

Re: [PATCH] CIFS: fix structurally dead code in smb311_posix_mkdir

2018-06-21 Thread Gustavo A. R. Silva
On 06/21/2018 11:59 AM, Steve French wrote: Folded this patch and the equivalent one from Dan in with the comments from Aurelien into one patch and repushed to cifs-2.6.git for-next - see attached. Fine. You can add my Signed-off-by Thanks -- Gustavo

Re: [PATCH] fs/super.c: Fix lock/unlock imbalance in sget_fc

2018-06-21 Thread Gustavo A. R. Silva
Hi Al, Certainly, I never checked grab_super. Lesson learned. Thanks a lot for taking the time to write this master class. I really appreciate it. :) -- Gustavo a reproducer), we have some other crap going on and need to investigate that, but even in that case, the patch is wrong] As for h

[PATCH] NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks

2018-08-27 Thread Gustavo A. R. Silva
pport") Signed-off-by: Gustavo A. R. Silva --- drivers/ntb/hw/idt/ntb_hw_idt.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c index dbe72f1..a67ef23 100644 --- a/drivers/ntb/hw/idt/ntb_hw_idt.c +++

[PATCH] HID: core: fix NULL pointer dereference

2018-08-29 Thread Gustavo A. R. Silva
5a8a ("HID: core: fix memory leak on probe") Signed-off-by: Gustavo A. R. Silva --- drivers/hid/hid-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 4548dae..5bec924 100644 --- a/drivers/hid/hid-core.c +

[RESEND PATCH] ASoC: Intel: Skylake: Mark expected switch fall-through

2018-08-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: 1357418 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/intel/skylake/skl-pcm.c | 1 + 1 file changed, 1 insertion(+) di

[PATCH] ASoC: adav80x: mark expected switch fall-through

2018-08-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: 1056531 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/adav80x.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH] ASoC: adau1761: Mark expected switch fall-though

2018-08-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: 114879 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/adau1761.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletio

[PATCH] ALSA: opl3: Mark expected switch fall-through

2018-08-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: 114878 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/drivers/opl3/opl3_midi.c | 1 + 1 file changed, 1 insertion(+) diff --g

[PATCH] ALSA: mixart_core: Mark expected switch fall-through

2018-08-08 Thread Gustavo A. R. Silva
("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/pci/mixart/mixart_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/mixart/mixart_core.c b/sound/pci/mixart/mixart_core.c index 46c292b..71776bf 100644 --- a/sound/pci/mixart/mixar

[PATCH] ALSA: usb-audio: Mark expected switch fall-through

2018-08-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: 1357413 ("Missing break in switch") Addresses-Coverity-ID: 114917 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/u

[PATCH] mtd: block2mtd: mark expected switch fall-throughs

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

[PATCH] Bluetooth: mediatek: Fix memory leak

2018-08-14 Thread Gustavo A. R. Silva
In case memory resources for *fw* were allocated, release them before return. Addresses-Coverity-ID: 1472611 ("Resource leak") Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices") Signed-off-by: Gustavo A. R. Silva --- drivers/bluet

[PATCH] apparmor: remove dead code

2018-08-23 Thread Gustavo A. R. Silva
841091f28 ("apparmor: remove no-op permission check in policy_unpack") Signed-off-by: Gustavo A. R. Silva --- security/apparmor/policy_unpack.c | 4 1 file changed, 4 deletions(-) diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index 3647b58.

Re: [PATCH] apparmor: remove dead code

2018-08-23 Thread Gustavo A. R. Silva
On 8/23/18 1:21 PM, John Johansen wrote: > On 08/23/2018 06:42 AM, Gustavo A. R. Silva wrote: > > thank you for the patch, but a fix for this issue was pushed to apparmor-next > yesterday > That's great. Good to know. Thanks -- Gustavo

[PATCH] rtc: sun6i: Use struct_size() in kzalloc()

2018-08-23 Thread Gustavo A. R. Silva
(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); Signed-off-by: Gustavo A. R. Silva --- drivers/rtc/rtc-sun6i.c | 3

[PATCH] mtd: rawnand: jz4780: use struct_size() in devm_kzalloc()

2018-08-23 Thread Gustavo A. R. Silva
, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL); Signed-off-by: Gustavo A. R. Silva --- drivers

Re: [PATCH] rtc: sun6i: Use struct_size() in kzalloc()

2018-08-23 Thread Gustavo A. R. Silva
On 8/23/18 3:56 PM, Kees Cook wrote: >> >> - clk_data = kzalloc(sizeof(*clk_data) + (sizeof(*clk_data->hws) * 2), >> - GFP_KERNEL); >> + clk_data = kzalloc(struct_size(clk_data, hws, 2), GFP_KERNEL); >> if (!clk_data) { >> kfree(rtc);

[PATCH] clk: npcm7xx: fix memory allocation

2018-08-23 Thread Gustavo A. R. Silva
: sizeof(npcm7xx_clk_data) should be sizeof(*npcm7xx_clk_data) Fix this bug by using struct_size() in kzalloc() This issue was detected with the help of Coccinelle. Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- drivers/clk/clk-npcm7xx.c | 4 ++-- 1 file changed, 2 insertions

[PATCH] memory: atmel-ebi: Use struct_size() in devm_kzalloc()

2018-08-23 Thread Gustavo A. R. Silva
Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/memory/atmel-ebi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c index b907865..c3748b4 100644 --- a/drivers/memory/atmel-ebi.c +++ b/drivers/memory/atmel-ebi.c

[PATCH] mtd: rawnand: atmel: use struct_size() in devm_kzalloc()

2018-08-23 Thread Gustavo A. R. Silva
Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/mtd/nand/raw/atmel/nand-controller.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index a068b21..b17cfd0 100644 --- a/drivers

[PATCH] drivers: qcom: rpmh: use struct_size() in kzalloc()

2018-08-23 Thread Gustavo A. R. Silva
: Gustavo A. R. Silva --- drivers/soc/qcom/rpmh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c index c7beb68..12c057a 100644 --- a/drivers/soc/qcom/rpmh.c +++ b/drivers/soc/qcom/rpmh.c @@ -362,8 +362,7 @@ int rpmh_write_batch

Re: [PATCH] fsi: master-ast-cf: Fix memory leak

2018-07-25 Thread Gustavo A. R. Silva
On 07/25/2018 06:45 PM, Benjamin Herrenschmidt wrote: > On Wed, 2018-07-25 at 08:38 -0500, Gustavo A. R. Silva wrote: >> In case memory resources for *fw* were allocated, release them >> before return. >> >> Addresses-Coverity-ID: 1472044 ("Resource leak")

Re: [PATCH] reset: hisilicon: fix potential NULL pointer dereference

2018-07-25 Thread Gustavo A. R. Silva
Hi Stephen, On 07/25/2018 06:45 PM, Stephen Boyd wrote: > Quoting Gustavo A. R. Silva (2018-07-18 18:58:45) >> There is a potential execution path in which function >> platform_get_resource() returns NULL. If this happens, >> we will end up having a NULL pointer dereferen

[PATCH v2] reset: hisilicon: fix potential NULL pointer dereference

2018-07-25 Thread Gustavo A. R. Silva
detected with the help of Coccinelle. Cc: sta...@vger.kernel.org Fixes: 97b7129cd2af ("reset: hisilicon: change the definition of hisi_reset_init") Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Use devm_ioremap_resource. Thanks to Stephen Boyd for pointing it out. d

[PATCH v2] mailbox: xgene-slimpro: Fix potential NULL pointer dereference

2018-07-26 Thread Gustavo A. R. Silva
detected with the help of Coccinelle. Cc: sta...@vger.kernel.org Fixes: f700e84f417b ("mailbox: Add support for APM X-Gene platform mailbox driver") Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Replace devm_ioremap with devm_ioremap_resource. drivers/mailbox/mailbox-xgene-sli

[PATCH v2] ext4: use swap macro in mext_page_double_lock

2018-07-26 Thread Gustavo A. R. Silva
Make use of the swap macro 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 --- Changes in v2: - Update changelog. Remove the line claiming that this patch reduces

[PATCH] ASoC: sirf: Fix potential NULL pointer dereference

2018-07-26 Thread Gustavo A. R. Silva
detected with the help of Coccinelle. Cc: sta...@vger.kernel.org Fixes: 2bd8d1d5cf89 ("ASoC: sirf: Add audio usp interface driver") Signed-off-by: Gustavo A. R. Silva --- sound/soc/sirf/sirf-usp.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/sirf/si

Re: [PATCH] net: sched: cls_api: fix dead code in switch

2018-07-26 Thread Gustavo A. R. Silva
On 07/26/2018 04:10 PM, David Miller wrote: > From: "Gustavo A. R. Silva" > Date: Wed, 25 Jul 2018 09:07:24 -0500 > >> Code at line 1850 is unreachable. Fix this by removing the break >> statement above it, so the code for case RTM_GETCHAIN can be >&g

[PATCH linux-next] Remove PTR_RET

2018-07-27 Thread Gustavo A. R. Silva
The last instances of PTR_RET have been replaced with PTR_ERR_OR_ZERO. We can completely remove PTR_RET from the codebase now. Signed-off-by: Gustavo A. R. Silva --- include/linux/err.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/err.h b/include/linux/err.h index

[PATCH] reset: hisilicon: fix potential NULL pointer dereference

2018-07-18 Thread Gustavo A. R. Silva
: sta...@vger.kernel.org Fixes: 97b7129cd2af ("reset: hisilicon: change the definition of hisi_reset_init") Signed-off-by: Gustavo A. R. Silva --- drivers/clk/hisilicon/reset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/hisilicon/reset.c b/drivers/clk/hisilicon/res

[PATCH] mailbox: xgene-slimpro: Fix potential NULL pointer dereference

2018-07-18 Thread Gustavo A. R. Silva
: sta...@vger.kernel.org Fixes: f700e84f417b ("mailbox: Add support for APM X-Gene platform mailbox driver") Signed-off-by: Gustavo A. R. Silva --- drivers/mailbox/mailbox-xgene-slimpro.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c

[PATCH] s390/ap_bus: replace PTR_RET with PTR_ERR_OR_ZERO

2018-07-18 Thread Gustavo A. R. Silva
PTR_RET is deprecated, use PTR_ERR_OR_ZERO instead. Signed-off-by: Gustavo A. R. Silva --- drivers/s390/crypto/ap_bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index c0a6723..bf27fc4 100644 --- a/drivers

[PATCH] s390/tape: replace PTR_RET with PTR_ERR_OR_ZERO

2018-07-18 Thread Gustavo A. R. Silva
PTR_RET is deprecated, use PTR_ERR_OR_ZERO instead. Signed-off-by: Gustavo A. R. Silva --- drivers/s390/char/tape_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index e403edf..b58df0d 100644 --- a

[PATCH] s390/dasd: replace PTR_RET with PTR_ERR_OR_ZERO

2018-07-18 Thread Gustavo A. R. Silva
PTR_RET is deprecated, use PTR_ERR_OR_ZERO instead. Signed-off-by: Gustavo A. R. Silva --- drivers/s390/block/dasd_eckd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index bbf95b7..c5a5551 100644 --- a

[PATCH] s390/hypfs: Replace PTR_RET with PTR_ERR_OR_ZERO

2018-07-18 Thread Gustavo A. R. Silva
PTR_RET is deprecated, use PTR_ERR_OR_ZERO instead. Signed-off-by: Gustavo A. R. Silva --- arch/s390/hypfs/hypfs_diag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c index a2945b2..3452e18 100644 --- a/arch

Re: [PATCH] power: supply: max77693_charger: fix unintentional fall-through

2018-07-19 Thread Gustavo A. R. Silva
Hi Krzysztof, On 07/18/2018 01:14 AM, Krzysztof Kozlowski wrote: > On 17 July 2018 at 23:47, Gustavo A. R. Silva wrote: >> It seems that a *break* is missing in order to avoid a fall-through. >> Otherwise, the calculation of *data* makes no sense. >> >> Addresses-Cov

Re: [PATCH] mtd: nuc900_nand: mark expected switch fall-through

2018-07-19 Thread Gustavo A. R. Silva
Hi Miquel, On 07/18/2018 03:03 AM, Miquel Raynal wrote: > Hi Gustavo, > > Prefix should be "mtd: rawnand: nuc900:" > Oh OK. I'll fix it. Thanks. > "Gustavo A. R. Silva" wrote on Tue, 10 Jul > 2018 08:29:02 -0500: > >> In preparation t

Re: [PATCH v2] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-19 Thread Gustavo A. R. Silva
Hi Alex, Harry, I wonder if this patch should have been tagged for stable. Thanks -- Gustavo On 07/04/2018 08:22 AM, Gustavo A. R. Silva wrote: > Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and > feedback_divider to uint64_t in order to avoid multiple potential i

Re: [PATCH] mtd: nuc900_nand: mark expected switch fall-through

2018-07-19 Thread Gustavo A. R. Silva
Hi Miquel, On 07/18/2018 03:03 AM, Miquel Raynal wrote: > Hi Gustavo, > > Prefix should be "mtd: rawnand: nuc900:" > Oh OK. I'll fix it. > "Gustavo A. R. Silva" wrote on Tue, 10 Jul > 2018 08:29:02 -0500: > >> In preparation to enabling -

[PATCH] PCI: mediatek: Fix unchecked return value

2018-07-20 Thread Gustavo A. R. Silva
Check return value of devm_pci_remap_iospace. Notice that, currently, all instances of devm_pci_remap_iospace are being checked. Addresses-Coverity-ID: 1471965 ("Unchecked return value") Signed-off-by: Gustavo A. R. Silva --- drivers/pci/controller/pcie-mediatek.c | 4 +++- 1 file

Re: [PATCH] ext4: use swap macro in mext_page_double_lock

2018-07-22 Thread Gustavo A. R. Silva
Hi Theodore, On 07/22/2018 05:19 PM, Theodore Y. Ts'o wrote: > On Mon, Jul 09, 2018 at 08:16:00AM -0500, Gustavo A. R. Silva wrote: >> Make use of the swap macro and remove unnecessary variable *tmp*. >> This makes the code easier to read and maintain. Also, reduces the >&g

[PATCH] net/mlx5e: Fix uninitialized variable

2018-07-31 Thread Gustavo A. R. Silva
P pre-requisite checks in a single function") Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/

[PATCH] afs: Mark expected switch fall-throughs

2018-07-31 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva --- fs/afs/cmservice.c | 10 -- fs/afs/file.c | 2 ++ fs/afs/fsclient.c | 41

[PATCH] NFS: Mark expected switch fall-throughs

2018-07-31 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva --- fs/nfs/blocklayout/blocklayout.c | 1 + fs/nfs/nfs3acl.c | 2 ++ fs/nfs

[PATCH] nfsd: Mark expected switch fall-through

2018-07-31 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva --- fs/nfsd/nfs4callback.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfsd

[PATCH] ALSA: pcm: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1357375 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/core/oss/pcm_plugin.c | 1 + 1 file changed, 1 insertion(+) diff --g

[PATCH] ALSA: usb: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115084 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/usb/pcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/u

[PATCH 00/11] ASoC: codecs: Mark expected switch fall-throughs

2018-08-01 Thread Gustavo A. R. Silva
Hi all, In preparation to enabling -Wimplicit-fallthrough, this patchset aims to add some annotations in order to mark switch cases where we are expecting to fall through. Thanks Gustavo A. R. Silva (11): ASoC: wm8961: Mark expected switch fall-through ASoC: rt5640: Mark expected switch

[PATCH 01/11] ASoC: wm8961: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1271173 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8961.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 02/11] ASoC: rt5640: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056547 ("Missing break in switch") Addresses-Coverity-ID: 1056548 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc

[PATCH 03/11] ASoC: rt5677: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1271174 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/rt5677.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 04/11] ASoC: wm8955: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115047 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8955.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 05/11] ASoC: wm8960: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115041 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8960.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 06/11] ASoC: wm8904: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115042 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8904.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 07/11] ASoC: wm8996: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 146354 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8996.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 08/11] ASoC: wm8962: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115043 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8962.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 10/11] ASoC: wm9081: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1357430 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm9081.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 09/11] ASoC: wm8995: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115045 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8995.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 11/11] ASoC: wm8994: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115050 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- sound/soc/codecs/wm8994.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH] Smack: Mark expected switch fall-through

2018-08-01 Thread Gustavo A. R. Silva
was used: -Wimplicit-fallthrough=2 Addresses-Coverity-ID: 115051 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva --- security/smack/smack_lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index ad45761.

[PATCH] fs: dcache: Use true and false for boolean values

2018-08-01 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- fs/dcache.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs

[PATCH] nfsd: use true and false for boolean values

2018-08-01 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- fs/nfsd/nfsfh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nfsd

[PATCH] fs: buffer: use true and false for boolean values

2018-08-01 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- fs/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/buffer.c b/fs

[PATCH] pnfs: Use true and false for boolean values

2018-08-01 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- fs/nfs/pnfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/pnfs.c b/fs

[PATCH] ftrace: Use true and false for boolean values

2018-08-01 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- kernel/trace/ftrace.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH] sched/headers: Use true and false for boolean values

2018-08-01 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- kernel/sched/autogroup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel

[PATCH] fsi: master-ast-cf: Fix memory leak

2018-07-25 Thread Gustavo A. R. Silva
In case memory resources for *fw* were allocated, release them before return. Addresses-Coverity-ID: 1472044 ("Resource leak") Fixes: 6a794a27daca ("fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire") Signed-off-by: Gustavo A. R. Silva --- drivers/fsi/fsi

[PATCH] net: sched: cls_api: fix dead code in switch

2018-07-25 Thread Gustavo A. R. Silva
Code at line 1850 is unreachable. Fix this by removing the break statement above it, so the code for case RTM_GETCHAIN can be properly executed. Addresses-Coverity-ID: 1472050 ("Structurally dead code") Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") Signed-

[PATCH] rds: send: Fix dead code in rds_sendmsg

2018-07-25 Thread Gustavo A. R. Silva
DS IPv6 support") Signed-off-by: Gustavo A. R. Silva --- net/rds/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/send.c b/net/rds/send.c index 9604e1f..18e2b4d 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -1126,7 +1126,7 @@ int rds_sendmsg(struct

Re: [PATCH] net: ipv6: ndisc: fix bool assignment in ndisc_send_na

2018-01-23 Thread Gustavo A. R. Silva
Quoting David Miller : From: "Gustavo A. R. Silva" Date: Mon, 22 Jan 2018 16:22:13 -0600 Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Fixes: 1cb3fe513f62 ("ndisc: Break down ndisc_build_

[PATCH] char: lp: use true or 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 --- drivers/char/lp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/lp.c b/drivers/char/lp.c index

[PATCH] USB: misc: chaoskey: 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 --- drivers/usb/misc/chaoskey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/misc/chaoskey.c b

[PATCH] usb: dwc2: gadget: 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 --- drivers/usb/dwc2/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b

[PATCH] ACPI / video: Use true for boolean value

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 --- drivers/acpi/acpi_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpi_video.c b/drivers

Re: [PATCH] net: ipv6: ndisc: fix bool assignment in ndisc_send_na

2018-01-23 Thread Gustavo A. R. Silva
Quoting David Miller : [..] Please don't use the word "fix". '0' is the same as 'false', it's just that the latter is more consistent type wise. So "Use true and false for boolean value" would be a better subject? Yes. I got it. Thanks -- Gustavo

[PATCH] drm/etnaviv: fix '%x' warning

2018-01-23 Thread Gustavo A. R. Silva
tions") Signed-off-by: Gustavo A. R. Silva --- This code was compiled with GCC 7.2.0 drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c index d113fe0..49e0497 10

[PATCH] drm/edid: use false for boolean value

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 --- drivers/gpu/drm/drm_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers

[PATCH] i2c: mxs: 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 --- drivers/i2c/busses/i2c-mxs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mxs.c b

[PATCH] venus: hfi: use true 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 --- drivers/media/platform/qcom/venus/hfi_msgs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media

[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 --- drivers/android/binder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/android/binder.c b

<    1   2   3   4   5   6   7   8   9   10   >