public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"amy.shih" <amy.shih@advantech.com.tw>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Kees Cook <keescook@chromium.org>
Subject: linux-next: build warnings after merge of the hwmon-staging tree
Date: Thu, 6 Jun 2019 10:32:20 +1000	[thread overview]
Message-ID: <20190606103220.1168317e@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

Hi all,

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

drivers/hwmon/nct7904.c: In function 'nct7904_in_is_visible':
drivers/hwmon/nct7904.c:313:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (channel > 0 && (data->vsen_mask & BIT(index)))
      ^
drivers/hwmon/nct7904.c:315:2: note: here
  case hwmon_in_min:
  ^~~~
drivers/hwmon/nct7904.c: In function 'nct7904_fan_is_visible':
drivers/hwmon/nct7904.c:230:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (data->fanin_mask & (1 << channel))
      ^
drivers/hwmon/nct7904.c:232:2: note: here
  case hwmon_fan_min:
  ^~~~
drivers/hwmon/nct7904.c: In function 'nct7904_temp_is_visible':
drivers/hwmon/nct7904.c:443:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (channel < 5) {
      ^
drivers/hwmon/nct7904.c:450:2: note: here
  case hwmon_temp_max:
  ^~~~

Introduced by commit

  af55ab0b0792 ("hwmon: (nct7904) Add extra sysfs support for fan, voltage and temperature.")

I get these warnings 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2019-06-06  0:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06  0:32 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-24  5:22 linux-next: build warnings after merge of the hwmon-staging tree Stephen Rothwell
2022-06-07  4:19 Stephen Rothwell
2022-06-07  9:37 ` Bagas Sanjaya
2022-06-07 12:40   ` Guenter Roeck
2022-06-07  4:23 Stephen Rothwell
2022-06-07  9:35 ` Bagas Sanjaya
2022-06-07 12:39   ` Guenter Roeck
2024-02-04 23:41 Stephen Rothwell
2024-02-05  0:04 ` Guenter Roeck

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=20190606103220.1168317e@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=amy.shih@advantech.com.tw \
    --cc=gustavo@embeddedor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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