linux-next: build warnings after merge of the hwmon-staging tree

From: Stephen Rothwell
Date: Wed Jun 05 2019 - 20:36:28 EST


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: pgpndT8vC6v2t.pgp
Description: OpenPGP digital signature