hwmon: (corsair-cpro) Fix fall-through warnings for Clang
Subsystems (2)
PATCH RESEND 1/1 hwmon: (corsair-cpro) Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
--- drivers/hwmon/corsair-cpro.c | 1 + 1 file changed, 1 insertion(+)
drivers/hwmon/corsair-cpro.c +1 -0
@@ -310,6 +310,7 @@ static int ccp_write(struct device *dev, enum hwmon_sensor_types type,default :break ; } +break ;default :break ; }
Signature · 1 line
2.27.0
On 06.03.21 at 10:53:59 CET, Gustavo A. R. Silva wrote
Quoted 7 lines
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
Acked-by Guenter Roeck <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>
Quoted 17 lines
--- drivers/hwmon/corsair-cpro.c | 1 + 1 file changed, 1 insertion(+)drivers/hwmon/corsair-cpro.c +1
-0@@ -310,6 +310,7 @@ static int ccp_write(struct device *dev, enum hwmon_sensor_types type,default :break ; } +break ;default :break ; }
Quoted 10 lines · Marius Zachmann
On 06.03.21 at 10:53:59 CET, Gustavo A. R. Silva wrote
Quoted 7 lines
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
Acked-by Guenter Roeck <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>Acked-by Marius Zachmann <[email protected]>
Thanks, Marius.
--
Gustavo
Quoted 22 lines
Quoted 18 lines
--- drivers/hwmon/corsair-cpro.c | 1 + 1 file changed, 1 insertion(+)drivers/hwmon/corsair-cpro.c +1
-0@@ -310,6 +310,7 @@ static int ccp_write(struct device *dev, enum hwmon_sensor_types type,default :break ; } +break ;default :break ; }
Hi all,
If you don't mind, I'm taking this in my -next[1] branch for v5.14.
Thanks
--
Gustavo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp
Quoted 32 lines · Marius Zachmann
On 06.03.21 at 10:53:59 CET, Gustavo A. R. Silva wrote
Quoted 7 lines
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.
Acked-by Guenter Roeck <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>Acked-by Marius Zachmann <[email protected]>Quoted 17 lines
--- drivers/hwmon/corsair-cpro.c | 1 + 1 file changed, 1 insertion(+)drivers/hwmon/corsair-cpro.c +1
-0@@ -310,6 +310,7 @@ static int ccp_write(struct device *dev, enum hwmon_sensor_types type,default :break ; } +break ;default :break ; }