* [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
@ 2019-02-08 18:06 Gustavo A. R. Silva
2019-02-09 8:29 ` Tokunori Ikegami
0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-08 18:06 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/chips/cfi_cmdset_0002.c: In function ‘get_chip’:
drivers/mtd/chips/cfi_cmdset_0002.c:870:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (mode == FL_READY && chip->oldstate == FL_READY)
^
drivers/mtd/chips/cfi_cmdset_0002.c:873:2: note: here
default:
^~~~~~~
drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘cfi_amdstd_sync’:
drivers/mtd/chips/cfi_cmdset_0002.c:2745:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
chip->state = FL_SYNCING;
~~~~~~~~~~~~^~~~~~~~~~~~
drivers/mtd/chips/cfi_cmdset_0002.c:2750:3: note: here
case FL_SYNCING:
^~~~
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/chips/cfi_cmdset_0002.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 72428b6bfc47..0b0a1874d3bf 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -869,6 +869,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
/* Only if there's no operation suspended... */
if (mode == FL_READY && chip->oldstate == FL_READY)
return 0;
+ /* fall through */
default:
sleep:
@@ -2747,6 +2748,7 @@ static void cfi_amdstd_sync (struct mtd_info *mtd)
* as the whole point is that nobody can do anything
* with the chip now anyway.
*/
+ /* fall through */
case FL_SYNCING:
mutex_unlock(&chip->mutex);
break;
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
2019-02-08 18:06 [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs Gustavo A. R. Silva
@ 2019-02-09 8:29 ` Tokunori Ikegami
2019-02-12 15:35 ` Gustavo A. R. Silva
2019-03-20 20:16 ` Gustavo A. R. Silva
0 siblings, 2 replies; 5+ messages in thread
From: Tokunori Ikegami @ 2019-02-09 8:29 UTC (permalink / raw)
To: 'Gustavo A. R. Silva', 'David Woodhouse',
'Brian Norris', 'Boris Brezillon',
'Marek Vasut', 'Richard Weinberger'
Cc: linux-mtd, linux-kernel
Reviewed-by: Tokunori Ikegami <ikegami.t@gmail.com>
> -----Original Message-----
> From: linux-mtd [mailto:linux-mtd-bounces@lists.infradead.org] On Behalf
> Of Gustavo A. R. Silva
> Sent: Saturday, February 9, 2019 3:06 AM
> To: David Woodhouse; Brian Norris; Boris Brezillon; Marek Vasut; Richard
> Weinberger
> Cc: linux-mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Gustavo
> A. R. Silva
> Subject: [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘get_chip’:
> drivers/mtd/chips/cfi_cmdset_0002.c:870:6: warning: this statement may
> fall through [-Wimplicit-fallthrough=]
> if (mode == FL_READY && chip->oldstate == FL_READY)
> ^
> drivers/mtd/chips/cfi_cmdset_0002.c:873:2: note: here
> default:
> ^~~~~~~
> drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘cfi_amdstd_sync’:
> drivers/mtd/chips/cfi_cmdset_0002.c:2745:16: warning: this statement may
> fall through [-Wimplicit-fallthrough=]
> chip->state = FL_SYNCING;
> ~~~~~~~~~~~~^~~~~~~~~~~~
> drivers/mtd/chips/cfi_cmdset_0002.c:2750:3: note: here
> case FL_SYNCING:
> ^~~~
>
> 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/chips/cfi_cmdset_0002.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
> b/drivers/mtd/chips/cfi_cmdset_0002.c
> index 72428b6bfc47..0b0a1874d3bf 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> @@ -869,6 +869,7 @@ static int get_chip(struct map_info *map, struct flchip
> *chip, unsigned long adr
> /* Only if there's no operation suspended... */
> if (mode == FL_READY && chip->oldstate == FL_READY)
> return 0;
> + /* fall through */
>
> default:
> sleep:
> @@ -2747,6 +2748,7 @@ static void cfi_amdstd_sync (struct mtd_info *mtd)
> * as the whole point is that nobody can do anything
> * with the chip now anyway.
> */
> + /* fall through */
> case FL_SYNCING:
> mutex_unlock(&chip->mutex);
> break;
> --
> 2.20.1
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
2019-02-09 8:29 ` Tokunori Ikegami
@ 2019-02-12 15:35 ` Gustavo A. R. Silva
2019-03-20 20:16 ` Gustavo A. R. Silva
1 sibling, 0 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-12 15:35 UTC (permalink / raw)
To: Tokunori Ikegami, 'David Woodhouse',
'Brian Norris', 'Boris Brezillon',
'Marek Vasut', 'Richard Weinberger'
Cc: linux-mtd, linux-kernel
On 2/9/19 2:29 AM, Tokunori Ikegami wrote:
> Reviewed-by: Tokunori Ikegami <ikegami.t@gmail.com>
>
Thanks, Tokunori.
--
Gustavo
>> -----Original Message-----
>> From: linux-mtd [mailto:linux-mtd-bounces@lists.infradead.org] On Behalf
>> Of Gustavo A. R. Silva
>> Sent: Saturday, February 9, 2019 3:06 AM
>> To: David Woodhouse; Brian Norris; Boris Brezillon; Marek Vasut; Richard
>> Weinberger
>> Cc: linux-mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Gustavo
>> A. R. Silva
>> Subject: [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
>>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch
>> cases where we are expecting to fall through.
>>
>> This patch fixes the following warnings:
>>
>> drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘get_chip’:
>> drivers/mtd/chips/cfi_cmdset_0002.c:870:6: warning: this statement may
>> fall through [-Wimplicit-fallthrough=]
>> if (mode == FL_READY && chip->oldstate == FL_READY)
>> ^
>> drivers/mtd/chips/cfi_cmdset_0002.c:873:2: note: here
>> default:
>> ^~~~~~~
>> drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘cfi_amdstd_sync’:
>> drivers/mtd/chips/cfi_cmdset_0002.c:2745:16: warning: this statement may
>> fall through [-Wimplicit-fallthrough=]
>> chip->state = FL_SYNCING;
>> ~~~~~~~~~~~~^~~~~~~~~~~~
>> drivers/mtd/chips/cfi_cmdset_0002.c:2750:3: note: here
>> case FL_SYNCING:
>> ^~~~
>>
>> 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/chips/cfi_cmdset_0002.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
>> b/drivers/mtd/chips/cfi_cmdset_0002.c
>> index 72428b6bfc47..0b0a1874d3bf 100644
>> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
>> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
>> @@ -869,6 +869,7 @@ static int get_chip(struct map_info *map, struct flchip
>> *chip, unsigned long adr
>> /* Only if there's no operation suspended... */
>> if (mode == FL_READY && chip->oldstate == FL_READY)
>> return 0;
>> + /* fall through */
>>
>> default:
>> sleep:
>> @@ -2747,6 +2748,7 @@ static void cfi_amdstd_sync (struct mtd_info *mtd)
>> * as the whole point is that nobody can do anything
>> * with the chip now anyway.
>> */
>> + /* fall through */
>> case FL_SYNCING:
>> mutex_unlock(&chip->mutex);
>> break;
>> --
>> 2.20.1
>>
>>
>> ______________________________________________________
>> Linux MTD discussion mailing list
>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
2019-02-09 8:29 ` Tokunori Ikegami
2019-02-12 15:35 ` Gustavo A. R. Silva
@ 2019-03-20 20:16 ` Gustavo A. R. Silva
2019-04-10 21:15 ` Gustavo A. R. Silva
1 sibling, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-20 20:16 UTC (permalink / raw)
To: Tokunori Ikegami, '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/9/19 2:29 AM, Tokunori Ikegami wrote:
> Reviewed-by: Tokunori Ikegami <ikegami.t@gmail.com>
>
>> -----Original Message-----
>> From: linux-mtd [mailto:linux-mtd-bounces@lists.infradead.org] On Behalf
>> Of Gustavo A. R. Silva
>> Sent: Saturday, February 9, 2019 3:06 AM
>> To: David Woodhouse; Brian Norris; Boris Brezillon; Marek Vasut; Richard
>> Weinberger
>> Cc: linux-mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Gustavo
>> A. R. Silva
>> Subject: [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
>>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch
>> cases where we are expecting to fall through.
>>
>> This patch fixes the following warnings:
>>
>> drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘get_chip’:
>> drivers/mtd/chips/cfi_cmdset_0002.c:870:6: warning: this statement may
>> fall through [-Wimplicit-fallthrough=]
>> if (mode == FL_READY && chip->oldstate == FL_READY)
>> ^
>> drivers/mtd/chips/cfi_cmdset_0002.c:873:2: note: here
>> default:
>> ^~~~~~~
>> drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘cfi_amdstd_sync’:
>> drivers/mtd/chips/cfi_cmdset_0002.c:2745:16: warning: this statement may
>> fall through [-Wimplicit-fallthrough=]
>> chip->state = FL_SYNCING;
>> ~~~~~~~~~~~~^~~~~~~~~~~~
>> drivers/mtd/chips/cfi_cmdset_0002.c:2750:3: note: here
>> case FL_SYNCING:
>> ^~~~
>>
>> 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/chips/cfi_cmdset_0002.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
>> b/drivers/mtd/chips/cfi_cmdset_0002.c
>> index 72428b6bfc47..0b0a1874d3bf 100644
>> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
>> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
>> @@ -869,6 +869,7 @@ static int get_chip(struct map_info *map, struct flchip
>> *chip, unsigned long adr
>> /* Only if there's no operation suspended... */
>> if (mode == FL_READY && chip->oldstate == FL_READY)
>> return 0;
>> + /* fall through */
>>
>> default:
>> sleep:
>> @@ -2747,6 +2748,7 @@ static void cfi_amdstd_sync (struct mtd_info *mtd)
>> * as the whole point is that nobody can do anything
>> * with the chip now anyway.
>> */
>> + /* fall through */
>> case FL_SYNCING:
>> mutex_unlock(&chip->mutex);
>> break;
>> --
>> 2.20.1
>>
>>
>> ______________________________________________________
>> Linux MTD discussion mailing list
>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
2019-03-20 20:16 ` Gustavo A. R. Silva
@ 2019-04-10 21:15 ` Gustavo A. R. Silva
0 siblings, 0 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-04-10 21:15 UTC (permalink / raw)
To: Tokunori Ikegami, '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:16 PM, Gustavo A. R. Silva wrote:
> Hi all,
>
> Friendly ping:
>
> Who can take this?
>
> Thanks
> --
> Gustavo
>
> On 2/9/19 2:29 AM, Tokunori Ikegami wrote:
>> Reviewed-by: Tokunori Ikegami <ikegami.t@gmail.com>
>>
>>> -----Original Message-----
>>> From: linux-mtd [mailto:linux-mtd-bounces@lists.infradead.org] On Behalf
>>> Of Gustavo A. R. Silva
>>> Sent: Saturday, February 9, 2019 3:06 AM
>>> To: David Woodhouse; Brian Norris; Boris Brezillon; Marek Vasut; Richard
>>> Weinberger
>>> Cc: linux-mtd@lists.infradead.org; linux-kernel@vger.kernel.org; Gustavo
>>> A. R. Silva
>>> Subject: [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs
>>>
>>> In preparation to enabling -Wimplicit-fallthrough, mark switch
>>> cases where we are expecting to fall through.
>>>
>>> This patch fixes the following warnings:
>>>
>>> drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘get_chip’:
>>> drivers/mtd/chips/cfi_cmdset_0002.c:870:6: warning: this statement may
>>> fall through [-Wimplicit-fallthrough=]
>>> if (mode == FL_READY && chip->oldstate == FL_READY)
>>> ^
>>> drivers/mtd/chips/cfi_cmdset_0002.c:873:2: note: here
>>> default:
>>> ^~~~~~~
>>> drivers/mtd/chips/cfi_cmdset_0002.c: In function ‘cfi_amdstd_sync’:
>>> drivers/mtd/chips/cfi_cmdset_0002.c:2745:16: warning: this statement may
>>> fall through [-Wimplicit-fallthrough=]
>>> chip->state = FL_SYNCING;
>>> ~~~~~~~~~~~~^~~~~~~~~~~~
>>> drivers/mtd/chips/cfi_cmdset_0002.c:2750:3: note: here
>>> case FL_SYNCING:
>>> ^~~~
>>>
>>> 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/chips/cfi_cmdset_0002.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
>>> b/drivers/mtd/chips/cfi_cmdset_0002.c
>>> index 72428b6bfc47..0b0a1874d3bf 100644
>>> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
>>> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
>>> @@ -869,6 +869,7 @@ static int get_chip(struct map_info *map, struct flchip
>>> *chip, unsigned long adr
>>> /* Only if there's no operation suspended... */
>>> if (mode == FL_READY && chip->oldstate == FL_READY)
>>> return 0;
>>> + /* fall through */
>>>
>>> default:
>>> sleep:
>>> @@ -2747,6 +2748,7 @@ static void cfi_amdstd_sync (struct mtd_info *mtd)
>>> * as the whole point is that nobody can do anything
>>> * with the chip now anyway.
>>> */
>>> + /* fall through */
>>> case FL_SYNCING:
>>> mutex_unlock(&chip->mutex);
>>> break;
>>> --
>>> 2.20.1
>>>
>>>
>>> ______________________________________________________
>>> Linux MTD discussion mailing list
>>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-10 21:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08 18:06 [PATCH] mtd: cfi_cmdset_0002: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-02-09 8:29 ` Tokunori Ikegami
2019-02-12 15:35 ` Gustavo A. R. Silva
2019-03-20 20:16 ` Gustavo A. R. Silva
2019-04-10 21:15 ` 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).