diff mbox

backlight: adp8860: Mark expected switch fall-through

Message ID 20180709215156.GA8782@embeddedor.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gustavo A. R. Silva July 9, 2018, 9:51 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/video/backlight/adp8860_bl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Hennerich, Michael July 10, 2018, 6:46 a.m. UTC | #1
On 09.07.2018 23:51, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Acked-by: Michael Hennerich <michael.hennerich@analog.com>

> ---
>   drivers/video/backlight/adp8860_bl.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
> index 16119bd..f1dc41c 100644
> --- a/drivers/video/backlight/adp8860_bl.c
> +++ b/drivers/video/backlight/adp8860_bl.c
> @@ -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;
>
Daniel Thompson July 10, 2018, 9 a.m. UTC | #2
On Mon, Jul 09, 2018 at 04:51:56PM -0500, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Having checked the datasheets...

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>

> ---
>  drivers/video/backlight/adp8860_bl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
> index 16119bd..f1dc41c 100644
> --- a/drivers/video/backlight/adp8860_bl.c
> +++ b/drivers/video/backlight/adp8860_bl.c
> @@ -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;
> -- 
> 2.7.4
>
Lee Jones July 13, 2018, 7:35 a.m. UTC | #3
On Mon, 09 Jul 2018, Gustavo A. R. Silva wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/video/backlight/adp8860_bl.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c
index 16119bd..f1dc41c 100644
--- a/drivers/video/backlight/adp8860_bl.c
+++ b/drivers/video/backlight/adp8860_bl.c
@@ -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;