[PATCH][next] crypto/nx: Avoid potential -Wflex-array-member-not-at-end warning

2024-03-25 Thread Gustavo A. R. Silva
/issues/202 Signed-off-by: Gustavo A. R. Silva --- drivers/crypto/nx/nx-842.c | 6 -- drivers/crypto/nx/nx-842.h | 11 +++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c index 2ab90ec10e61..82214cde2bcd 100644

[PATCH][next] crypto/nx: Avoid -Wflex-array-member-not-at-end warning

2024-03-05 Thread Gustavo A. R. Silva
; |^~ Signed-off-by: Gustavo A. R. Silva --- drivers/crypto/nx/nx-842.c | 6 -- drivers/crypto/nx/nx-842.h | 10 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c index 2ab90ec10e61..82214cde2bcd 100644 --- a/drivers

Re: [PATCH] powerpc/lib: Avoid array bounds warnings in vec ops

2023-11-23 Thread Gustavo A. R. Silva
-by: Gustavo A. R. Silva Build-tested-by: Gustavo A. R. Silva Thank you guys! -- Gustavo [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2023-November/265936.html

[PATCH][next] powerpc/crypto: Avoid -Wstringop-overflow warnings

2023-11-21 Thread Gustavo A. R. Silva
htable` in the function prototype; and just for consistency, do the same for parameter `Xi`. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20231121131903.68a37...@canb.auug.org.au/ Signed-off-by: Gustavo A. R. Silva --- arch/powerpc/crypto/aes-gcm-p10-glue.c | 2 +-

Re: [PATCH] powerpc/lib: Avoid array bounds warnings in vec ops

2023-11-20 Thread Gustavo A. R. Silva
-by: Gustavo A. R. Silva Signed-off-by: Michael Ellerman Reviewed-by: Gustavo A. R. Silva Build-tested-by: Gustavo A. R. Silva This indeed makes all those warnings go away. :) Thanks, Michael! -- Gustavo --- arch/powerpc/lib/sstep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [RFC - is this a bug?] powerpc/lib/sstep: Asking for some light on this, please. :)

2023-11-20 Thread Gustavo A. R. Silva
On 11/20/23 09:21, Naveen N Rao wrote: On Mon, Nov 20, 2023 at 08:33:45AM -0600, Gustavo A. R. Silva wrote: On 11/20/23 08:25, Naveen N Rao wrote: On Fri, Nov 17, 2023 at 12:36:01PM -0600, Gustavo A. R. Silva wrote: Hi all, I'm trying to fix the following -Wstringop-overflow warnings

Re: [RFC - is this a bug?] powerpc/lib/sstep: Asking for some light on this, please. :)

2023-11-20 Thread Gustavo A. R. Silva
On 11/20/23 08:25, Naveen N Rao wrote: On Fri, Nov 17, 2023 at 12:36:01PM -0600, Gustavo A. R. Silva wrote: Hi all, I'm trying to fix the following -Wstringop-overflow warnings, and I'd like to get your feedback on this, please: In function 'do_byte_reverse', inlined from

[RFC - is this a bug?] powerpc/lib/sstep: Asking for some light on this, please. :)

2023-11-17 Thread Gustavo A. R. Silva
Hi all, I'm trying to fix the following -Wstringop-overflow warnings, and I'd like to get your feedback on this, please: In function 'do_byte_reverse', inlined from 'do_vec_store' at /home/gus/linux/arch/powerpc/lib/sstep.c:722:3, inlined from 'emulate_loadstore' at

[PATCH][next] net: spider_net: Use size_add() in call to struct_size()

2023-09-15 Thread Gustavo A. R. Silva
t;) Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/toshiba/spider_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net/ethernet/toshiba/spider_net.c index 50d7eacfec58..87e67121477c 100644 --- a/drivers/ne

Re: [PATCH][next] powerpc: Fix fall-through warning for Clang

2022-09-23 Thread Gustavo A. R. Silva
Applied to powerpc/next. Great. :) Thanks, Michael. -- Gustavo

[PATCH][next] powerpc/xmon: Fix -Wswitch-unreachable warning in bpt_cmds

2022-09-16 Thread Gustavo A. R. Silva
: warning: statement will never be executed [-Wswitch-unreachable] 1529 | int mode; | ^~~~ Fixes: 09b6c1129f89 ("powerpc/xmon: Fix compile error with PPC_8xx=y") Signed-off-by: Gustavo A. R. Silva --- arch/powerpc/xmon/xmon.c | 7 --- 1 file changed, 4 insert

[PATCH][next] powerpc: Fix fall-through warning for Clang

2022-09-06 Thread Gustavo A. R. Silva
.kxorrgvg-...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 48f3acfece0b..0b8f2101c5fb 100644 --- a/arch

Re: [PATCH][next] powerpc/vas: Fix potential NULL pointer dereference

2021-10-26 Thread Gustavo A. R. Silva
On Wed, Oct 27, 2021 at 09:30:53AM +1100, Michael Ellerman wrote: [..] > > I think I'll take this in my tree. > > I've already put it in powerpc/next: > > > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next=61cb9ac66b30374c7fd8a8b2a3c4f8f432c72e36 Oh, great. :)

Re: [PATCH][next] powerpc/vas: Fix potential NULL pointer dereference

2021-10-26 Thread Gustavo A. R. Silva
On Mon, Oct 18, 2021 at 02:09:31PM -0700, Tyrel Datwyler wrote: > On 10/14/21 10:03 PM, Gustavo A. R. Silva wrote: > > (!ptr && !ptr->foo) strikes again. :) > > > > The expression (!ptr && !ptr->foo) is bogus and in case ptr is NULL, > >

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

2021-10-20 Thread Gustavo A. R. Silva
On Mon, Sep 20, 2021 at 07:05:07PM -0500, Gustavo A. R. Silva wrote: > > > On 9/18/21 09:21, Len Baker 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 > >

Re: [PATCH][next] powerpc/vas: Fix potential NULL pointer dereference

2021-10-18 Thread Gustavo A. R. Silva
On Mon, Oct 18, 2021 at 02:09:31PM -0700, Tyrel Datwyler wrote: > On 10/14/21 10:03 PM, Gustavo A. R. Silva wrote: > > (!ptr && !ptr->foo) strikes again. :) > > > > The expression (!ptr && !ptr->foo) is bogus and in case ptr is NULL, > >

[PATCH][next] powerpc/vas: Fix potential NULL pointer dereference

2021-10-14 Thread Gustavo A. R. Silva
ed manually. Fixes: 1a0d0d5ed5e3 ("powerpc/vas: Add platform specific user window operations") Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- arch/powerpc/platforms/book3s/vas-api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc

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

2021-09-20 Thread Gustavo A. R. Silva
-one-element-arrays > > Signed-off-by: Len Baker Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > arch/powerpc/include/asm/kvm_host.h | 2 +- > arch/powerpc/kvm/book3s_64_vio.c| 3 +-- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git

Re: Radeon NI: GIT kernel with the nislands_smc commit doesn't boot on a Freescale P5040 board and P.A.Semi Nemo board

2021-05-09 Thread Gustavo A. R. Silva
nk you! -- Gustavo > > Have a nice day, > Christian > > > On 07 May 2021 at 08:43am, Christian Zigotzky wrote: >> Hi Gustavo, >> >> Great! I will test it. Many thanks for your help. >> >> Cheers, >> Christian >> >> >>> On 7. Ma

Re: Radeon NI: GIT kernel with the nislands_smc commit doesn't boot on a Freescale P5040 board and P.A.Semi Nemo board

2021-05-06 Thread Gustavo A. R. Silva
Hi Christian, On 4/30/21 06:59, Christian Zigotzky wrote: > Hello, > > The Nemo board (A-EON AmigaOne X1000) [1] and the FSL P5040 Cyrus+ board > (A-EON AmigaOne X5000) [2] with installed AMD Radeon HD6970 NI graphics cards > (Cayman > XT) [3] don't boot with the latest git kernel anymore

Re: Radeon NI: GIT kernel with the nislands_smc commit doesn't boot on a Freescale P5040 board and P.A.Semi Nemo board

2021-04-30 Thread Gustavo A. R. Silva
On 4/30/21 10:26, Deucher, Alexander wrote: > [AMD Public Use] > > + Gustavo, amd-gfx > >> -Original Message- >> From: Christian Zigotzky >> Sent: Friday, April 30, 2021 8:00 AM >> To: gustavo...@kernel.org; Deucher, Alexander >> >> Cc: R.T.Dickinson ; Darren Stevens > zone.net>;

Re: [PATCH v2 0/3] PPC: Fix -Wimplicit-fallthrough for clang

2020-11-18 Thread Gustavo A. R. Silva
Nick, On Tue, Nov 17, 2020 at 04:07:48PM -0800, Nick Desaulniers wrote: > While cleaning up the last few -Wimplicit-fallthrough warnings in tree > for Clang, I noticed > commit 6a9dc5fd6170d ("lib: Revert use of fallthrough pseudo-keyword in lib/") > which seemed to undo a bunch of fixes in lib/

Re: [PATCH 2/3] Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"

2020-11-17 Thread Gustavo A. R. Silva
On Tue, Nov 17, 2020 at 02:28:43PM -0800, Nick Desaulniers wrote: > On Tue, Nov 17, 2020 at 2:16 PM Gustavo A. R. Silva > wrote: > > > > I'm happy to take this series in my tree. I'm planing to send a > > pull-request for -rc5 with more related changes. So, I can include

Re: [PATCH 2/3] Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"

2020-11-17 Thread Gustavo A. R. Silva
On Tue, Nov 17, 2020 at 11:10:26AM -0800, Nick Desaulniers wrote: > On Mon, Nov 16, 2020 at 7:02 PM Nathan Chancellor > wrote: > > > > On Sun, Nov 15, 2020 at 08:35:31PM -0800, Nick Desaulniers wrote: > > > This reverts commit 6a9dc5fd6170 ("lib: Revert use of fallthrough > > > pseudo-keyword in

Re: [PATCH 3/3] powerpc: fix -Wimplicit-fallthrough

2020-11-15 Thread Gustavo A. R. Silva
se cases. > > Link: https://github.com/ClangBuiltLinux/linux/issues/236 > Signed-off-by: Nick Desaulniers Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > arch/powerpc/kernel/prom_init.c | 1 + > arch/powerpc/kernel/uprobes.c | 1 + > arch/powerpc/perf/i

Re: [PATCH 2/3] Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"

2020-11-15 Thread Gustavo A. R. Silva
or lib/. > > Link: https://github.com/ClangBuiltLinux/linux/issues/236 > Signed-off-by: Nick Desaulniers Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > lib/asn1_decoder.c | 4 ++-- > lib/assoc_array.c | 2 +- > lib/bootconfig.c| 4 ++-- > l

Re: [PATCH 1/3] powerpc: boot: include compiler_attributes.h

2020-11-15 Thread Gustavo A. R. Silva
com/ClangBuiltLinux/linux/issues/236 > Signed-off-by: Nick Desaulniers Acked-by: Gustavo A. R. Silva Thanks, Nick. -- Gustavo > --- > We could just `#include "include/linux/compiler_types.h"` in the few .c > sources used from lib/ (there are proper header guards in > comp

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-09 Thread Gustavo A. R. Silva
eak; > > Found using: > > $ grep-2.5.4 -rP --include=*.[ch] -n > "fallthrough;(\s*(case\s+\w+|default)\s*:\s*){1,7}break;" * > > Miscellanea: > > o Move or coalesce a couple label blocks above a default: block. > > Signed-off-by: Joe P

Re: [GIT PULL] fallthrough pseudo-keyword macro conversions for 5.9-rc3

2020-08-24 Thread Gustavo A. R. Silva
Hi Nathan, On 8/24/20 14:43, Nathan Chancellor wrote: >> Gustavo A. R. Silva (1): >> treewide: Use fallthrough pseudo-keyword > > $ scripts/config --file arch/powerpc/configs/powernv_defconfig -e KERNEL_XZ > > $ make -skj"$(nproc)" ARCH=powerpc CROSS_CO

[PATCH][next] powerpc: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
-through Signed-off-by: Gustavo A. R. Silva --- arch/powerpc/kernel/align.c | 8 arch/powerpc/platforms/powermac/feature.c | 2 +- arch/powerpc/platforms/powernv/opal-async.c | 2 +- arch/powerpc/platforms/pseries/hvcserver.c | 2 +- arch/powerpc/xmon/xmon.c

[PATCH][next] dmaengine: Use fallthrough pseudo-keyword

2020-07-27 Thread Gustavo A. R. Silva
-through Signed-off-by: Gustavo A. R. Silva --- drivers/dma/amba-pl08x.c| 10 +- drivers/dma/fsldma.c| 2 +- drivers/dma/imx-dma.c | 2 +- drivers/dma/iop-adma.h | 12 ++-- drivers/dma/nbpfaxi.c | 2 +- drivers/dma/pl330.c | 10

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-20 Thread Gustavo A. R. Silva
On Wed, May 20, 2020 at 06:52:21PM -0500, Li Yang wrote: > On Mon, May 18, 2020 at 5:57 PM Kees Cook wrote: > > > > On Mon, May 18, 2020 at 05:19:04PM -0500, Gustavo A. R. Silva wrote: > > > The current codebase makes use of one-element arrays in the following > &

[PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-18 Thread Gustavo A. R. Silva
e size of struct qe_firmware. This issue was found with the help of Coccinelle and, audited and fixed _manually_. [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: Gus

[PATCH] powerpc/mm: Replace zero-length array with flexible-array

2020-05-07 Thread Gustavo A. R. Silva
elp to get completely rid of those sorts of issues. This issue was found with the help 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:

[PATCH] powerpc: Replace zero-length array with flexible-array

2020-05-07 Thread Gustavo A. R. Silva
elp to get completely rid of those sorts of issues. This issue was found with the help 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:

[PATCH] treewide: Replace zero-length array with flexible-array

2020-05-07 Thread Gustavo A. R. Silva
elp to get completely rid of those sorts of issues. This issue was found with the help 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:

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

2020-02-25 Thread Gustavo A. R. Silva
On 2/25/20 07:44, Horia Geanta wrote: > On 2/24/2020 6:18 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][next] toshiba: Replace zero-length array with flexible-array member

2020-02-24 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/net/ethernet/toshiba/ps3_gelic_net.h | 2 +- drivers/net/ethernet/toshiba/ps3_

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

2020-02-24 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/crypto/caam/caamalg.c | 2 +- drivers/crypto/caam/caamalg_qi.c

Re: [PATCH] powerpc: sysdev: xive: Fix use true/false for bool type

2019-10-28 Thread Gustavo A. R. Silva
This is not actually a 'fix' I suggest you to rephrase the subject in a different way and remove the word 'fix' from it. On 10/28/19 22:40, Saurav Girepunje wrote: > Use true/false for bool return type in xive_spapr_cleanup_queue > function. > How do you find this? If you used a tool to

[PATCH] dmaengine: fsldma: Mark expected switch fall-through

2019-08-11 Thread Gustavo A. R. Silva
->toggle_ext_pause = fsl_chan_toggle_ext_pause; ~~~^~~ drivers/dma/fsldma.c:1166:2: note: here case FSL_DMA_IP_83XX: ^~~~ Reported-by: kbuild test robot Signed-off-by: Gustavo A. R. Silva --- drivers/dma/fsldma.c | 1 + 1 file changed, 1 insert

Re: [PATCH] powerpc/kvm: Fall through switch case explicitly

2019-07-29 Thread Gustavo A. R. Silva
On 7/29/19 10:50 PM, Stephen Rothwell wrote: > Hi Gustavo, > > On Mon, 29 Jul 2019 22:30:34 -0500 "Gustavo A. R. Silva" > wrote: >> >> If no one takes it by tomorrow, I'll take it in my tree. > > I am assuming that Michael Ellerman will take it in

Re: [PATCH] powerpc/kvm: Fall through switch case explicitly

2019-07-29 Thread Gustavo A. R. Silva
Hi Stephen, On 7/29/19 10:18 PM, Stephen Rothwell wrote: > Hi all, > > On Mon, 29 Jul 2019 18:45:40 -0500 "Gustavo A. R. Silva" > wrote: >> >> On 7/29/19 3:16 AM, Stephen Rothwell wrote: >>> >>> On Mon, 29 Jul 2019 11:25:36 +0530 Santosh S

Re: [PATCH] powerpc/kvm: Fall through switch case explicitly

2019-07-29 Thread Gustavo A. R. Silva
>> Signed-off-by: Santosh Sivaraj Reviewed-by: Gustavo A. R. Silva Thanks! -- Gustavo >> --- >> arch/powerpc/kvm/book3s_32_mmu.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/powerpc/kvm/book3s_32_mmu.c >> b/arch/powerpc/kvm/book3s_32

[PATCH] scsi: ibmvfc: Mark expected switch fall-throughs

2019-07-28 Thread Gustavo A. R. Silva
bmvscsi/ibmvfc.c:1841:2: note: here case FC_BSG_RPT_CT: ^~~~ Reported-by: Stephen Rothwell Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/ibmvscsi/ibmvfc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 8cdbac076a

Re: [PATCH V5] ASoC: fsl_esai: Fix missing break in switch statement

2019-05-01 Thread Gustavo A. R. Silva
Mark, I wonder if you are going to take this patch. Thanks -- Gustavo On 4/11/19 3:43 AM, S.j. Wang wrote: > case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be > independent of each other, so replace fall-through with break. > > Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI

Re: [PATCH V4] ASoC: fsl_esai: Fix missing break in switch statement

2019-04-10 Thread Gustavo A. R. Silva
On 4/10/19 10:24 PM, Gustavo A. R. Silva wrote: > [+cc lkml] > > On 4/10/19 10:05 PM, S.j. Wang wrote: >> case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be >> independent of each other, so replace fall-through with break. >> >> Fixes: 43d24e76b698 (

Re: [PATCH V4] ASoC: fsl_esai: Fix missing break in switch statement

2019-04-10 Thread Gustavo A. R. Silva
[+cc lkml] On 4/10/19 10:05 PM, S.j. Wang wrote: > case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be > independent of each other, so replace fall-through with break. > > Fixes: 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver") > > Signed-off-by: Shengjiu Wang > Acked-by: Nicolin

Re: [PATCH V2] ASoC: fsl_esai: replace fall-through with break

2019-04-10 Thread Gustavo A. R. Silva
On 4/9/19 9:42 PM, S.j. Wang wrote: > case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be independent of > each other, so replace fall-through with break. > I think you should change the subject line to: fix missing break in switch statement ...because you are fixing a bug, and it's

Re: [EXT] Re: [PATCH V1] ASoC: fsl_esai: replace fall-through with break

2019-04-08 Thread Gustavo A. R. Silva
Hi Shengjiu, On 4/8/19 9:54 PM, S.j. Wang wrote: > Hi Gustavo > >> >> >> On 4/8/19 4:28 AM, S.j. Wang wrote: >>> case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be >> independent of >>> each other, so replace fall-through with break. >>> >> If this is correct, then you should use the

Re: [PATCH V1] ASoC: fsl_esai: replace fall-through with break

2019-04-08 Thread Gustavo A. R. Silva
On 4/8/19 4:28 AM, S.j. Wang wrote: > case ESAI_HCKT_EXTAL and case ESAI_HCKR_EXTAL should be independent of > each other, so replace fall-through with break. > If this is correct, then you should use the following "Fixes" tag instead, which is the one that introduced the bug: Fixes:

[PATCH] tty: hvc_xen: Mark expected switch fall-through

2019-02-25 Thread Gustavo A. R. Silva
GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough Signed-off-by: Gustavo A. R. Silva --- drivers/tty/hvc/hvc_xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index dc43fa96c

Re: [PATCH V2] powerpc/ptrace: Mitigate potential Spectre v1

2019-01-30 Thread Gustavo A. R. Silva
irst load and not worry if it can be > completed with a dependent load/store [1]. > > [1] https://marc.info/?l=linux-kernel=152449131114778=2 > > Signed-off-by: Breno Leitao Acked-by: Gustavo A. R. Silva > --- > arch/powerpc/kernel/ptrace.c | 8 +++- > 1 file changed, 7 insertions

Re: [PATCH] powerpc/ptrace: Mitigate potential Spectre v1

2019-01-29 Thread Gustavo A. R. Silva
Hi Breno, On 1/29/19 10:38 AM, Breno Leitao wrote: > Hi Gustavo, > > On 1/24/19 3:25 PM, Gustavo A. R. Silva wrote: >> >> >> On 1/24/19 8:01 AM, Breno Leitao wrote: >>> 'regno' is directly controlled by user space, hence leading to a potential >&

Re: powerpc/ps3: Use struct_size() in kzalloc()

2019-01-24 Thread Gustavo A. R. Silva
On 1/23/19 9:40 PM, Michael Ellerman wrote: > On Tue, 2019-01-08 at 21:00:10 UTC, "Gustavo A. R. Silva" wrote: >> One of the more common cases of allocation size calculations is finding the >> size of a structure that has a zero-sized array at the end, along with

Re: [PATCH] powerpc/ptrace: Mitigate potential Spectre v1

2019-01-24 Thread Gustavo A. R. Silva
On 1/24/19 8:01 AM, Breno Leitao wrote: > 'regno' is directly controlled by user space, hence leading to a potential > exploitation of the Spectre variant 1 vulnerability. > > On PTRACE_SETREGS and PTRACE_GETREGS requests, user space passes the > register number that would be read or written.

Re: [PATCH] powerpc/ps3: Use struct_size() in kzalloc()

2019-01-16 Thread Gustavo A. R. Silva
Hi Geoff, On 1/16/19 11:21 AM, Geoff Levand wrote: Hi Gustavo, On 1/8/19 1:00 PM, Gustavo A. R. Silva wrote: One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements

[PATCH] powerpc/ps3: Use struct_size() in kzalloc()

2019-01-08 Thread Gustavo A. R. Silva
A. R. Silva --- arch/powerpc/platforms/ps3/device-init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index e7075aaff1bb..59587b75493d 100644 --- a/arch/powerpc/platforms/ps3/device-init.c

[PATCH] powerpc/spufs: use struct_size() in kmalloc()

2019-01-08 Thread Gustavo A. R. Silva
A. R. Silva --- arch/powerpc/platforms/cell/spufs/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index ae8123edddc6..48c2477e7e2a 100644 --- a/arch/powerpc/platforms/cell/spufs

Re: New linux-next KCFLAGS

2018-11-26 Thread Gustavo A. R. Silva
On 11/26/18 8:00 AM, Stephen Rothwell wrote: Hi all, On Mon, 26 Nov 2018 17:49:26 +1100 Stephen Rothwell wrote: On Sun, 25 Nov 2018 21:46:20 -0800 Kees Cook wrote: Excellent! (Though, wait, does this mean everyone _else_ will see this too? I'm worried that will be way too noisy...)

Re: [PATCH 4/4] powerpc: Add -Wimplicit-fallthrough to arch CFLAGS

2018-10-13 Thread Gustavo A. R. Silva
On 10/13/18 3:23 AM, Kees Cook wrote: >> >> $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback >> include/linux/compat.h >> linux-ker...@vger.kernel.org (open list) > > Normally things like that go through akpm, but I'm happy to carry them > if needed. > Oh okay. Let me try

Re: [PATCH 4/4] powerpc: Add -Wimplicit-fallthrough to arch CFLAGS

2018-10-12 Thread Gustavo A. R. Silva
On 10/12/18 11:32 AM, Michael Ellerman wrote: > > Sure. The kbuild report up thread has some or most of them. > > But here's a full list: > > Failed 279/290 > http://kisskb.ellerman.id.au/kisskb/head/1d59e2c78793d8aea9949ca71323c4583c78f488/ > Failed:

Re: [PATCH 4/4] powerpc: Add -Wimplicit-fallthrough to arch CFLAGS

2018-10-11 Thread Gustavo A. R. Silva
Hi Michael, On 10/11/18 2:32 AM, Michael Ellerman wrote: > It still pops a few errors, including in linux/signal.h & compat.h, so > it's somewhat aspirational until we can get those fixed up :) > I wonder if you have a log containing those warnings that you can share with me. I'd like to fix

Re: [PATCH 4/4] powerpc: Add -Wimplicit-fallthrough to arch CFLAGS

2018-10-11 Thread Gustavo A. R. Silva
On 10/11/18 3:35 AM, Kees Cook wrote: > On Wed, Oct 10, 2018 at 5:32 PM, Michael Ellerman wrote: >> Kees Cook writes: >>> On Tue, Oct 9, 2018 at 10:13 PM, Michael Ellerman >>> wrote: Warn whenever a switch statement has a fallthrough without a comment annotating it.

[PATCH] powerpc/xmon/ppc-opc: Use ARRAY_SIZE macro

2018-10-04 Thread Gustavo A. R. Silva
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- arch/powerpc/xmon/ppc-opc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/xmon/ppc

[PATCH 2/7] ASoC: fsl_esai: Mark expected switch fall-through

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

[PATCH 0/7] ASoC: Mark expected switch fall-throughs

2018-08-03 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 (7): ASoC: davinci-i2s: mark expected switch fall-through ASoC: fsl_esai: Mark expected

[PATCH] ASoC: fsl_spdif: Use 64-bit arithmetic instead of 32-bit

2018-07-04 Thread Gustavo A. R. Silva
arithmetic: rate[index] * txclk_df * 64 Addresses-Coverity-ID: 1222129 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva --- sound/soc/fsl/fsl_spdif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spd

Re: macintosh: change some data types from int to bool

2018-02-03 Thread Gustavo A. R. Silva
Hi Michael, Quoting Michael Ellerman <m...@ellerman.id.au>: "Gustavo A. R. Silva" <garsi...@embeddedor.com> writes: Hi Michael, Quoting Michael Ellerman <patch-notificati...@ellerman.id.au>: On Wed, 2018-01-24 at 01:42:28 UTC, "Gustavo A. R. Si

Re: macintosh: change some data types from int to bool

2018-01-29 Thread Gustavo A. R. Silva
Hi Michael, Quoting Michael Ellerman <patch-notificati...@ellerman.id.au>: On Wed, 2018-01-24 at 01:42:28 UTC, "Gustavo A. R. Silva" wrote: Change the data type of the following variables from int to bool across all macintosh drivers: started slots_started pm121_started wf_s

[PATCH] macintosh/ams-input: 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/macintosh/ams/ams-input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] macintosh: change some data types from int to bool

2018-01-23 Thread Gustavo A. R. Silva
Change the data type of the following variables from int to bool across all macintosh drivers: started slots_started pm121_started wf_smu_started Some of these issues were detected with the help of Coccinelle. Suggested-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by: Gustav

Re: [PATCH] drivers/macintosh: Use true for boolean value

2018-01-23 Thread Gustavo A. R. Silva
Quoting "Gustavo A. R. Silva" <garsi...@embeddedor.com>: Quoting Michael Ellerman <m...@ellerman.id.au>: "Gustavo A. R. Silva" <gust...@embeddedor.com> writes: Assign true or false to boolean variables instead of an integer value. This issue wa

Re: [PATCH] drivers/macintosh: Use true for boolean value

2018-01-23 Thread Gustavo A. R. Silva
Quoting Michael Ellerman <m...@ellerman.id.au>: "Gustavo A. R. Silva" <gust...@embeddedor.com> writes: 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 &

[PATCH] drivers/macintosh: 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 <gust...@embeddedor.com> --- drivers/macintosh/windfarm_pm72.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-16 Thread Gustavo A. R. Silva
to get all the supporters, maintainers and lists: $ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback Thank you -- Gustavo A. R. Silva

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
Hi Joe, Quoting Joe Perches <j...@perches.com>: On Thu, 2017-07-13 at 10:18 -0500, Gustavo A. R. Silva wrote: Hi Mark, Quoting Mark Brown <broo...@kernel.org>: > On Thu, Jul 13, 2017 at 09:32:41AM +0200, Takashi Iwai wrote: > > > please stop posting in this styl

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
eryone affected by a single patch in the set on everything, that's harder to avoid when sending a series via git, but it can be confusing to get one item in a large patch series without context). I like this idea better. I will do so next time. :) Thank you -- Gustavo A. R. Silva

[PATCH] ASoC: fsl_esai: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/fsl/fsl_esai.c | 2

Re: [alsa-devel] [PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
thread. git-send-email does it right. I will do that. Thanks for the suggestion. -- Gustavo A. R. Silva I don't mind a couple of patches posted separately, but this is over the limit. thanks, Takashi On Thu, 13 Jul 2017 09:23:51 +0200, Gustavo A. R. Silva wrote: This structure is only

[PATCH] ASoC: fsl_asrc: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/fsl/fsl_asrc.c | 2

[PATCH] ASoC: fsl_spdif: constify snd_soc_dai_ops structure

2017-07-13 Thread Gustavo A. R. Silva
This structure is only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/fsl/fsl_spdif

[PATCH] usb: gadget: fsl_udc_core: compress return logic into one line

2017-07-09 Thread Gustavo A. R. Silva
Simplify return logic to avoid unnecessary variable assignment. This issue was detected using Coccinelle and the following semantic patch: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- d

[PATCH] ASoC: imx-ssi: add check on platform_get_irq return value

2017-06-30 Thread Gustavo A. R. Silva
Check return value from call to platform_get_irq(), so in case of failure print error message and propagate the return value. Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- sound/soc/fsl/imx-ssi.c | 4 1 file changed, 4 insertions(+) diff --git a/sound/soc/fsl/imx-s