RE: [PATCH 3/5] Drivers: hv: kvp: Fix the recent regression caused by incorrect clean-up

From: Dexuan Cui
Date: Wed Oct 17 2018 - 13:56:29 EST


> From: devel <driverdev-devel-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of
> KY Srinivasan
> Sent: Tuesday, October 16, 2018 23:02
> > > --- a/drivers/hv/hv_kvp.c
> > > +++ b/drivers/hv/hv_kvp.c
> > > @@ -353,6 +353,9 @@ static void process_ib_ipinfo(void *in_msg, void
> > *out_msg, int op)
> > >
> > > out->body.kvp_ip_val.dhcp_enabled = in-
> > >kvp_ip_val.dhcp_enabled;
> > >
> > > + __attribute__ ((fallthrough));
> >
> > The comment should be sufficient for this, right? I haven't seen many
> > uses of this attribute before, how common is it?
>
> Yes; a common should be sufficient.

You all are right.
Right now, I realized the gcc warning can also be suppressed by a simple line
of comment:

/* fallthrough */

It looks gcc treats this comment specially.

If I add something more in the comment, like
/* add fallthrough */
, the warning can not be suppressed. :-)

I'll do a new version for KY.

Thank you all!

-- Dexuan