Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region

2021-07-27 Thread Gustavo A. R. Silva
On Tue, Jul 27, 2021 at 01:57:52PM -0700, Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. Wrap the target region > in a common named str

Re: [PATCH 03/64] rpmsg: glink: Replace strncpy() with strscpy_pad()

2021-07-27 Thread Gustavo A. R. Silva
| ^~~~ > > [1] > https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings > > Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > drivers/rpmsg/qcom_glink_native.c | 2 +- > 1 file cha

Re: [PATCH 04/64] stddef: Introduce struct_group() helper macro

2021-07-27 Thread Gustavo A. R. Silva
> struct_group(thing, > int two, > int three, > ); > int four; > }; > > if (length > sizeof(src.thing)) > return -EINVAL; > memcpy(&dst.thing,

Re: [PATCH 05/64] skbuff: Switch structure bounds to struct_group()

2021-07-27 Thread Gustavo A. R. Silva
> "objdump -d" shows no no meaningful object code changes (i.e. only source > line number induced differences and optimizations.) > > Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > drivers/net/wireguard/queuein

Re: [PATCH 06/64] bnxt_en: Use struct_group_attr() for memcpy() region

2021-07-27 Thread Gustavo A. R. Silva
le" shows no size nor member offset changes to struct bnxt_cos2bw_cfg. > "objdump -d" shows no meaningful object code changes (i.e. only source > line number induced differences and optimizations). > > Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- G

Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Gustavo A. R. Silva
On 7/28/21 00:55, Greg Kroah-Hartman wrote: > On Tue, Jul 27, 2021 at 01:58:10PM -0700, Kees Cook wrote: >> In preparation for FORTIFY_SOURCE performing compile-time and run-time >> field bounds checking for memcpy(), memmove(), and memset(), avoid >> intentionally writing across neighboring fie

Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Gustavo A. R. Silva
On 7/28/21 01:19, Greg Kroah-Hartman wrote: > On Wed, Jul 28, 2021 at 01:14:33AM -0500, Gustavo A. R. Silva wrote: >> >> >> On 7/28/21 00:55, Greg Kroah-Hartman wrote: >>> On Tue, Jul 27, 2021 at 01:58:10PM -0700, Kees Cook wrote: >>>> In preparation

Re: [PATCH 19/64] ip: Use struct_group() for memcpy() regions

2021-07-27 Thread Gustavo A. R. Silva
On 7/28/21 01:31, Gustavo A. R. Silva wrote: > > > On 7/28/21 01:19, Greg Kroah-Hartman wrote: >> On Wed, Jul 28, 2021 at 01:14:33AM -0500, Gustavo A. R. Silva wrote: >>> >>> >>> On 7/28/21 00:55, Greg Kroah-Hartman wrote: >>>> On

Re: [PATCH RESEND][next] drm/nouveau/clk: Fix fall-through warnings for Clang

2021-04-20 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this, please? Thanks -- Gustavo On 3/5/21 03:56, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the code fall > through to the

Re: [PATCH RESEND][next] drm/nouveau/therm: Fix fall-through warnings for Clang

2021-04-20 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this, please? Thanks -- Gustavo On 3/5/21 03:58, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of letting the code fall > through to the

Re: [PATCH RESEND][next] drm/nouveau: Fix fall-through warnings for Clang

2021-04-20 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this, please? Thanks -- Gustavo On 3/5/21 03:56, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple > of warnings by explicitly adding a couple of break statements instead > of letting the code fall t

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>; mad

Re: [PATCH] drivers/video/fbdev:modify 0 to NULL

2021-03-17 Thread Gustavo A. R. Silva
On 3/17/21 21:33, ChunyouTang wrote: > From: tangchunyou > > modify 0 to NULL,info is a pointer,it should be > > compared with NULL,not 0 > > Signed-off-by: tangchunyou > --- > drivers/video/fbdev/offb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vide

Re: [PATCH] drivers/video/fbdev:modify 0 to NULL

2021-03-17 Thread Gustavo A. R. Silva
On 3/17/21 21:47, Chunyou Tang wrote: > I think "if (info == NULL)" is more intuitive,and there have many > compare likes "if (info == NULL)" in this file. In that case, all those instances should be changed to if (!foo), instead. -- Gustavo ___ dri

[PATCH][next] drm/amd/display: Fix sizeof arguments in bw_calcs_init()

2021-03-22 Thread Gustavo A. R. Silva
arge variables from the stack") Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.

Re: [PATCH][next] drm/amd/display: Fix sizeof arguments in bw_calcs_init()

2021-03-22 Thread Gustavo A. R. Silva
On 3/22/21 09:04, Chen, Guchun wrote: > [AMD Public Use] > > Thanks for your patch, Silva. The issue has been fixed by " a5c6007e20e1 > drm/amd/display: fix modprobe failure on vega series". Great. :) Good to know this is already fixed. Thanks! -- Gustavo

[PATCH][next] drm/amd/display: Fix potential integer overflow

2021-02-10 Thread Gustavo A. R. Silva
expression is currently being evaluated using 32-bit arithmetic: actual_calculated_clock_100hz * post_divider Fixes: 7a03fdf628af ("drm/amd/display: fix 64bit division issue on 32bit OS") Addresses-Coverity-ID: 1501691 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R.

[PATCH][next] drm/amd/pm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE

2021-02-10 Thread Gustavo A. R. Silva
://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/6023be58.sk66l%2fv4vusji5mi%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/powerplay/si_dpm.c | 6

[PATCH][next] drm/amd/pm: Replace one-element array with flexible-array in struct _ATOM_Vega10_GFXCLK_Dependency_Table

2021-02-10 Thread Gustavo A. R. Silva
ues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/6023ff3d.wy3ssckgrqpdplvo%25...@intel.com/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_pptable.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/

[PATCH][next] drm/radeon/nislands_smc.h: Replace one-element array with flexible-array member in struct NISLANDS_SMC_SWSTATE

2021-02-10 Thread Gustavo A. R. Silva
tml/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/6023ed54.bfiy+9uz81i6nq19%25...@intel.com/ Signed-off-by: Gustavo A

[PATCH][next] drm/radeon/si_dpm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE

2021-03-03 Thread Gustavo A. R. Silva
.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/603f9a8f.adlrpmfzzsapzvyq%25...@intel.com/ Signed-off-by: G

[PATCH RESEND][next] drm/i915/gem: Fix fall-through warnings for Clang

2021-03-05 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a return statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/i915/gem

[PATCH RESEND][next] drm/nouveau/clk: Fix fall-through warnings for Clang

2021-03-05 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev

[PATCH RESEND][next] drm/nouveau: Fix fall-through warnings for Clang

2021-03-05 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm

[PATCH RESEND][next] drm/nouveau/therm: Fix fall-through warnings for Clang

2021-03-05 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvkm/subdev

Re: [PATCH][next] drm/radeon/si_dpm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE

2021-03-05 Thread Gustavo A. R. Silva
On Fri, Mar 05, 2021 at 02:10:44PM -0500, Alex Deucher wrote: > Applied. Thanks! Awesome. :) Thanks, Alex. -- Gustavo ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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 after

[PATCH] drm/radeon/ni_dpm: Fix booting bug

2021-05-09 Thread Gustavo A. R. Silva
t;) Cc: sta...@vger.kernel.org Reported-by: Christian Zigotzky Tested-by: Christian Zigotzky Link: https://lore.kernel.org/dri-devel/9bb5fcbd-daf5-1669-b3e7-b8624b3c3...@xenosoft.de/ Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/radeon/ni_dpm.c | 144 +- d

[PATCH] drm/radeon/si_dpm: Fix SMU power state load

2021-05-09 Thread Gustavo A. R. Silva
/si_dpm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE") Cc: sta...@vger.kernel.org Reported-by: Kai-Heng Feng Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/radeon/si_dpm.c | 174 +- drivers/gpu/drm/radeon/sislands_

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

[PATCH] drm/amd/pm: Fix out-of-bounds bug

2021-05-10 Thread Gustavo A. R. Silva
3ff ("drm/amd/pm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE") Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/powerplay/si_dpm.c | 174 +- .../gpu/drm/amd/pm/powerplay/sislands_smc.h | 3

Re: [PATCH] drm/radeon/ni_dpm: Fix booting bug

2021-05-10 Thread Gustavo A. R. Silva
Hi Alex, On 5/10/21 16:17, Alex Deucher wrote: > On Sun, May 9, 2021 at 6:48 PM Gustavo A. R. Silva > wrote: [..] >> >> Bug: >> https://lore.kernel.org/dri-devel/3eedbe78-1fbd-4763-a7f3-ac5665e76...@xenosoft.de/ >> Fixes: 434fb1e7444a ("drm/radeon/nislan

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

2020-11-23 Thread Gustavo A. R. Silva
On Sun, Nov 22, 2020 at 11:53:55AM -0800, James Bottomley wrote: > On Sun, 2020-11-22 at 11:22 -0800, Joe Perches wrote: > > On Sun, 2020-11-22 at 11:12 -0800, James Bottomley wrote: > > > On Sun, 2020-11-22 at 10:25 -0800, Joe Perches wrote: > > > > On Sun, 2020-11-22 at 10:21 -0800, James Bottoml

Re: [PATCH 004/141] drm/amdgpu: Fix fall-through warnings for Clang

2020-11-23 Thread Gustavo A. R. Silva
On Fri, Nov 20, 2020 at 05:42:38PM -0500, Alex Deucher wrote: > On Fri, Nov 20, 2020 at 1:24 PM Gustavo A. R. Silva > wrote: > > > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > > warnings by explicitly adding multiple break statements instead

Re: [PATCH 028/141] drm/amd/display: Fix fall-through warnings for Clang

2020-11-23 Thread Gustavo A. R. Silva
On Fri, Nov 20, 2020 at 05:45:07PM -0500, Alex Deucher wrote: > On Fri, Nov 20, 2020 at 1:28 PM Gustavo A. R. Silva > wrote: > > > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > > warnings by explicitly adding multiple break statements instead

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

2020-11-23 Thread Gustavo A. R. Silva
On Sun, Nov 22, 2020 at 11:03:22PM +0100, Sam Ravnborg wrote: > Hi Gustavo, > On Fri, Nov 20, 2020 at 12:35:17PM -0600, Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > > by explicitly adding a break statement instead o

Re: [PATCH 084/141] drm/via: Fix fall-through warnings for Clang

2020-11-24 Thread Gustavo A. R. Silva
On Sun, Nov 22, 2020 at 11:03:58PM +0100, Sam Ravnborg wrote: > On Fri, Nov 20, 2020 at 12:35:54PM -0600, Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > > by explicitly adding a break statement instead of letting the code f

Re: [PATCH 134/141] video: fbdev: lxfb_ops: Fix fall-through warnings for Clang

2020-11-24 Thread Gustavo A. R. Silva
Hi Sam, On Sun, Nov 22, 2020 at 11:05:40PM +0100, Sam Ravnborg wrote: > Hi Gustavo, > On Fri, Nov 20, 2020 at 12:40:32PM -0600, Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > > by explicitly adding a break statement inst

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

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

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

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

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

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

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

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

[PATCH 005/141] drm/radeon: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
kings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/radeon/ci_dpm.c | 2 +- drivers/gpu/drm/radeon/r300.c | 1 + drivers/gpu/drm/radeon/si_dpm.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/ci_dp

[PATCH 004/141] drm/amdgpu: Fix fall-through warnings for Clang

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

[PATCH 028/141] drm/amd/display: Fix fall-through warnings for Clang

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

[PATCH 078/141] drm/amd/pm: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
x27;t recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/pm/powerplay/si_dpm.c | 2 +- drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c | 1 + 2

[PATCH 082/141] drm/nouveau: Fix fall-through warnings for Clang

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

[PATCH 083/141] drm/nouveau/therm: Fix fall-through warnings for Clang

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

[PATCH 079/141] drm: Fix fall-through warnings for Clang

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

[PATCH 080/141] drm/i915/gem: Fix fall-through warnings for Clang

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

[PATCH 084/141] drm/via: Fix fall-through warnings for Clang

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

[PATCH 081/141] drm/nouveau/clk: Fix fall-through warnings for Clang

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

[PATCH 134/141] video: fbdev: lxfb_ops: Fix fall-through warnings for Clang

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

[PATCH 135/141] video: fbdev: pm2fb: Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva --- drivers/video/fbdev/pm2fb.c | 1 + 1 file changed, 1 insertion(+) diff --git a

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

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

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

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

[PATCH][next] drm/amd/display: Fix Wstringop-overflow warnings in dc_link_dp.c

2022-03-03 Thread Gustavo A. R. Silva
-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc

Re: [PATCH][next] drm/amd/display: Fix Wstringop-overflow warnings in dc_link_dp.c

2022-03-03 Thread Gustavo A. R. Silva
On Thu, Mar 03, 2022 at 09:43:28AM -0800, Kees Cook wrote: > On Thu, Mar 03, 2022 at 11:25:03AM -0600, Gustavo A. R. Silva wrote: > > Fix the following Wstringop-overflow warnings when building with GCC-11: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpia.c

Re: [PATCH][next] drm/amd/display: Fix Wstringop-overflow warnings in dc_link_dp.c

2022-03-03 Thread Gustavo A. R. Silva
On Thu, Mar 03, 2022 at 12:19:57PM -0600, Gustavo A. R. Silva wrote: > On Thu, Mar 03, 2022 at 09:43:28AM -0800, Kees Cook wrote: > > On Thu, Mar 03, 2022 at 11:25:03AM -0600, Gustavo A. R. Silva wrote: > > > Fix the following Wstringop-overflow warnings when bu

[PATCH] video: omapfb: Fix fall-through warning for Clang

2021-10-14 Thread Gustavo A. R. Silva
eported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva --- drivers/video/fbdev/omap/omapfb_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index 3d090d2d9ed9..b495c09e6102 100644 --- a/drivers/video/

Re: [PATCH] video: omapfb: Fix fall-through warning for Clang

2021-10-14 Thread Gustavo A. R. Silva
On Thu, Oct 14, 2021 at 08:26:52PM +0200, Sam Ravnborg wrote: > Hi Gustavo, > On Thu, Oct 14, 2021 at 11:53:20AM -0500, Gustavo A. R. Silva wrote: > > Fix the following fallthrough warnings: > > > > drivers/video/fbdev/omap/omapfb_main.c:1558:2: warning: unannotated

[PATCH][next] nouveau/svm: Use kvcalloc() instead of kvzalloc()

2021-09-28 Thread Gustavo A. R. Silva
Use 2-factor argument form kvcalloc() instead of kvzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nouveau_svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b

Re: [PATCH] drm/dp: Remove common Post Cursor2 register handling

2022-01-18 Thread Gustavo A. R. Silva
ursor adjustments") This should be tagged for -stable: Cc: sta...@vger.kernel.org > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Daniel Vetter > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Kees Cook Reviewed-by

[PATCH][next] drm/i915/guc: Use struct_size() helper in kmalloc()

2022-01-25 Thread Gustavo A. R. Silva
: warning: using sizeof on a flexible structure Link: https://github.com/KSPP/linux/issues/174 Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu

Re: [PATCH][next] nouveau/svm: Use kvcalloc() instead of kvzalloc()

2021-10-28 Thread Gustavo A. R. Silva
that kvcalloc checks whether the multiplication overflows and > > returns NULL in this case? > > That's correct. :) > > > On Wed, Sep 29, 2021 at 12:21 AM Gustavo A. R. Silva > > wrote: > > > > > > Use 2-factor argument form kvcalloc() instead of

Re: [PATCH] fbdev: sh7760fb: document fallthrough cases

2021-11-14 Thread Gustavo A. R. Silva
gt; Fixes: 4a25e41831ee ("video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver") > Signed-off-by: Randy Dunlap > Cc: "Gustavo A. R. Silva" > Cc: Nobuhiro Iwamatsu > Cc: Manuel Lauss > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: linux...@vger.kerne

Re: [PATCH] fbdev: sh7760fb: document fallthrough cases

2021-11-15 Thread Gustavo A. R. Silva
On Mon, Nov 15, 2021 at 09:35:09AM +0100, Geert Uytterhoeven wrote: > On Mon, Nov 15, 2021 at 7:33 AM Randy Dunlap wrote: > > Fix fallthrough warnings in sh776fb.c: > > > > ../drivers/video/fbdev/sh7760fb.c: In function 'sh7760fb_get_color_info': > > ../drivers/video/fbdev/sh7760fb.c:138:23: warni

Re: [PATCH] drm/dp: Fix off-by-one in register cache size

2021-12-13 Thread Gustavo A. R. Silva
Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Daniel Vetter > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > include/drm/drm_dp_helper.h | 2 +- > 1 file changed,

Re: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-20 Thread Gustavo A. R. Silva
On 5/20/19 12:41 PM, Alex Deucher wrote: > On Fri, May 17, 2019 at 8:43 AM xiaolinkui wrote: >> >> Use struct_size() helper to keep code simple. >> Again, this is not the reason why this helper was created. >> Signed-off-by: xiaolinkui >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +-

Re: [PATCH] gpu: drm: use struct_size() in kmalloc()

2019-05-21 Thread Gustavo A. R. Silva
On 5/21/19 3:59 AM, Christian König wrote: > BTW: Is there actually good documentation how to correctly do the variable > length array at end of structure thing in the kernel? > > I do know that I've seen a lot of different variants like array[] array[0] or > array[1] and I have also seen a b

[PATCH] drm/i915/kvmgt: Use struct_size() helper

2019-05-24 Thread Gustavo A. R. Silva
rse, areas, sparse->nr_areas) and so on... Also, notice that variable size is unnecessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/i915/gvt/kvmgt.c | 12 +--- 1 file changed, 5 insertions(+), 7 del

[PATCH] drm/nouveau/mmu: use struct_size() helper

2019-05-24 Thread Gustavo A. R. Silva
, data, mmu->kind_nr) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nvif/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvif/mmu.c b/drivers/gpu/drm/nouveau/nvif/mm

[PATCH] drm/komeda: Remove unused variable

2019-01-20 Thread Gustavo A. R. Silva
); ^~~~ Fixes: 7e8d4fcf8daf ("drm: arm/komeda: Remove IRQ parsing from initial series") Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/arm/disp

[PATCH] drm/vmwgfx: Replace PTR_RET with PTR_ERR_OR_ZERO

2019-01-23 Thread Gustavo A. R. Silva
PTR_RET is deprecated and will be removed soon. Use PTR_ERR_OR_ZERO instead. Notice that these are the last instances of PTR_RET in the whole codebase. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH] drm/amd/powerplay: Fix missing break in switch

2019-01-26 Thread Gustavo A. R. Silva
thanks to the ongoing efforts to enabling -Wimplicit-fallthrough. Fixes: cd70f3d6e3fa ("drm/amd/powerplay: PP/DAL interface changes for dynamic clock switch") Cc: sta...@vger.kernel.org Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 1 + 1 file

Re: [PATCH] drm/amd/powerplay: Fix missing break in switch

2019-01-29 Thread Gustavo A. R. Silva
On 1/28/19 10:19 AM, Alex Deucher wrote: > On Fri, Jan 25, 2019 at 5:31 PM Gustavo A. R. Silva > wrote: >> >> Add missing break statement in order to prevent the code from falling >> through to the default case. >> >> The resoning for this is that pclk_vol_t

Re: [PATCH] drm/nouveau: fix missing break in switch statement

2019-01-30 Thread Gustavo A. R. Silva
On 1/29/19 2:49 PM, Gustavo A. R. Silva wrote: > > > On 10/8/18 3:47 PM, Colin King wrote: >> From: Colin Ian King >> >> The NOUVEAU_GETPARAM_PCI_DEVICE case is missing a break statement and falls >> through to the following NOUVEAU_GETPARAM_BUS_TYPE case a

[PATCH] drm/via: mark expected switch fall-throughs

2019-01-30 Thread Gustavo A. R. Silva
level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/via/via_dmablit.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers

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

2019-01-30 Thread Gustavo A. R. Silva
: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm

[PATCH] drm/savage: mark expected switch fall-throughs

2019-01-30 Thread Gustavo A. R. Silva
-fallthrough=] Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/savage/savage_state.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/savage

Re: [PATCH] drm/nouveau: fix missing break in switch statement

2019-01-30 Thread Gustavo A. R. Silva
Fix this by adding > in the missing break. > > Detected by CoverityScan, CID#1460507 ("Missing break in switch") > > Fixes: 359088d5b8ec ("drm/nouveau: remove trivial cases of nvxx_device() > usage") > Signed-off-by: Colin Ian King Reviewed-by: Gusta

Re: [Nouveau] [PATCH] drm/nouveau: mark expected switch fall-through

2019-01-30 Thread Gustavo A. R. Silva
Ben, I wonder if you can take this too: https://lore.kernel.org/patchwork/patch/1001180/ Thanks -- Gustavo On 1/29/19 8:51 PM, Ben Skeggs wrote: > Got it, thanks. > > On Wed, 30 Jan 2019 at 06:55, Gustavo A. R. Silva > wrote: >> >> In preparation to enabling -Wim

Re: [PATCH] drm/savage: mark expected switch fall-throughs

2019-01-31 Thread Gustavo A. R. Silva
On 1/30/19 10:35 AM, Daniel Vetter wrote: > On Tue, Jan 29, 2019 at 02:20:06PM -0600, Gustavo A. R. Silva wrote: >> In preparation to enabling -Wimplicit-fallthrough, mark switch cases >> where we are expecting to fall through. >> >> This patch fixes the following warn

[PATCH] drm/vc4: Use struct_size() in kzalloc()

2019-01-31 Thread Gustavo A. R. Silva
: Gustavo A. R. Silva --- drivers/gpu/drm/vc4/vc4_perfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_perfmon.c b/drivers/gpu/drm/vc4/vc4_perfmon.c index 437e7a27f21d..495150415020 100644 --- a/drivers/gpu/drm/vc4/vc4_perfmon.c +++ b/drivers/gpu/drm/vc4

Re: [PATCH] drm/vc4: Use struct_size() in kzalloc()

2019-02-08 Thread Gustavo A. R. Silva
On 2/7/19 4:59 PM, Eric Anholt wrote: > "Gustavo A. R. Silva" writes: > >> 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 el

[PATCH] drm/nouveau/abi16: add missing break in switch statement

2019-02-12 Thread Gustavo A. R. Silva
orm) { ^~ drivers/gpu/drm/nouveau/nouveau_abi16.c:217:2: note: here case NOUVEAU_GETPARAM_FB_SIZE: ^~~~ This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 1 + 1 file changed, 1 insert

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

2019-02-12 Thread Gustavo A. R. Silva
l 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comment is modified in accordance with what 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/gpu/drm/nouveau/nouv

[PATCH] drm/ioctl: Fix Spectre v1 vulnerabilities

2018-12-20 Thread Gustavo A. R. Silva
;ioctls and drm_ioctls. Notice that given that speculation windows are large, the policy is to kill the speculation on the first load and not worry if it can be completed with a dependent load/store [1]. [1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2 Cc: sta...@vger.kernel.or

Re: [PATCH] drm/amdgpu_vm: fix boolean expressions

2019-01-04 Thread Gustavo A. R. Silva
On 1/3/19 1:17 PM, Kuehling, Felix wrote: On 2019-01-03 12:34 p.m., Gustavo A. R. Silva wrote: Fix boolean expressions by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes: c8c5e5

[PATCH v2] drm/amdgpu_vm: fix boolean expressions

2019-01-04 Thread Gustavo A. R. Silva
Fix boolean expressions by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes: 9a4b7d4c769e ("drm/amdgpu: Add vm context module param") Cc: sta...@vger.kernel.org Reviewed-by: F

[PATCH] drm/amdgpu_vm: fix boolean expressions

2019-01-04 Thread Gustavo A. R. Silva
Fix boolean expressions by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes: c8c5e569c5b0 ("drm/amdgpu: Consolidate visible vs. real vram check v2.") Cc: sta...@vger.ker

[PATCH] drm/amd/display: Fix boolean expression in get_surf_rq_param

2019-01-04 Thread Gustavo A. R. Silva
Fix boolean expression by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes: 6d04ee9dc101 ("drm/amd/display: Restructuring and cleaning up DML") Cc: sta...@vger.kernel.org Signed

Re: [PATCH] drm/amd/display: Fix boolean expression in get_surf_rq_param

2019-01-04 Thread Gustavo A. R. Silva
On 1/3/19 3:11 PM, Wentland, Harry wrote: On 2019-01-03 2:48 p.m., Gustavo A. R. Silva wrote: Fix boolean expression by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of Coccinelle. Fixes: 6d04ee9dc101

Re: [PATCH v2] drm/amdgpu_vm: fix boolean expressions

2019-01-07 Thread Gustavo A. R. Silva
Hi Ezequiel, On 1/4/19 10:40 AM, Ezequiel Garcia wrote: Hey Gustavo, On Thu, 3 Jan 2019 at 17:25, Gustavo A. R. Silva wrote: Fix boolean expressions by using logical AND operator '&&' instead of bitwise operator '&'. This issue was detected with the help of

[PATCH] qxl: Use struct_size() in kzalloc()

2019-01-09 Thread Gustavo A. R. Silva
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); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A

Re: [PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs

2019-01-11 Thread Gustavo A. R. Silva
Hi, Friendly ping: Who can take this? Thanks -- Gustavo On 10/17/18 9:28 AM, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch aims to suppress 29 missing-break-in-switch false positives

Re: [PATCH] drm/dp: annotate implicit fall throughs

2019-01-14 Thread Gustavo A. R. Silva
y: Mathieu Malaterre Acked-by: Gustavo A. R. Silva --- drivers/gpu/drm/drm_dp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 516e82d0ed50..26835d174939 100644 --- a/drivers/gpu/drm/drm_dp_helper

[PATCH] drm/amdgpu: Replace kzalloc with kcalloc

2019-01-14 Thread Gustavo A. R. Silva
(struct dc_plane_state) to sizeof(*updates) and sizeof(*surfaces), correspondingly. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a

Re: [PATCH] video: offb: annotate implicit fall throughs

2019-01-14 Thread Gustavo A. R. Silva
through [-Wimplicit-fallthrough=] drivers/video/fbdev/offb.c:142:3: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Mathieu Malaterre Acked-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/video/fbdev/offb.c | 2 ++ 1 file changed, 2 insertions

Re: [PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs

2019-02-16 Thread Gustavo A. R. Silva
Hello, Friendly ping (second one): Who can take this, please? Thanks -- Gustavo On 1/10/19 1:33 PM, Gustavo A. R. Silva wrote: > Hi, > > Friendly ping: > > Who can take this? > > Thanks > -- > Gustavo > > On 10/17/18 9:28 AM, Gustavo A. R. Silva wro

  1   2   3   4   5   >