backlight: adp8860: Mark expected switch fall-through
Subsystems (3)
PATCH 1/1 backlight: adp8860: Mark expected switch fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
--- drivers/video/backlight/adp8860_bl.c | 1 + 1 file changed, 1 insertion(+)
drivers/video/backlight/adp8860_bl.c +1 -0
@@ -690,6 +690,7 @@ static int adp8860_probe(struct i2c_client *client,switch (ADP8860_MANID (reg_val)) {case ADP8863_MANUFID : data->gdwn_dis = !!pdata->gdwn_dis; +/* fall through */ case ADP8860_MANUFID : data->en_ambl_sens = !!pdata->en_ambl_sens;break ;
Signature · 1 line
2.7.4
Quoted 7 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/video/backlight/adp8860_bl.c | 1 + 1 file changed, 1 insertion(+)
Looks good to me, but Dan should still review.
https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc.pdf#page†
Signature · 8 lines
Lee Jones [��斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Quoted 17 lines
--- drivers/video/backlight/adp8860_bl.c | 1 + 1 file changed, 1 insertion(+)drivers/video/backlight/adp8860_bl.c +1
-0@@ -690,6 +690,7 @@ static int adp8860_probe(struct i2c_client *client,switch (ADP8860_MANID (reg_val)) {case ADP8863_MANUFID : data->gdwn_dis = !!pdata->gdwn_dis; +/* fall through */ case ADP8860_MANUFID : data->en_ambl_sens = !!pdata->en_ambl_sens;break ;
Signature · 7 lines
Greetings, Michael -- Analog Devices GmbH Otl-Aicher Strasse 60-64 80807 München Sitz der Gesellschaft München, Registergericht München HRB 40368, Geschäftsführer: Peter Kolberg, Ali Raza Husain, Eileen Wynne
Quoted 4 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Having checked the datasheets...
Quoted 19 lines
--- drivers/video/backlight/adp8860_bl.c | 1 + 1 file changed, 1 insertion(+)drivers/video/backlight/adp8860_bl.c +1
-0@@ -690,6 +690,7 @@ static int adp8860_probe(struct i2c_client *client,switch (ADP8860_MANID (reg_val)) {case ADP8863_MANUFID : data->gdwn_dis = !!pdata->gdwn_dis; +/* fall through */ case ADP8860_MANUFID : data->en_ambl_sens = !!pdata->en_ambl_sens;break ;Signature · 1 line
2.7.4
Lee Jones
AppliedQuoted 7 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/video/backlight/adp8860_bl.c | 1 + 1 file changed, 1 insertion(+)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog