[Xen-devel] [PATCH net-next] xen-netback: mark expected switch fall-through

2019-02-08 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. 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/net/xen

Re: [Xen-devel] [PATCH net-next] xen-netback: mark expected switch fall-through

2019-02-08 Thread Gustavo A. R. Silva
On 2/8/19 2:21 PM, David Miller wrote: > From: "Gustavo A. R. Silva" > Date: Fri, 8 Feb 2019 13:58:38 -0600 > >> In preparation to enabling -Wimplicit-fallthrough, mark switch >> cases where we are expecting to fall through. >> >> Warning level 3 wa

[Xen-devel] [PATCH] xen: mark expected switch fall-through

2019-02-12 Thread Gustavo A. R. Silva
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/xen/xen-pciback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers

[Xen-devel] [PATCH] xen-scsiback: mark expected switch fall-through

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

Re: [Xen-devel] [PATCH] xen: mark expected switch fall-through

2019-02-12 Thread Gustavo A. R. Silva
On 2/12/19 5:50 PM, Boris Ostrovsky wrote: > On Tue, Feb 12, 2019 at 02:37:20PM -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 war

[Xen-devel] [PATCH] PCI: Mark expected switch fall-throughs

2019-03-20 Thread Gustavo A. R. Silva
sed: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/pci/proc.c | 1 + drivers/pci/xen-pcifront.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/proc.c b/drivers/

Re: [Xen-devel] [PATCH] PCI: Mark expected switch fall-throughs

2019-03-20 Thread Gustavo A. R. Silva
On 3/20/19 2:24 PM, Bjorn Helgaas wrote: > On Wed, Mar 20, 2019 at 01:27:15PM -0500, Gustavo A. R. Silva wrote: >> In preparation to enabling -Wimplicit-fallthrough, mark switch >> cases where we are expecting to fall through. > > Does this fix all the remaining cases in d

Re: [Xen-devel] [PATCH] PCI: Mark expected switch fall-throughs

2019-03-20 Thread Gustavo A. R. Silva
On 3/20/19 2:27 PM, Andrew Cooper wrote: > On 20/03/2019 18:27, Gustavo A. R. Silva wrote: >> diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c >> index 6fa1627ce08d..445b51db75b0 100644 >> --- a/drivers/pci/proc.c >> +++ b/drivers/pci/proc.c >>

Re: [Xen-devel] [PATCH] xen, fbfront: mark expected switch fall-through

2019-03-20 Thread Gustavo A. R. Silva
Hi all, Friendly ping: Who can take this? Thanks -- Gustavo On 2/28/19 5:51 AM, Oleksandr Andrushchenko wrote: > +Xen-devel list > > On 2/27/19 10:53 PM, Gustavo A. R. Silva wrote: >> In preparation to enabling -Wimplicit-fallthrough, mark switch >> cases where we

Re: [Xen-devel] [PATCH] PCI: Mark expected switch fall-throughs

2019-03-20 Thread Gustavo A. R. Silva
On 3/20/19 3:13 PM, Bjorn Helgaas wrote: > On Wed, Mar 20, 2019 at 01:27:15PM -0500, Gustavo A. R. Silva wrote: [..] >> >> Warning level 3 was used: -Wimplicit-fallthrough=3 >> >> This patch is part of the ongoing efforts to enable >> -Wimplicit-fallthrough.

[Xen-devel] [PATCH net-next] xen-netfront: mark expected switch fall-through

2019-04-15 Thread Gustavo A. R. Silva
is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva --- drivers/net/xen-netfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c in

Re: [Xen-devel] [PATCH net-next] xen-netfront: mark expected switch fall-through

2019-04-16 Thread Gustavo A. R. Silva
On 4/16/19 2:17 AM, Juergen Gross wrote: > On 15/04/2019 23:11, 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 warning: >>

[Xen-devel] [PATCH 00/41] scsi: Mark expected switch fall-throughs

2018-11-27 Thread Gustavo A. R. Silva
rough=] ahc_dma_tag_destroy(ahc, scb_data->sg_dmat); ^~~ drivers/scsi/aic7xxx/aic7xxx_core.c:4923:2: note: here case 6: ^~~~ Thanks! Gustavo A. R. Silva (41): scsi: BusLogic: mark expected switch fall-through scsi: NCR5380: Mark expected swi

[Xen-devel] [PATCH 41/41] scsi: xen-scsifront: mark expected switch fall-through

2018-11-27 Thread Gustavo A. R. Silva
uot;, which contains the "fall through" annotation at the beginnig of the code comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/xen-scsifront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/xen-scsifron

Re: [Xen-devel] [PATCH 00/41] scsi: Mark expected switch fall-throughs

2018-12-18 Thread Gustavo A. R. Silva
18 PM, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, this patchset aims to mark switch cases where we are expecting to fall through. I reviewed case by case and concluded that each of them is an intentional fall-through. However, it doesn't hurt that the maint

Re: [Xen-devel] [PATCH 00/41] scsi: Mark expected switch fall-throughs

2018-12-18 Thread Gustavo A. R. Silva
On 12/18/18 9:45 PM, Martin K. Petersen wrote: If you haven't received feedback on a patch you should poke the relevant driver maintainer. Got it. Will do so. Thanks -- Gustavo ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://li

[Xen-devel] [PATCH net-next] xen-netback: 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 --- drivers/net/xen-netback/netback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[Xen-devel] [PATCH] xen-blkfront: 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/block/xen-blkfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[Xen-devel] [PATCH] xen/biomerge: 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/xen/biomerge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen

Re: [Xen-devel] [PATCH] xen/biomerge: Use true and false for boolean values

2018-08-06 Thread Gustavo A. R. Silva
On 08/06/2018 06:42 AM, Juergen Gross wrote: > On 05/08/18 02:50, 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 help of Coccinelle. >&g

[Xen-devel] [PATCH] xen: Replace zero-length array with flexible-array member

2020-02-26 Thread Gustavo A. R. Silva
lle. [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/xen/xen-pciback/pciback.h | 2 +- include/xen/interface/io/tpmif.h |

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 138/141] xen/manage: 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/xen/manage.c | 1 + 1 file

[PATCH 058/141] xen-blkfront: 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/block/xen-blkfront.c | 1 + 1

[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

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 058/141] xen-blkfront: Fix fall-through warnings for Clang

2020-11-23 Thread Gustavo A. R. Silva
On Fri, Nov 20, 2020 at 04:36:26PM -0500, boris.ostrov...@oracle.com wrote: > > On 11/20/20 1:32 PM, 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 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

[PATCH][next] xen: Replace one-element array with flexible-array member

2023-02-02 Thread Gustavo A. R. Silva
towards globally enabling -fstrict-flex-arrays=3 [1]. This results in no differences in binary output. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/255 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A

[PATCH][next] xen/pci: Avoid -Wflex-array-member-not-at-end warning

2024-08-20 Thread Gustavo A. R. Silva
containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva --- drivers/xen/pci.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c index

[PATCH][next] xen: privcmd: Replace zero-length array with flex-array member and use __counted_by

2023-11-16 Thread Gustavo A. R. Silva
7: warning: array subscript i is outside array bounds of 'struct ioreq_port[0]' [-Warray-bounds=] This results in no differences in binary output. Signed-off-by: Gustavo A. R. Silva --- drivers/xen/privcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

Re: [PATCH][next] xen: privcmd: Replace zero-length array with flex-array member and use __counted_by

2023-11-16 Thread Gustavo A. R. Silva
On 11/16/23 15:08, Kees Cook wrote: On Thu, Nov 16, 2023 at 12:54:59PM -0600, Gustavo A. R. Silva wrote: Fake flexible arrays (zero-length and one-element arrays) are deprecated, and should be replaced by flexible-array members. So, replace zero-length array with a flexible-array member in

Re: [PATCH 01/32] netlink: Avoid memcpy() across flexible array boundary

2022-05-03 Thread Gustavo A. R. Silva
On Tue, May 03, 2022 at 06:44:10PM -0700, Kees Cook wrote: > In preparation for run-time memcpy() bounds checking, split the nlmsg > copying for error messages (which crosses a previous unspecified flexible > array boundary) in half. Avoids the future run-time warning: > > memcpy: detected field-s

Re: [PATCH 28/32] selinux: Use mem_to_flex_dup() with xfrm and sidtab

2022-05-04 Thread Gustavo A. R. Silva
Hi Paul, On Wed, May 04, 2022 at 06:57:28PM -0400, Paul Moore wrote: > On Tue, May 3, 2022 at 9:57 PM Kees Cook wrote: [..] > > +++ b/include/uapi/linux/xfrm.h > > @@ -31,9 +31,9 @@ struct xfrm_id { > > struct xfrm_sec_ctx { > > __u8ctx_doi; > > __u8ctx_alg; > > -

Re: [PATCH 28/32] selinux: Use mem_to_flex_dup() with xfrm and sidtab

2022-05-05 Thread Gustavo A. R. Silva
On Thu, May 05, 2022 at 07:16:18PM -0400, Paul Moore wrote: > On Thu, May 5, 2022 at 2:39 PM Kees Cook wrote: > > On Wed, May 04, 2022 at 11:14:42PM -0400, Paul Moore wrote: > > > On Wed, May 4, 2022 at 7:34 PM Gustavo A. R. Silva > > > wrote: > > > > >

Re: [PATCH] xen/gntalloc: Replace UAPI 1-element array

2024-02-06 Thread Gustavo A. R. Silva
: Stefano Stabellini Cc: Oleksandr Tyshchenko Cc: Gustavo A. R. Silva Cc: xen-devel@lists.xenproject.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks! -- Gustavo --- drivers/xen/gntalloc.c | 2 +- include/uapi/xen/gntalloc.h | 5 - 2 files changed, 5 insertions

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][next] xen/xenbus: Add __counted_by for struct read_buffer and use struct_size()

2023-10-09 Thread Gustavo A. R. Silva
: Gustavo A. R. Silva --- drivers/xen/xenbus/xenbus_dev_frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c index 0792fda49a15..6f56640092a9 100644 --- a/drivers/xen/xenbus

Re: [PATCH][next] xen/pci: Avoid -Wflex-array-member-not-at-end warning

2024-09-13 Thread Gustavo A. R. Silva
Hi all, Friendly ping: who can take this, please? 🙂 Thanks -- Gustavo On 21/08/24 02:50, Gustavo A. R. Silva wrote: Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the

Re: [PATCH][next] xen/pci: Avoid -Wflex-array-member-not-at-end warning

2024-09-13 Thread Gustavo A. R. Silva
On 13/09/24 10:12, Jürgen Groß wrote: On 13.09.24 10:07, Gustavo A. R. Silva wrote: Hi all, Friendly ping: who can take this, please? 🙂 I can carry it via the Xen tree. Sounds good. :) Thank you! -- Gustavo