From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Ian Arkver <ian.arkver.dev@gmail.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Steve Longerbeam <slongerbeam@gmail.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org
Subject: Re: [PATCH] media: imx: shut up a false positive warning
Date: Tue, 7 Aug 2018 08:47:33 -0300 [thread overview]
Message-ID: <20180807084733.7839c883@coco.lan> (raw)
In-Reply-To: <584aecdc-961a-6d64-147c-f37adaef3bcf@gmail.com>
Em Tue, 7 Aug 2018 12:00:46 +0100
Ian Arkver <ian.arkver.dev@gmail.com> escreveu:
> Hi Mauro,
>
> On 07/08/18 10:58, Mauro Carvalho Chehab wrote:
> > With imx, gcc produces a false positive warning:
> >
> > drivers/staging/media/imx/imx-media-csi.c: In function 'csi_idmac_setup_channel':
> > drivers/staging/media/imx/imx-media-csi.c:457:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> > if (passthrough) {
> > ^
> > drivers/staging/media/imx/imx-media-csi.c:464:2: note: here
> > default:
> > ^~~~~~~
> >
> > That's because the regex it uses for fall trough is not
> > good enough. So, rearrange the fall through comment in a way
> > that gcc will recognize.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> > ---
> > drivers/staging/media/imx/imx-media-csi.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
> > index 4647206f92ca..b7ffd231c64b 100644
> > --- a/drivers/staging/media/imx/imx-media-csi.c
> > +++ b/drivers/staging/media/imx/imx-media-csi.c
> > @@ -460,7 +460,8 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
> > passthrough_cycles = incc->cycles;
> > break;
> > }
> > - /* fallthrough for non-passthrough RGB565 (CSI-2 bus) */
> > + /* for non-passthrough RGB565 (CSI-2 bus) */
> > + /* Falls through */
>
> Adding a '-' to the fallthrough seems to meet the regex requirements at
> level 3 of the warning. Eg...
>
> /* fallthrough- for non-passthrough RGB565 (CSI-2 bus) */
>
> Not sure if this is an improvement though.
Hmm... this also works:
/* fallthrough - non-passthrough RGB565 (CSI-2 bus) */
I would actually prefer a ':' instead of '-', but that works too,
and it could be better than splitting fall through messages on
two comments.
Thanks,
Mauro
prev parent reply other threads:[~2018-08-07 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 9:58 [PATCH] media: imx: shut up a false positive warning Mauro Carvalho Chehab
2018-08-07 11:00 ` Ian Arkver
2018-08-07 11:47 ` Mauro Carvalho Chehab [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=20180807084733.7839c883@coco.lan \
--to=mchehab+samsung@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=ian.arkver.dev@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=p.zabel@pengutronix.de \
--cc=slongerbeam@gmail.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;
as well as URLs for NNTP newsgroup(s).