Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through
@ 2019-02-08 18:12 Gustavo A. R. Silva
  2019-03-20 20:17 ` Gustavo A. R. Silva
  2019-04-10 21:47 ` Kees Cook
  0 siblings, 2 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-08 18:12 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger
  Cc: linux-mtd, linux-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 warnings:

drivers/mtd/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (mode == FL_READY && chip->oldstate == FL_READY)
      ^
drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
  default:
  ^~~~~~~

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>
---
 drivers/mtd/lpddr/lpddr_cmds.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index b13557fe52bd..76a4c73e100e 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -318,6 +318,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode)
 		/* Only if there's no operation suspended... */
 		if (mode == FL_READY && chip->oldstate == FL_READY)
 			return 0;
+		/* fall through */
 
 	default:
 sleep:
-- 
2.20.1


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

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

* Re: [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through
  2019-02-08 18:12 [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through Gustavo A. R. Silva
@ 2019-03-20 20:17 ` Gustavo A. R. Silva
  2019-04-10 21:15   ` Gustavo A. R. Silva
  2019-04-10 21:47 ` Kees Cook
  1 sibling, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-20 20:17 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger
  Cc: linux-mtd, linux-kernel

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

On 2/8/19 12:12 PM, 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 warnings:
> 
> drivers/mtd/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
> drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (mode == FL_READY && chip->oldstate == FL_READY)
>       ^
> drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
>   default:
>   ^~~~~~~
> 
> 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>
> ---
>  drivers/mtd/lpddr/lpddr_cmds.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
> index b13557fe52bd..76a4c73e100e 100644
> --- a/drivers/mtd/lpddr/lpddr_cmds.c
> +++ b/drivers/mtd/lpddr/lpddr_cmds.c
> @@ -318,6 +318,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode)
>  		/* Only if there's no operation suspended... */
>  		if (mode == FL_READY && chip->oldstate == FL_READY)
>  			return 0;
> +		/* fall through */
>  
>  	default:
>  sleep:
> 

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

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

* Re: [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through
  2019-03-20 20:17 ` Gustavo A. R. Silva
@ 2019-04-10 21:15   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-04-10 21:15 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger
  Cc: linux-mtd, linux-kernel, Kees Cook

Hi all,

If no one cares I'll add this to my tree for 5.2.

Thanks
--
Gustavo

On 3/20/19 3:17 PM, Gustavo A. R. Silva wrote:
> Hi all,
> 
> Friendly ping:
> 
> Who can take this?
> 
> Thanks
> --
> Gustavo
> 
> On 2/8/19 12:12 PM, 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 warnings:
>>
>> drivers/mtd/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
>> drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>    if (mode == FL_READY && chip->oldstate == FL_READY)
>>       ^
>> drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
>>   default:
>>   ^~~~~~~
>>
>> 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>
>> ---
>>  drivers/mtd/lpddr/lpddr_cmds.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
>> index b13557fe52bd..76a4c73e100e 100644
>> --- a/drivers/mtd/lpddr/lpddr_cmds.c
>> +++ b/drivers/mtd/lpddr/lpddr_cmds.c
>> @@ -318,6 +318,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode)
>>  		/* Only if there's no operation suspended... */
>>  		if (mode == FL_READY && chip->oldstate == FL_READY)
>>  			return 0;
>> +		/* fall through */
>>  
>>  	default:
>>  sleep:
>>

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

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

* Re: [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through
  2019-02-08 18:12 [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through Gustavo A. R. Silva
  2019-03-20 20:17 ` Gustavo A. R. Silva
@ 2019-04-10 21:47 ` Kees Cook
  1 sibling, 0 replies; 7+ messages in thread
From: Kees Cook @ 2019-04-10 21:47 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Boris Brezillon, Richard Weinberger, LKML, Marek Vasut,
	Linux mtd, Brian Norris, David Woodhouse

On Fri, Feb 8, 2019 at 10:12 AM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> drivers/mtd/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
> drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (mode == FL_READY && chip->oldstate == FL_READY)
>       ^
> drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
>   default:
>   ^~~~~~~
>
> 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>

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

> ---
>  drivers/mtd/lpddr/lpddr_cmds.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
> index b13557fe52bd..76a4c73e100e 100644
> --- a/drivers/mtd/lpddr/lpddr_cmds.c
> +++ b/drivers/mtd/lpddr/lpddr_cmds.c
> @@ -318,6 +318,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode)
>                 /* Only if there's no operation suspended... */
>                 if (mode == FL_READY && chip->oldstate == FL_READY)
>                         return 0;
> +               /* fall through */
>
>         default:
>  sleep:
> --
> 2.20.1
>


-- 
Kees Cook

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

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

* Re: [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through
  2019-02-13 14:05 ` Boris Brezillon
@ 2019-02-13 18:11   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-13 18:11 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Kees Cook, Richard Weinberger, linux-kernel, Marek Vasut,
	linux-mtd, Brian Norris, David Woodhouse



On 2/13/19 8:05 AM, Boris Brezillon wrote:
> On Tue, 12 Feb 2019 09:31:31 -0600
> "Gustavo A. R. Silva" <gustavo@embeddedor.com> 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/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
>> drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>    if (mode == FL_READY && chip->oldstate == FL_READY)
>>       ^
>> drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
>>   default:
>>   ^~~~~~~
>>
>> Warning level 3 was used: -Wimplicit-fallthrough=3
>>
>> This patch is part of the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
> 
> You sent me that one twice, is that expected? Is this a new version,
> and in that case, what has changed?
> 

Oh, it wasn't intentional.  Both are exactly the same patch.

Sorry about that.

--
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] mtd: lpddr_cmds: Mark expected switch fall-through
  2019-02-12 15:31 Gustavo A. R. Silva
@ 2019-02-13 14:05 ` Boris Brezillon
  2019-02-13 18:11   ` Gustavo A. R. Silva
  0 siblings, 1 reply; 7+ messages in thread
From: Boris Brezillon @ 2019-02-13 14:05 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kees Cook, Richard Weinberger, linux-kernel, Marek Vasut,
	linux-mtd, Brian Norris, David Woodhouse

On Tue, 12 Feb 2019 09:31:31 -0600
"Gustavo A. R. Silva" <gustavo@embeddedor.com> 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/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
> drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (mode == FL_READY && chip->oldstate == FL_READY)
>       ^
> drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
>   default:
>   ^~~~~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
> 

You sent me that one twice, is that expected? Is this a new version,
and in that case, what has changed?

> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/mtd/lpddr/lpddr_cmds.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
> index b13557fe52bd..76a4c73e100e 100644
> --- a/drivers/mtd/lpddr/lpddr_cmds.c
> +++ b/drivers/mtd/lpddr/lpddr_cmds.c
> @@ -318,6 +318,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode)
>  		/* Only if there's no operation suspended... */
>  		if (mode == FL_READY && chip->oldstate == FL_READY)
>  			return 0;
> +		/* fall through */
>  
>  	default:
>  sleep:


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

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

* [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through
@ 2019-02-12 15:31 Gustavo A. R. Silva
  2019-02-13 14:05 ` Boris Brezillon
  0 siblings, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-12 15:31 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger
  Cc: linux-mtd, linux-kernel, Kees Cook, 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/lpddr/lpddr_cmds.c: In function ‘chip_ready’:
drivers/mtd/lpddr/lpddr_cmds.c:319:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (mode == FL_READY && chip->oldstate == FL_READY)
      ^
drivers/mtd/lpddr/lpddr_cmds.c:322:2: note: here
  default:
  ^~~~~~~

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

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

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

diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index b13557fe52bd..76a4c73e100e 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -318,6 +318,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode)
 		/* Only if there's no operation suspended... */
 		if (mode == FL_READY && chip->oldstate == FL_READY)
 			return 0;
+		/* fall through */
 
 	default:
 sleep:
-- 
2.20.1


______________________________________________________
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, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08 18:12 [PATCH] mtd: lpddr_cmds: Mark expected switch fall-through Gustavo A. R. Silva
2019-03-20 20:17 ` Gustavo A. R. Silva
2019-04-10 21:15   ` Gustavo A. R. Silva
2019-04-10 21:47 ` Kees Cook
2019-02-12 15:31 Gustavo A. R. Silva
2019-02-13 14:05 ` Boris Brezillon
2019-02-13 18:11   ` Gustavo A. R. Silva

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org linux-mtd@archiver.kernel.org
	public-inbox-index linux-mtd


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/ public-inbox