Re: [PATCH v2 1/4] panic: Add panic_in_progress helper

From: Petr Mladek
Date: Fri Jan 28 2022 - 03:24:36 EST


On Thu 2022-01-27 08:02:19, Stephen Brennan wrote:
> On 1/27/22 06:34, Petr Mladek wrote:
> > On Wed 2022-01-26 15:02:33, Stephen Brennan wrote:
> > > This helper will be used in printk code to avoid deadlocks during
> > > panic().
> > >
> > > Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> > > Signed-off-by: Stephen Brennan <stephen.s.brennan@xxxxxxxxxx>
> >
> > Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>
> >
> > Best Regards,
> > Petr
>
> Hi Petr,
>
> Thanks for the review, however over the night I received two kernel test
> robot emails. One indicating a new build error caused by this change on m68k
> arch, and the other adding a new warning on riscv. From what I can tell, the
> issues are circular dependencies in #includes. So it may be better to either
> return to the macro, or move this static inline down to
> kernel/printk/printk.c. I think moving it into kernel/printk/printk.c makes
> most sense given that the macro requires the correct #includes anyway.

Yes, I prefer moving the inline down to printk.c. It looks a bit
cleaner than the macro that would not work without another include.

Please, explain this in the commit message.

Best Regards,
Petr