From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Greg KH <greg@kroah.com>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Tomasz Duszynski <tduszyns@gmail.com>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
Kees Cook <keescook@chromium.org>
Subject: Re: linux-next: build warnings after merge of the staging tree
Date: Tue, 5 Feb 2019 10:24:03 +0000 [thread overview]
Message-ID: <20190205102403.000046d6@huawei.com> (raw)
In-Reply-To: <20190205142217.0c9ecabf@canb.auug.org.au>
On Tue, 5 Feb 2019 14:22:17 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Greg,
>
> After merging the staging tree, today's linux-next build (x86_64
> allmodconfig) produced these warnings:
>
> drivers/iio/chemical/sps30.c: In function 'sps30_read_raw':
> drivers/iio/chemical/sps30.c:289:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
> switch (chan->channel2) {
> ^~~~~~
> drivers/iio/chemical/sps30.c:299:3: note: here
> default:
> ^~~~~~~
> drivers/iio/chemical/sps30.c: In function 'sps30_do_cmd':
> drivers/iio/chemical/sps30.c:120:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
> buf[1] = (u8)SPS30_AUTO_CLEANING_PERIOD;
> ^
> drivers/iio/chemical/sps30.c:121:2: note: here
> case SPS30_READ_DATA_READY_FLAG:
> ^~~~
>
> Introduced by commits
>
> 232e0f6ddeae ("iio: chemical: add support for Sensirion SPS30 sensor")
> 62129a0849d2 ("iio: chemical: sps30: allow changing self cleaning period")
>
> 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).
>
These both should both be marked - certainly look to be intentional.
The second one might be better handled with an additional return of the -EINVAL.
Thomasz, could you send me a patch tidying this up.
Thanks Stephen!
Jonathan
next prev parent reply other threads:[~2019-02-05 10:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 3:22 linux-next: build warnings after merge of the staging tree Stephen Rothwell
2019-02-05 10:24 ` Jonathan Cameron [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-14 4:34 Stephen Rothwell
2018-05-14 9:26 ` Greg KH
2017-11-02 4:38 Stephen Rothwell
2017-07-31 5:02 Stephen Rothwell
2017-08-09 1:25 ` Stephen Rothwell
2017-08-22 1:49 ` Stephen Rothwell
2017-08-17 17:57 ` Greg KH
2017-08-18 12:02 ` JB Van Puyvelde
2015-05-29 10:40 Stephen Rothwell
2015-06-01 8:50 ` Stephen Rothwell
2015-06-20 10:48 ` Stephen Rothwell
2015-06-20 14:50 ` Greg KH
2015-05-06 4:10 Stephen Rothwell
2015-05-06 6:56 ` Julia Lawall
2012-01-31 3:25 Stephen Rothwell
2012-01-31 5:14 ` Greg KH
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=20190205102403.000046d6@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=greg@kroah.com \
--cc=gustavo@embeddedor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tduszyns@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).