2019-02-14 10:02:04

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the rdma tree

Hi all,

After merging the rdma tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/infiniband/hw/hfi1/qp.c: In function 'hfi1_setup_wqe':
drivers/infiniband/hw/hfi1/qp.c:328:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
hfi1_setup_tid_rdma_wqe(qp, wqe);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/hfi1/qp.c:329:2: note: here
case IB_QPT_UC:
^~~~

Introduced by commit

f1ab4efa6d32 ("IB/hfi1: Enable TID RDMA READ protocol")

I get this warning because I am building with -Wimplicit-fallthrough
in attempt to catch new additions early. The gcc warning can be turned
off by adding a /* fall through */ comment at the point the fall through
happens (assuming that the fall through is intentional).

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2019-02-14 10:02:53

by Doug Ledford

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the rdma tree

On Thu, 2019-02-14 at 11:18 +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the rdma tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/infiniband/hw/hfi1/qp.c: In function 'hfi1_setup_wqe':
> drivers/infiniband/hw/hfi1/qp.c:328:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> hfi1_setup_tid_rdma_wqe(qp, wqe);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/infiniband/hw/hfi1/qp.c:329:2: note: here
> case IB_QPT_UC:
> ^~~~
>
> Introduced by commit
>
> f1ab4efa6d32 ("IB/hfi1: Enable TID RDMA READ protocol")
>
> I get this warning because I am building with -Wimplicit-fallthrough
> in attempt to catch new additions early. The gcc warning can be turned
> off by adding a /* fall through */ comment at the point the fall through
> happens (assuming that the fall through is intentional).
>

Thanks Stephen, we'll sort it and make an appropriate fixup patch.

Kaike?

--
Doug Ledford <[email protected]>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD


Attachments:
signature.asc (849.00 B)
This is a digitally signed message part

2019-02-14 23:15:05

by Wan, Kaike

[permalink] [raw]
Subject: RE: linux-next: build warning after merge of the rdma tree



> -----Original Message-----
> From: Doug Ledford [mailto:[email protected]]
> Sent: Wednesday, February 13, 2019 7:21 PM
> To: Stephen Rothwell <[email protected]>; Jason Gunthorpe
> <[email protected]>
> Cc: Linux Next Mailing List <[email protected]>; Linux Kernel
> Mailing List <[email protected]>; Wan, Kaike
> <[email protected]>; Gustavo A. R. Silva <[email protected]>;
> Kees Cook <[email protected]>
> Subject: Re: linux-next: build warning after merge of the rdma tree
>
> On Thu, 2019-02-14 at 11:18 +1100, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the rdma tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> >
> > drivers/infiniband/hw/hfi1/qp.c: In function 'hfi1_setup_wqe':
> > drivers/infiniband/hw/hfi1/qp.c:328:3: warning: this statement may fall
> through [-Wimplicit-fallthrough=]
> > hfi1_setup_tid_rdma_wqe(qp, wqe);
> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/infiniband/hw/hfi1/qp.c:329:2: note: here
> > case IB_QPT_UC:
> > ^~~~
> >
> > Introduced by commit
> >
> > f1ab4efa6d32 ("IB/hfi1: Enable TID RDMA READ protocol")
> >
> > I get this warning because I am building with -Wimplicit-fallthrough
> > in attempt to catch new additions early. The gcc warning can be
> > turned off by adding a /* fall through */ comment at the point the
> > fall through happens (assuming that the fall through is intentional).
> >
>
> Thanks Stephen, we'll sort it and make an appropriate fixup patch.
>
> Kaike?

It's intentional. We will add a "/* fall through */" comment as a fixup patch.

Kaike
>
> --
> Doug Ledford <[email protected]>
> GPG KeyID: B826A3330E572FDD
> Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD