lkml.org 
[lkml]   [2019]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-next: build warnings after merge of the hwmon-staging tree
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-06-06 02:32    [W:0.134 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site