From: Leon Romanovsky <leon@kernel.org>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>,
Dennis Dalessandro <dennis.dalessandro@intel.com>,
Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] IB/hfi1: Use fallthrough pseudo-keyword
Date: Wed, 8 Jul 2020 21:47:26 +0300 [thread overview]
Message-ID: <20200708184726.GB1276673@unreal> (raw)
In-Reply-To: <20200708182835.GF11533@embeddedor>
On Wed, Jul 08, 2020 at 01:28:35PM -0500, Gustavo A. R. Silva wrote:
> Hi Leon,
>
> On Wed, Jul 08, 2020 at 08:47:03AM +0300, Leon Romanovsky wrote:
> > On Tue, Jul 07, 2020 at 12:39:42PM -0500, Gustavo A. R. Silva wrote:
> > > Replace the existing /* fall through */ comments and its variants with
> > > the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
> > > fall-through markings when it is the case.
> > >
> > > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
> > >
> > > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> > > ---
> > > drivers/infiniband/hw/hfi1/chip.c | 8 ++++----
> > > drivers/infiniband/hw/hfi1/firmware.c | 16 ----------------
> > > drivers/infiniband/hw/hfi1/mad.c | 9 ++++-----
> > > drivers/infiniband/hw/hfi1/pio.c | 2 +-
> > > drivers/infiniband/hw/hfi1/pio_copy.c | 12 ++++++------
> > > drivers/infiniband/hw/hfi1/platform.c | 10 +++++-----
> > > drivers/infiniband/hw/hfi1/qp.c | 2 +-
> > > drivers/infiniband/hw/hfi1/qsfp.c | 4 ++--
> > > drivers/infiniband/hw/hfi1/rc.c | 25 ++++++++++++-------------
> > > drivers/infiniband/hw/hfi1/sdma.c | 9 ++++-----
> > > drivers/infiniband/hw/hfi1/tid_rdma.c | 4 ++--
> > > drivers/infiniband/hw/hfi1/uc.c | 8 ++++----
> > > 12 files changed, 45 insertions(+), 64 deletions(-)
> > >
> > > diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
> > > index 15f9c635f292..132f1df6f23b 100644
> > > --- a/drivers/infiniband/hw/hfi1/chip.c
> > > +++ b/drivers/infiniband/hw/hfi1/chip.c
> > > @@ -7320,7 +7320,7 @@ static u16 link_width_to_bits(struct hfi1_devdata *dd, u16 width)
> > > default:
> > > dd_dev_info(dd, "%s: invalid width %d, using 4\n",
> > > __func__, width);
> > > - /* fall through */
> > > + fallthrough;
> > > case 4: return OPA_LINK_WIDTH_4X;
> >
> > "case ..:" after "default:" ???
> > IMHO, it should be written in more standard way.
> >
>
> I agree. However, that piece of code, and the other below, does not
> concern to this patch.
I'm not super excited about such half-baked solutions. Let's fix all at
once by pre-patch or post-patch to this change.
Thanks
prev parent reply other threads:[~2020-07-08 18:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 17:39 [PATCH][next] IB/hfi1: Use fallthrough pseudo-keyword Gustavo A. R. Silva
2020-07-08 5:47 ` Leon Romanovsky
2020-07-08 18:28 ` Gustavo A. R. Silva
2020-07-08 18:47 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200708184726.GB1276673@unreal \
--to=leon@kernel.org \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=gustavoars@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox