linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 14/15] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
       [not found] <20250515124644.2958810-1-mingo@kernel.org>
@ 2025-05-15 12:46 ` Ingo Molnar
  2025-05-15 12:56   ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2025-05-15 12:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Linus Torvalds, Peter Zijlstra, linux-arch,
	Yoshinori Sato, Rich Felker, John Paul Adrian Glaubitz, linux-sh

Extend WARN_ON and BUG_ON style output from:

  WARNING: CPU: 0 PID: 0 at kernel/sched/core.c:8511 sched_init+0x20/0x410

to:

  WARNING: CPU: 0 PID: 0 at [idx < 0 && ptr] kernel/sched/core.c:8511 sched_init+0x20/0x410

Note that the output will be further reorganized later in this series.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-sh@vger.kernel.org
Cc: <linux-arch@vger.kernel.org>
---
 arch/sh/include/asm/bug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h
index 834c621ab249..891276687355 100644
--- a/arch/sh/include/asm/bug.h
+++ b/arch/sh/include/asm/bug.h
@@ -59,7 +59,7 @@ do {							\
 		 _EMIT_BUG_ENTRY			\
 		 :					\
 		 : "n" (TRAPA_BUG_OPCODE),		\
-		   "i" (__FILE__),			\
+		   "i" (WARN_CONDITION_STR(cond_str) __FILE__),	\
 		   "i" (__LINE__),			\
 		   "i" (BUGFLAG_WARNING|(flags)),	\
 		   "i" (sizeof(struct bug_entry)));	\
-- 
2.45.2


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

* Re: [PATCH 14/15] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
  2025-05-15 12:46 ` [PATCH 14/15] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output Ingo Molnar
@ 2025-05-15 12:56   ` John Paul Adrian Glaubitz
  2025-05-15 13:33     ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2025-05-15 12:56 UTC (permalink / raw)
  To: Ingo Molnar, linux-kernel
  Cc: Linus Torvalds, Peter Zijlstra, linux-arch, Yoshinori Sato,
	Rich Felker, linux-sh

Hi Ingo,

On Thu, 2025-05-15 at 14:46 +0200, Ingo Molnar wrote:
> Extend WARN_ON and BUG_ON style output from:
> 
>   WARNING: CPU: 0 PID: 0 at kernel/sched/core.c:8511 sched_init+0x20/0x410
> 
> to:
> 
>   WARNING: CPU: 0 PID: 0 at [idx < 0 && ptr] kernel/sched/core.c:8511 sched_init+0x20/0x410
> 
> Note that the output will be further reorganized later in this series.
> 
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Cc: linux-sh@vger.kernel.org
> Cc: <linux-arch@vger.kernel.org>
> ---
>  arch/sh/include/asm/bug.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h
> index 834c621ab249..891276687355 100644
> --- a/arch/sh/include/asm/bug.h
> +++ b/arch/sh/include/asm/bug.h
> @@ -59,7 +59,7 @@ do {							\
>  		 _EMIT_BUG_ENTRY			\
>  		 :					\
>  		 : "n" (TRAPA_BUG_OPCODE),		\
> -		   "i" (__FILE__),			\
> +		   "i" (WARN_CONDITION_STR(cond_str) __FILE__),	\
>  		   "i" (__LINE__),			\
>  		   "i" (BUGFLAG_WARNING|(flags)),	\
>  		   "i" (sizeof(struct bug_entry)));	\

Looks good to me, however I'm not happy with the summary line.

It's too long and the prefix "bugs/sh:" is very confusing. I usually just
use "sh:" to mark anything that affects arch/sh.

Can I pick this patch for my sh-linux tree?

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH 14/15] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
  2025-05-15 12:56   ` John Paul Adrian Glaubitz
@ 2025-05-15 13:33     ` Ingo Molnar
  2025-05-15 13:35       ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2025-05-15 13:33 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: linux-kernel, Linus Torvalds, Peter Zijlstra, linux-arch,
	Yoshinori Sato, Rich Felker, linux-sh


* John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:

> Hi Ingo,
> 
> On Thu, 2025-05-15 at 14:46 +0200, Ingo Molnar wrote:
> > Extend WARN_ON and BUG_ON style output from:
> > 
> >   WARNING: CPU: 0 PID: 0 at kernel/sched/core.c:8511 sched_init+0x20/0x410
> > 
> > to:
> > 
> >   WARNING: CPU: 0 PID: 0 at [idx < 0 && ptr] kernel/sched/core.c:8511 sched_init+0x20/0x410
> > 
> > Note that the output will be further reorganized later in this series.
> > 
> > Signed-off-by: Ingo Molnar <mingo@kernel.org>
> > Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> > Cc: Rich Felker <dalias@libc.org>
> > Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> > Cc: linux-sh@vger.kernel.org
> > Cc: <linux-arch@vger.kernel.org>
> > ---
> >  arch/sh/include/asm/bug.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h
> > index 834c621ab249..891276687355 100644
> > --- a/arch/sh/include/asm/bug.h
> > +++ b/arch/sh/include/asm/bug.h
> > @@ -59,7 +59,7 @@ do {							\
> >  		 _EMIT_BUG_ENTRY			\
> >  		 :					\
> >  		 : "n" (TRAPA_BUG_OPCODE),		\
> > -		   "i" (__FILE__),			\
> > +		   "i" (WARN_CONDITION_STR(cond_str) __FILE__),	\
> >  		   "i" (__LINE__),			\
> >  		   "i" (BUGFLAG_WARNING|(flags)),	\
> >  		   "i" (sizeof(struct bug_entry)));	\
> 
> Looks good to me, however I'm not happy with the summary line.
> 
> It's too long and the prefix "bugs/sh:" is very confusing. I usually just
> use "sh:" to mark anything that affects arch/sh.

Fair enough, I've changed the title to and pushed out the new tree:

  sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output

> Can I pick this patch for my sh-linux tree?

So since it depends on the previous patches, in isolation this would 
break the build.

Can I add your Reviewed-by or Acked-by?

Thanks,

	Ingo

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

* Re: [PATCH 14/15] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
  2025-05-15 13:33     ` Ingo Molnar
@ 2025-05-15 13:35       ` John Paul Adrian Glaubitz
  2025-05-15 13:43         ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2025-05-15 13:35 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Linus Torvalds, Peter Zijlstra, linux-arch,
	Yoshinori Sato, Rich Felker, linux-sh

On Thu, 2025-05-15 at 15:33 +0200, Ingo Molnar wrote:
> > It's too long and the prefix "bugs/sh:" is very confusing. I usually just
> > use "sh:" to mark anything that affects arch/sh.
> 
> Fair enough, I've changed the title to and pushed out the new tree:
> 
>   sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output

Thanks! Minor nitpick: I think that comma is wrong and should be removed
(I'm not a native speaker though ;-)).

> > Can I pick this patch for my sh-linux tree?
> 
> So since it depends on the previous patches, in isolation this would 
> break the build.
> 
> Can I add your Reviewed-by or Acked-by?

Yes, sure.

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH 14/15] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
  2025-05-15 13:35       ` John Paul Adrian Glaubitz
@ 2025-05-15 13:43         ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2025-05-15 13:43 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: linux-kernel, Linus Torvalds, Peter Zijlstra, linux-arch,
	Yoshinori Sato, Rich Felker, linux-sh


* John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:

> On Thu, 2025-05-15 at 15:33 +0200, Ingo Molnar wrote:
> > > It's too long and the prefix "bugs/sh:" is very confusing. I usually just
> > > use "sh:" to mark anything that affects arch/sh.
> > 
> > Fair enough, I've changed the title to and pushed out the new tree:
> > 
> >   sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
> 
> Thanks! Minor nitpick: I think that comma is wrong and should be removed
> (I'm not a native speaker though ;-)).

Yeah, so both with and without a comma this sentence is proper English 
grammar, but a comma before the 'to' adverb slightly emphasizes the 
second part of the sentence, which was my intent with this phrasing.

> > > Can I pick this patch for my sh-linux tree?
> > 
> > So since it depends on the previous patches, in isolation this would 
> > break the build.
> > 
> > Can I add your Reviewed-by or Acked-by?
> 
> Yes, sure.
> 
> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Thanks!

	Ingo

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

end of thread, other threads:[~2025-05-15 13:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250515124644.2958810-1-mingo@kernel.org>
2025-05-15 12:46 ` [PATCH 14/15] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output Ingo Molnar
2025-05-15 12:56   ` John Paul Adrian Glaubitz
2025-05-15 13:33     ` Ingo Molnar
2025-05-15 13:35       ` John Paul Adrian Glaubitz
2025-05-15 13:43         ` Ingo Molnar

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).