LinuxTV Patchwork media: dm365_ipipeif: better annotate a fall though

login
register
mail settings
Submitter Mauro Carvalho Chehab
Date Nov. 6, 2018, 10:55 a.m.
Message ID <6d03257da95f7d8db273496733a9e9871936bcff.1541501746.git.mchehab+samsung@kernel.org>
Download mbox | patch
Permalink /patch/52804/
State New
Delegated to: Mauro Carvalho Chehab
Headers show

Comments

Mauro Carvalho Chehab - Nov. 6, 2018, 10:55 a.m.
Shut up this warning:

	drivers/staging/media/davinci_vpfe/dm365_ipipeif.c: In function 'ipipeif_hw_setup':
	drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:298:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
	   switch (isif_port_if) {
	   ^~~~~~
	drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:314:2: note: here
	  case IPIPEIF_SDRAM_YUV:
	  ^~~~

By annotating a fall though case at the right place.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 1 +
 1 file changed, 1 insertion(+)
Hans Verkuil - Nov. 6, 2018, 11:50 a.m.
On 11/06/18 11:55, Mauro Carvalho Chehab wrote:
> Shut up this warning:
> 
> 	drivers/staging/media/davinci_vpfe/dm365_ipipeif.c: In function 'ipipeif_hw_setup':
> 	drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:298:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 	   switch (isif_port_if) {
> 	   ^~~~~~
> 	drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:314:2: note: here
> 	  case IPIPEIF_SDRAM_YUV:
> 	  ^~~~
> 
> By annotating a fall though case at the right place.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Thanks!

	Hans

> ---
>  drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
> index a53231b08d30..e3425bf082ae 100644
> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
> @@ -310,6 +310,7 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd)
>  			ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2);
>  			break;
>  		}
> +		/* fall through */
>  
>  	case IPIPEIF_SDRAM_YUV:
>  		/* Set clock divider */
>

Patch

diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
index a53231b08d30..e3425bf082ae 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
@@ -310,6 +310,7 @@  static int ipipeif_hw_setup(struct v4l2_subdev *sd)
 			ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2);
 			break;
 		}
+		/* fall through */
 
 	case IPIPEIF_SDRAM_YUV:
 		/* Set clock divider */

Privacy Policy