linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs
@ 2019-02-08 17:49 Gustavo A. R. Silva
  2019-03-01 21:38 ` Gustavo A. R. Silva
  2019-04-01 15:23 ` Miquel Raynal
  0 siblings, 2 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-08 17:49 UTC (permalink / raw)
  To: Boris Brezillon, Miquel Raynal, Richard Weinberger,
	David Woodhouse, Brian Norris, Marek Vasut, Wan ZongShun
  Cc: Kees Cook, linux-mtd, linux-kernel, linux-arm-kernel,
	Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warning:

drivers/mtd/nand/raw/diskonchip.c: In function ‘doc_probe’:
./include/linux/printk.h:303:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/diskonchip.c:1479:4: note: in expansion of macro ‘pr_err’
    pr_err("DiskOnChip Millennium Plus 32MB is not supported, ignoring.\n");
    ^~~~~~
drivers/mtd/nand/raw/diskonchip.c:1480:3: note: here
   default:
   ^~~~~~~
drivers/mtd/nand/raw/nandsim.c: In function ‘ns_init_module’:
drivers/mtd/nand/raw/nandsim.c:2254:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
    chip->bbt_options |= NAND_BBT_NO_OOB;
drivers/mtd/nand/raw/nandsim.c:2255:2: note: here
  case 1:
  ^~~~
drivers/mtd/nand/raw/nuc900_nand.c: In function ‘nuc900_nand_command_lp’:
./arch/x86/include/asm/io.h:91:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
 #define __raw_writel __writel
drivers/mtd/nand/raw/nuc900_nand.c:52:2: note: in expansion of macro ‘__raw_writel’
  __raw_writel((val), (dev)->reg + REG_SMCMD)
  ^~~~~~~~~~~~
drivers/mtd/nand/raw/nuc900_nand.c:196:3: note: in expansion of macro ‘write_cmd_reg’
   write_cmd_reg(nand, NAND_CMD_READSTART);
   ^~~~~~~~~~~~~
drivers/mtd/nand/raw/nuc900_nand.c:197:2: note: here
  default:
  ^~~~~~~
drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_restore’:
drivers/mtd/nand/raw/omap_elm.c:512:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
    elm_write_reg(info, ELM_SYNDROME_FRAGMENT_4 + offset,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      regs->elm_syndrome_fragment_4[i]);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/omap_elm.c:514:3: note: here
   case BCH8_ECC:
   ^~~~
drivers/mtd/nand/raw/omap_elm.c:517:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
    elm_write_reg(info, ELM_SYNDROME_FRAGMENT_2 + offset,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      regs->elm_syndrome_fragment_2[i]);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/omap_elm.c:519:3: note: here
   case BCH4_ECC:
   ^~~~
drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_save’:
drivers/mtd/nand/raw/omap_elm.c:466:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
    regs->elm_syndrome_fragment_4[i] = elm_read_reg(info,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      ELM_SYNDROME_FRAGMENT_4 + offset);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/omap_elm.c:468:3: note: here
   case BCH8_ECC:
   ^~~~
drivers/mtd/nand/raw/omap_elm.c:471:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
    regs->elm_syndrome_fragment_2[i] = elm_read_reg(info,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      ELM_SYNDROME_FRAGMENT_2 + offset);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/omap_elm.c:473:3: note: here
   case BCH4_ECC:
   ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enabling
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
Changes in v3:
 - Leave out of this patch the following files:
	drivers/mtd/nand/onenand/onenand_base.c
	drivers/mtd/nand/raw/nand_base.c
	drivers/mtd/nand/raw/nand_legacy.c
	
   The first one needs to be reworked, and the last
   two have already been addressed.

Changes in v2:
 - Add extra /* fall through */ comment in nandsim.c file.

 drivers/mtd/nand/raw/diskonchip.c  | 1 +
 drivers/mtd/nand/raw/nandsim.c     | 6 ++++--
 drivers/mtd/nand/raw/nuc900_nand.c | 3 ++-
 drivers/mtd/nand/raw/omap_elm.c    | 4 ++++
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/raw/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c
index 53f57e0f007e..ead54c90f2d1 100644
--- a/drivers/mtd/nand/raw/diskonchip.c
+++ b/drivers/mtd/nand/raw/diskonchip.c
@@ -1477,6 +1477,7 @@ static int __init doc_probe(unsigned long physadr)
 			break;
 		case DOC_ChipID_DocMilPlus32:
 			pr_err("DiskOnChip Millennium Plus 32MB is not supported, ignoring.\n");
+			/* fall through */
 		default:
 			ret = -ENODEV;
 			goto notfound;
diff --git a/drivers/mtd/nand/raw/nandsim.c b/drivers/mtd/nand/raw/nandsim.c
index 933d1a629c51..edf5fd3d5f07 100644
--- a/drivers/mtd/nand/raw/nandsim.c
+++ b/drivers/mtd/nand/raw/nandsim.c
@@ -2251,9 +2251,11 @@ static int __init ns_init_module(void)
 
 	switch (bbt) {
 	case 2:
-		 chip->bbt_options |= NAND_BBT_NO_OOB;
+		chip->bbt_options |= NAND_BBT_NO_OOB;
+		/* fall through */
 	case 1:
-		 chip->bbt_options |= NAND_BBT_USE_FLASH;
+		chip->bbt_options |= NAND_BBT_USE_FLASH;
+		/* fall through */
 	case 0:
 		break;
 	default:
diff --git a/drivers/mtd/nand/raw/nuc900_nand.c b/drivers/mtd/nand/raw/nuc900_nand.c
index 38b1994e7ed3..56fa84029482 100644
--- a/drivers/mtd/nand/raw/nuc900_nand.c
+++ b/drivers/mtd/nand/raw/nuc900_nand.c
@@ -192,8 +192,9 @@ static void nuc900_nand_command_lp(struct nand_chip *chip,
 		return;
 
 	case NAND_CMD_READ0:
-
 		write_cmd_reg(nand, NAND_CMD_READSTART);
+		/* fall through */
+
 	default:
 
 		if (!chip->legacy.dev_ready) {
diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c
index a3f32f939cc1..94c6401ef32f 100644
--- a/drivers/mtd/nand/raw/omap_elm.c
+++ b/drivers/mtd/nand/raw/omap_elm.c
@@ -465,11 +465,13 @@ static int elm_context_save(struct elm_info *info)
 					ELM_SYNDROME_FRAGMENT_5 + offset);
 			regs->elm_syndrome_fragment_4[i] = elm_read_reg(info,
 					ELM_SYNDROME_FRAGMENT_4 + offset);
+			/* fall through */
 		case BCH8_ECC:
 			regs->elm_syndrome_fragment_3[i] = elm_read_reg(info,
 					ELM_SYNDROME_FRAGMENT_3 + offset);
 			regs->elm_syndrome_fragment_2[i] = elm_read_reg(info,
 					ELM_SYNDROME_FRAGMENT_2 + offset);
+			/* fall through */
 		case BCH4_ECC:
 			regs->elm_syndrome_fragment_1[i] = elm_read_reg(info,
 					ELM_SYNDROME_FRAGMENT_1 + offset);
@@ -511,11 +513,13 @@ static int elm_context_restore(struct elm_info *info)
 					regs->elm_syndrome_fragment_5[i]);
 			elm_write_reg(info, ELM_SYNDROME_FRAGMENT_4 + offset,
 					regs->elm_syndrome_fragment_4[i]);
+			/* fall through */
 		case BCH8_ECC:
 			elm_write_reg(info, ELM_SYNDROME_FRAGMENT_3 + offset,
 					regs->elm_syndrome_fragment_3[i]);
 			elm_write_reg(info, ELM_SYNDROME_FRAGMENT_2 + offset,
 					regs->elm_syndrome_fragment_2[i]);
+			/* fall through */
 		case BCH4_ECC:
 			elm_write_reg(info, ELM_SYNDROME_FRAGMENT_1 + offset,
 					regs->elm_syndrome_fragment_1[i]);
-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs
  2019-02-08 17:49 [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs Gustavo A. R. Silva
@ 2019-03-01 21:38 ` Gustavo A. R. Silva
  2019-03-01 22:39   ` Richard Weinberger
  2019-04-01 15:23 ` Miquel Raynal
  1 sibling, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-01 21:38 UTC (permalink / raw)
  To: Boris Brezillon, Miquel Raynal, Richard Weinberger,
	David Woodhouse, Brian Norris, Marek Vasut, Wan ZongShun
  Cc: linux-mtd, linux-kernel, linux-arm-kernel, Kees Cook

Hi all,

Friendly ping:

Who can take this, please?

Thanks
--
Gustavo

On 2/8/19 11:49 AM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
> 
> This patch fixes the following warning:
> 
> drivers/mtd/nand/raw/diskonchip.c: In function ‘doc_probe’:
> ./include/linux/printk.h:303:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/diskonchip.c:1479:4: note: in expansion of macro ‘pr_err’
>     pr_err("DiskOnChip Millennium Plus 32MB is not supported, ignoring.\n");
>     ^~~~~~
> drivers/mtd/nand/raw/diskonchip.c:1480:3: note: here
>    default:
>    ^~~~~~~
> drivers/mtd/nand/raw/nandsim.c: In function ‘ns_init_module’:
> drivers/mtd/nand/raw/nandsim.c:2254:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     chip->bbt_options |= NAND_BBT_NO_OOB;
> drivers/mtd/nand/raw/nandsim.c:2255:2: note: here
>   case 1:
>   ^~~~
> drivers/mtd/nand/raw/nuc900_nand.c: In function ‘nuc900_nand_command_lp’:
> ./arch/x86/include/asm/io.h:91:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
>  #define __raw_writel __writel
> drivers/mtd/nand/raw/nuc900_nand.c:52:2: note: in expansion of macro ‘__raw_writel’
>   __raw_writel((val), (dev)->reg + REG_SMCMD)
>   ^~~~~~~~~~~~
> drivers/mtd/nand/raw/nuc900_nand.c:196:3: note: in expansion of macro ‘write_cmd_reg’
>    write_cmd_reg(nand, NAND_CMD_READSTART);
>    ^~~~~~~~~~~~~
> drivers/mtd/nand/raw/nuc900_nand.c:197:2: note: here
>   default:
>   ^~~~~~~
> drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_restore’:
> drivers/mtd/nand/raw/omap_elm.c:512:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     elm_write_reg(info, ELM_SYNDROME_FRAGMENT_4 + offset,
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       regs->elm_syndrome_fragment_4[i]);
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:514:3: note: here
>    case BCH8_ECC:
>    ^~~~
> drivers/mtd/nand/raw/omap_elm.c:517:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     elm_write_reg(info, ELM_SYNDROME_FRAGMENT_2 + offset,
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       regs->elm_syndrome_fragment_2[i]);
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:519:3: note: here
>    case BCH4_ECC:
>    ^~~~
> drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_save’:
> drivers/mtd/nand/raw/omap_elm.c:466:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     regs->elm_syndrome_fragment_4[i] = elm_read_reg(info,
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
>       ELM_SYNDROME_FRAGMENT_4 + offset);
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:468:3: note: here
>    case BCH8_ECC:
>    ^~~~
> drivers/mtd/nand/raw/omap_elm.c:471:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     regs->elm_syndrome_fragment_2[i] = elm_read_reg(info,
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
>       ELM_SYNDROME_FRAGMENT_2 + offset);
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:473:3: note: here
>    case BCH4_ECC:
>    ^~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This patch is part of the ongoing efforts to enabling
> -Wimplicit-fallthrough.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> Changes in v3:
>  - Leave out of this patch the following files:
> 	drivers/mtd/nand/onenand/onenand_base.c
> 	drivers/mtd/nand/raw/nand_base.c
> 	drivers/mtd/nand/raw/nand_legacy.c
> 	
>    The first one needs to be reworked, and the last
>    two have already been addressed.
> 
> Changes in v2:
>  - Add extra /* fall through */ comment in nandsim.c file.
> 
>  drivers/mtd/nand/raw/diskonchip.c  | 1 +
>  drivers/mtd/nand/raw/nandsim.c     | 6 ++++--
>  drivers/mtd/nand/raw/nuc900_nand.c | 3 ++-
>  drivers/mtd/nand/raw/omap_elm.c    | 4 ++++
>  4 files changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c
> index 53f57e0f007e..ead54c90f2d1 100644
> --- a/drivers/mtd/nand/raw/diskonchip.c
> +++ b/drivers/mtd/nand/raw/diskonchip.c
> @@ -1477,6 +1477,7 @@ static int __init doc_probe(unsigned long physadr)
>  			break;
>  		case DOC_ChipID_DocMilPlus32:
>  			pr_err("DiskOnChip Millennium Plus 32MB is not supported, ignoring.\n");
> +			/* fall through */
>  		default:
>  			ret = -ENODEV;
>  			goto notfound;
> diff --git a/drivers/mtd/nand/raw/nandsim.c b/drivers/mtd/nand/raw/nandsim.c
> index 933d1a629c51..edf5fd3d5f07 100644
> --- a/drivers/mtd/nand/raw/nandsim.c
> +++ b/drivers/mtd/nand/raw/nandsim.c
> @@ -2251,9 +2251,11 @@ static int __init ns_init_module(void)
>  
>  	switch (bbt) {
>  	case 2:
> -		 chip->bbt_options |= NAND_BBT_NO_OOB;
> +		chip->bbt_options |= NAND_BBT_NO_OOB;
> +		/* fall through */
>  	case 1:
> -		 chip->bbt_options |= NAND_BBT_USE_FLASH;
> +		chip->bbt_options |= NAND_BBT_USE_FLASH;
> +		/* fall through */
>  	case 0:
>  		break;
>  	default:
> diff --git a/drivers/mtd/nand/raw/nuc900_nand.c b/drivers/mtd/nand/raw/nuc900_nand.c
> index 38b1994e7ed3..56fa84029482 100644
> --- a/drivers/mtd/nand/raw/nuc900_nand.c
> +++ b/drivers/mtd/nand/raw/nuc900_nand.c
> @@ -192,8 +192,9 @@ static void nuc900_nand_command_lp(struct nand_chip *chip,
>  		return;
>  
>  	case NAND_CMD_READ0:
> -
>  		write_cmd_reg(nand, NAND_CMD_READSTART);
> +		/* fall through */
> +
>  	default:
>  
>  		if (!chip->legacy.dev_ready) {
> diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c
> index a3f32f939cc1..94c6401ef32f 100644
> --- a/drivers/mtd/nand/raw/omap_elm.c
> +++ b/drivers/mtd/nand/raw/omap_elm.c
> @@ -465,11 +465,13 @@ static int elm_context_save(struct elm_info *info)
>  					ELM_SYNDROME_FRAGMENT_5 + offset);
>  			regs->elm_syndrome_fragment_4[i] = elm_read_reg(info,
>  					ELM_SYNDROME_FRAGMENT_4 + offset);
> +			/* fall through */
>  		case BCH8_ECC:
>  			regs->elm_syndrome_fragment_3[i] = elm_read_reg(info,
>  					ELM_SYNDROME_FRAGMENT_3 + offset);
>  			regs->elm_syndrome_fragment_2[i] = elm_read_reg(info,
>  					ELM_SYNDROME_FRAGMENT_2 + offset);
> +			/* fall through */
>  		case BCH4_ECC:
>  			regs->elm_syndrome_fragment_1[i] = elm_read_reg(info,
>  					ELM_SYNDROME_FRAGMENT_1 + offset);
> @@ -511,11 +513,13 @@ static int elm_context_restore(struct elm_info *info)
>  					regs->elm_syndrome_fragment_5[i]);
>  			elm_write_reg(info, ELM_SYNDROME_FRAGMENT_4 + offset,
>  					regs->elm_syndrome_fragment_4[i]);
> +			/* fall through */
>  		case BCH8_ECC:
>  			elm_write_reg(info, ELM_SYNDROME_FRAGMENT_3 + offset,
>  					regs->elm_syndrome_fragment_3[i]);
>  			elm_write_reg(info, ELM_SYNDROME_FRAGMENT_2 + offset,
>  					regs->elm_syndrome_fragment_2[i]);
> +			/* fall through */
>  		case BCH4_ECC:
>  			elm_write_reg(info, ELM_SYNDROME_FRAGMENT_1 + offset,
>  					regs->elm_syndrome_fragment_1[i]);
> 

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs
  2019-03-01 21:38 ` Gustavo A. R. Silva
@ 2019-03-01 22:39   ` Richard Weinberger
  2019-03-02  0:33     ` Gustavo A. R. Silva
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2019-03-01 22:39 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Wan ZongShun, Boris Brezillon, linux-kernel,
	Marek Vasut, linux-mtd, Miquel Raynal, Brian Norris,
	David Woodhouse, linux-arm-kernel

Am Freitag, 1. März 2019, 22:38:18 CET schrieb Gustavo A. R. Silva:
> Hi all,
> 
> Friendly ping:
> 
> Who can take this, please?

/me points to Miquel. :)

Thanks,
//richard



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs
  2019-03-01 22:39   ` Richard Weinberger
@ 2019-03-02  0:33     ` Gustavo A. R. Silva
  2019-03-02 14:47       ` Miquel Raynal
  0 siblings, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-02  0:33 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Kees Cook, Wan ZongShun, Boris Brezillon, linux-kernel,
	Marek Vasut, linux-mtd, Miquel Raynal, Brian Norris,
	David Woodhouse, linux-arm-kernel



On 3/1/19 4:39 PM, Richard Weinberger wrote:
> Am Freitag, 1. März 2019, 22:38:18 CET schrieb Gustavo A. R. Silva:
>> Hi all,
>>
>> Friendly ping:
>>
>> Who can take this, please?
> 
> /me points to Miquel. :)
> 

Thanks, Richard.

Hopefully, Miquel will take this for 5.1. :)

--
Gustavo

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs
  2019-03-02  0:33     ` Gustavo A. R. Silva
@ 2019-03-02 14:47       ` Miquel Raynal
  0 siblings, 0 replies; 7+ messages in thread
From: Miquel Raynal @ 2019-03-02 14:47 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Wan ZongShun, Boris Brezillon, Richard Weinberger,
	linux-kernel, Marek Vasut, linux-mtd, Brian Norris,
	David Woodhouse, linux-arm-kernel

Hi Gustavo,

"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Fri, 1 Mar 2019
18:33:13 -0600:

> On 3/1/19 4:39 PM, Richard Weinberger wrote:
> > Am Freitag, 1. März 2019, 22:38:18 CET schrieb Gustavo A. R. Silva:  
> >> Hi all,
> >>
> >> Friendly ping:
> >>
> >> Who can take this, please?  
> > 
> > /me points to Miquel. :)

Yup!

> >   
> 
> Thanks, Richard.
> 
> Hopefully, Miquel will take this for 5.1. :)

No. The timing on your side was right but I was late to send the PR and
I choose not to take this one in a hurry although you addressed only
trivial cases and left aside the ones which were more likely to
introduce bugs. Nevertheless, I plan to queue it for 5.2.


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs
  2019-02-08 17:49 [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs Gustavo A. R. Silva
  2019-03-01 21:38 ` Gustavo A. R. Silva
@ 2019-04-01 15:23 ` Miquel Raynal
  2019-04-01 15:33   ` Gustavo A. R. Silva
  1 sibling, 1 reply; 7+ messages in thread
From: Miquel Raynal @ 2019-04-01 15:23 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Wan ZongShun, Boris Brezillon, Richard Weinberger,
	linux-kernel, Marek Vasut, linux-mtd, Brian Norris,
	David Woodhouse, linux-arm-kernel

Hi Gustavo,

"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote on Fri, 8 Feb 2019
11:49:30 -0600:

> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
> 
> This patch fixes the following warning:
> 
> drivers/mtd/nand/raw/diskonchip.c: In function ‘doc_probe’:
> ./include/linux/printk.h:303:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/diskonchip.c:1479:4: note: in expansion of macro ‘pr_err’
>     pr_err("DiskOnChip Millennium Plus 32MB is not supported, ignoring.\n");
>     ^~~~~~
> drivers/mtd/nand/raw/diskonchip.c:1480:3: note: here
>    default:
>    ^~~~~~~
> drivers/mtd/nand/raw/nandsim.c: In function ‘ns_init_module’:
> drivers/mtd/nand/raw/nandsim.c:2254:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     chip->bbt_options |= NAND_BBT_NO_OOB;
> drivers/mtd/nand/raw/nandsim.c:2255:2: note: here
>   case 1:
>   ^~~~
> drivers/mtd/nand/raw/nuc900_nand.c: In function ‘nuc900_nand_command_lp’:
> ./arch/x86/include/asm/io.h:91:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
>  #define __raw_writel __writel
> drivers/mtd/nand/raw/nuc900_nand.c:52:2: note: in expansion of macro ‘__raw_writel’
>   __raw_writel((val), (dev)->reg + REG_SMCMD)
>   ^~~~~~~~~~~~
> drivers/mtd/nand/raw/nuc900_nand.c:196:3: note: in expansion of macro ‘write_cmd_reg’
>    write_cmd_reg(nand, NAND_CMD_READSTART);
>    ^~~~~~~~~~~~~
> drivers/mtd/nand/raw/nuc900_nand.c:197:2: note: here
>   default:
>   ^~~~~~~
> drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_restore’:
> drivers/mtd/nand/raw/omap_elm.c:512:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     elm_write_reg(info, ELM_SYNDROME_FRAGMENT_4 + offset,
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       regs->elm_syndrome_fragment_4[i]);
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:514:3: note: here
>    case BCH8_ECC:
>    ^~~~
> drivers/mtd/nand/raw/omap_elm.c:517:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     elm_write_reg(info, ELM_SYNDROME_FRAGMENT_2 + offset,
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       regs->elm_syndrome_fragment_2[i]);
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:519:3: note: here
>    case BCH4_ECC:
>    ^~~~
> drivers/mtd/nand/raw/omap_elm.c: In function ‘elm_context_save’:
> drivers/mtd/nand/raw/omap_elm.c:466:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     regs->elm_syndrome_fragment_4[i] = elm_read_reg(info,
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
>       ELM_SYNDROME_FRAGMENT_4 + offset);
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:468:3: note: here
>    case BCH8_ECC:
>    ^~~~
> drivers/mtd/nand/raw/omap_elm.c:471:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     regs->elm_syndrome_fragment_2[i] = elm_read_reg(info,
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
>       ELM_SYNDROME_FRAGMENT_2 + offset);
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/mtd/nand/raw/omap_elm.c:473:3: note: here
>    case BCH4_ECC:
>    ^~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This patch is part of the ongoing efforts to enabling
> -Wimplicit-fallthrough.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---

Applied to git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
on nand/next.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs
  2019-04-01 15:23 ` Miquel Raynal
@ 2019-04-01 15:33   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-04-01 15:33 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Kees Cook, Wan ZongShun, Boris Brezillon, Richard Weinberger,
	linux-kernel, Marek Vasut, linux-mtd, Brian Norris,
	David Woodhouse, linux-arm-kernel

Hi Miquel,

On 4/1/19 10:23 AM, Miquel Raynal wrote:
[..]
>>
>> This patch is part of the ongoing efforts to enabling
>> -Wimplicit-fallthrough.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
> 
> Applied to git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git
> on nand/next.
> 

Thank you!
--
Gustavo

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-04-01 15:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08 17:49 [PATCH v3] mtd: rawnand: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-03-01 21:38 ` Gustavo A. R. Silva
2019-03-01 22:39   ` Richard Weinberger
2019-03-02  0:33     ` Gustavo A. R. Silva
2019-03-02 14:47       ` Miquel Raynal
2019-04-01 15:23 ` Miquel Raynal
2019-04-01 15:33   ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).