public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARC: unwind: Mark expected switch fall-through
@ 2019-08-21  1:29 Gustavo A. R. Silva
  2019-08-29  1:47 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-08-21  1:29 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: linux-snps-arc, linux-kernel, Gustavo A. R. Silva

Mark switch cases where we are expecting to fall through.

This patch fixes the following warnings (Building: haps_hs_defconfig arc):

arch/arc/kernel/unwind.c: In function ‘read_pointer’:
./include/linux/compiler.h:328:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
  do {        \
     ^
./include/linux/compiler.h:338:2: note: in expansion of macro ‘__compiletime_assert’
  __compiletime_assert(condition, msg, prefix, suffix)
  ^~~~~~~~~~~~~~~~~~~~
./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^~~~~~~~~~~~~~~~
arch/arc/kernel/unwind.c:573:3: note: in expansion of macro ‘BUILD_BUG_ON’
   BUILD_BUG_ON(sizeof(u32) != sizeof(value));
   ^~~~~~~~~~~~
arch/arc/kernel/unwind.c:575:2: note: here
  case DW_EH_PE_native:
  ^~~~

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 arch/arc/kernel/unwind.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
index 445e4d702f43..dc05a63516f5 100644
--- a/arch/arc/kernel/unwind.c
+++ b/arch/arc/kernel/unwind.c
@@ -572,6 +572,7 @@ static unsigned long read_pointer(const u8 **pLoc, const void *end,
 #else
 		BUILD_BUG_ON(sizeof(u32) != sizeof(value));
 #endif
+		/* Fall through */
 	case DW_EH_PE_native:
 		if (end < (const void *)(ptr.pul + 1))
 			return 0;
-- 
2.23.0


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

* Re: [PATCH] ARC: unwind: Mark expected switch fall-through
  2019-08-21  1:29 [PATCH] ARC: unwind: Mark expected switch fall-through Gustavo A. R. Silva
@ 2019-08-29  1:47 ` Gustavo A. R. Silva
  2019-08-29 11:25   ` Eugeniy Paltsev
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-08-29  1:47 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: linux-snps-arc, linux-kernel

Hi,

Friendly ping:

Who can take this, please?

Thanks
--
Gustavo

On 8/20/19 8:29 PM, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
> 
> This patch fixes the following warnings (Building: haps_hs_defconfig arc):
> 
> arch/arc/kernel/unwind.c: In function ‘read_pointer’:
> ./include/linux/compiler.h:328:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   do {        \
>      ^
> ./include/linux/compiler.h:338:2: note: in expansion of macro ‘__compiletime_assert’
>   __compiletime_assert(condition, msg, prefix, suffix)
>   ^~~~~~~~~~~~~~~~~~~~
> ./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’
>   _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>   ^~~~~~~~~~~~~~~~~~~
> ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
>  #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>                                      ^~~~~~~~~~~~~~~~~~
> ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
>   BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>   ^~~~~~~~~~~~~~~~
> arch/arc/kernel/unwind.c:573:3: note: in expansion of macro ‘BUILD_BUG_ON’
>    BUILD_BUG_ON(sizeof(u32) != sizeof(value));
>    ^~~~~~~~~~~~
> arch/arc/kernel/unwind.c:575:2: note: here
>   case DW_EH_PE_native:
>   ^~~~
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  arch/arc/kernel/unwind.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
> index 445e4d702f43..dc05a63516f5 100644
> --- a/arch/arc/kernel/unwind.c
> +++ b/arch/arc/kernel/unwind.c
> @@ -572,6 +572,7 @@ static unsigned long read_pointer(const u8 **pLoc, const void *end,
>  #else
>  		BUILD_BUG_ON(sizeof(u32) != sizeof(value));
>  #endif
> +		/* Fall through */
>  	case DW_EH_PE_native:
>  		if (end < (const void *)(ptr.pul + 1))
>  			return 0;
> 

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

* Re: [PATCH] ARC: unwind: Mark expected switch fall-through
  2019-08-29  1:47 ` Gustavo A. R. Silva
@ 2019-08-29 11:25   ` Eugeniy Paltsev
  2019-08-29 15:05     ` Gustavo A. R. Silva
  0 siblings, 1 reply; 5+ messages in thread
From: Eugeniy Paltsev @ 2019-08-29 11:25 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
	Vineet Gupta

Hi Gustavo,

I guess this patch is already sent as a pull request to 'v5.3-rc7' by Vineet:
https://www.mail-archive.com/linux-snps-arc@lists.infradead.org/msg05854.html

---
 Eugeniy Paltsev


________________________________________
From: linux-snps-arc <linux-snps-arc-bounces@lists.infradead.org> on behalf of Gustavo A. R. Silva <gustavo@embeddedor.com>
Sent: Thursday, August 29, 2019 04:47
To: Vineet Gupta
Cc: linux-snps-arc@lists.infradead.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARC: unwind: Mark expected switch fall-through

Hi,

Friendly ping:

Who can take this, please?

Thanks
--
Gustavo

On 8/20/19 8:29 PM, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warnings (Building: haps_hs_defconfig arc):
>
> arch/arc/kernel/unwind.c: In function ‘read_pointer’:
> ./include/linux/compiler.h:328:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   do {        \
>      ^
> ./include/linux/compiler.h:338:2: note: in expansion of macro ‘__compiletime_assert’
>   __compiletime_assert(condition, msg, prefix, suffix)
>   ^~~~~~~~~~~~~~~~~~~~
> ./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’
>   _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>   ^~~~~~~~~~~~~~~~~~~
> ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
>  #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>                                      ^~~~~~~~~~~~~~~~~~
> ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
>   BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>   ^~~~~~~~~~~~~~~~
> arch/arc/kernel/unwind.c:573:3: note: in expansion of macro ‘BUILD_BUG_ON’
>    BUILD_BUG_ON(sizeof(u32) != sizeof(value));
>    ^~~~~~~~~~~~
> arch/arc/kernel/unwind.c:575:2: note: here
>   case DW_EH_PE_native:
>   ^~~~
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  arch/arc/kernel/unwind.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
> index 445e4d702f43..dc05a63516f5 100644
> --- a/arch/arc/kernel/unwind.c
> +++ b/arch/arc/kernel/unwind.c
> @@ -572,6 +572,7 @@ static unsigned long read_pointer(const u8 **pLoc, const void *end,
>  #else
>               BUILD_BUG_ON(sizeof(u32) != sizeof(value));
>  #endif
> +             /* Fall through */
>       case DW_EH_PE_native:
>               if (end < (const void *)(ptr.pul + 1))
>                       return 0;
>

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_mailman_listinfo_linux-2Dsnps-2Darc&d=DwIGaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=ZlJN1MriPUTkBKCrPSx67GmaplEUGcAEk9yPtCLdUXI&m=GJ6OJTL5qRgb-RdlLBhiFzZH5ZmLXf2lxjuQgwbw7n8&s=1TapZixYsKQRFCCPkofjhki-eZ34KmyqojUdAxceNNA&e=

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

* Re: [PATCH] ARC: unwind: Mark expected switch fall-through
  2019-08-29 11:25   ` Eugeniy Paltsev
@ 2019-08-29 15:05     ` Gustavo A. R. Silva
  2019-08-29 20:00       ` Vineet Gupta
  0 siblings, 1 reply; 5+ messages in thread
From: Gustavo A. R. Silva @ 2019-08-29 15:05 UTC (permalink / raw)
  To: Eugeniy Paltsev
  Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
	Vineet Gupta

Hi Eugeniy,


On 8/29/19 6:25 AM, Eugeniy Paltsev wrote:
> Hi Gustavo,
> 
> I guess this patch is already sent as a pull request to 'v5.3-rc7' by Vineet:
> https://www.mail-archive.com/linux-snps-arc@lists.infradead.org/msg05854.html
> 

No. This is a different one. Notice that the subject lines differ by one
letter.

Thanks
--
Gustavo


> ---
>  Eugeniy Paltsev
> 
> 
> ________________________________________
> From: linux-snps-arc <linux-snps-arc-bounces@lists.infradead.org> on behalf of Gustavo A. R. Silva <gustavo@embeddedor.com>
> Sent: Thursday, August 29, 2019 04:47
> To: Vineet Gupta
> Cc: linux-snps-arc@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] ARC: unwind: Mark expected switch fall-through
> 
> Hi,
> 
> Friendly ping:
> 
> Who can take this, please?
> 
> Thanks
> --
> Gustavo
> 
> On 8/20/19 8:29 PM, Gustavo A. R. Silva wrote:
>> Mark switch cases where we are expecting to fall through.
>>
>> This patch fixes the following warnings (Building: haps_hs_defconfig arc):
>>
>> arch/arc/kernel/unwind.c: In function ‘read_pointer’:
>> ./include/linux/compiler.h:328:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>   do {        \
>>      ^
>> ./include/linux/compiler.h:338:2: note: in expansion of macro ‘__compiletime_assert’
>>   __compiletime_assert(condition, msg, prefix, suffix)
>>   ^~~~~~~~~~~~~~~~~~~~
>> ./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’
>>   _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>>   ^~~~~~~~~~~~~~~~~~~
>> ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
>>  #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>>                                      ^~~~~~~~~~~~~~~~~~
>> ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
>>   BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>>   ^~~~~~~~~~~~~~~~
>> arch/arc/kernel/unwind.c:573:3: note: in expansion of macro ‘BUILD_BUG_ON’
>>    BUILD_BUG_ON(sizeof(u32) != sizeof(value));
>>    ^~~~~~~~~~~~
>> arch/arc/kernel/unwind.c:575:2: note: here
>>   case DW_EH_PE_native:
>>   ^~~~
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>>  arch/arc/kernel/unwind.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
>> index 445e4d702f43..dc05a63516f5 100644
>> --- a/arch/arc/kernel/unwind.c
>> +++ b/arch/arc/kernel/unwind.c
>> @@ -572,6 +572,7 @@ static unsigned long read_pointer(const u8 **pLoc, const void *end,
>>  #else
>>               BUILD_BUG_ON(sizeof(u32) != sizeof(value));
>>  #endif
>> +             /* Fall through */
>>       case DW_EH_PE_native:
>>               if (end < (const void *)(ptr.pul + 1))
>>                       return 0;
>>
> 
> _______________________________________________
> linux-snps-arc mailing list
> linux-snps-arc@lists.infradead.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_mailman_listinfo_linux-2Dsnps-2Darc&d=DwIGaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=ZlJN1MriPUTkBKCrPSx67GmaplEUGcAEk9yPtCLdUXI&m=GJ6OJTL5qRgb-RdlLBhiFzZH5ZmLXf2lxjuQgwbw7n8&s=1TapZixYsKQRFCCPkofjhki-eZ34KmyqojUdAxceNNA&e=
> 

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

* Re: [PATCH] ARC: unwind: Mark expected switch fall-through
  2019-08-29 15:05     ` Gustavo A. R. Silva
@ 2019-08-29 20:00       ` Vineet Gupta
  0 siblings, 0 replies; 5+ messages in thread
From: Vineet Gupta @ 2019-08-29 20:00 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Eugeniy Paltsev
  Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
	Vineet Gupta

On 8/29/19 8:05 AM, Gustavo A. R. Silva wrote:
> No. This is a different one. Notice that the subject lines differ by one
> letter.

Umm, indeed I thought I'd already merged it.
Now added, will show up in linux-next after rc7

-Vineet

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

end of thread, other threads:[~2019-08-29 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-21  1:29 [PATCH] ARC: unwind: Mark expected switch fall-through Gustavo A. R. Silva
2019-08-29  1:47 ` Gustavo A. R. Silva
2019-08-29 11:25   ` Eugeniy Paltsev
2019-08-29 15:05     ` Gustavo A. R. Silva
2019-08-29 20:00       ` Vineet Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox