[PATCH v3 0/6] panic: sys_info: Refactor and fix a potential issue

Andy Shevchenko posted 6 patches 3 months, 1 week ago
include/linux/sys_info.h |   2 +-
kernel/panic.c           |   2 +-
lib/sys_info.c           | 138 +++++++++++++++++++++------------------
3 files changed, 78 insertions(+), 64 deletions(-)
[PATCH v3 0/6] panic: sys_info: Refactor and fix a potential issue
Posted by Andy Shevchenko 3 months, 1 week ago
While targeting the compilation issue due to dangling variable,
I have noticed more opportunities for refactoring that helps to
avoid above mentioned compilation issue in a cleaner way and
also fixes a potential problem with global variable access.
Please, give it a try.

Changelog v3:
- addressed an issue with empty parameter returned (Feng)
- gathered tags (Feng)

Changelog v2:
v2: https://lore.kernel.org/r/20251029111202.3217870-2-andriy.shevchenko@linux.intel.com
- rebased on top of the current codebase
- addressed an issue when converting to match_string() (Feng)
- Cc'ed to Petr (requested by Feng)

v1: https://lore.kernel.org/r/20250711095413.1472448-1-andriy.shevchenko@linux.intel.com

Andy Shevchenko (6):
  panic: sys_info: Capture si_bits_global before iterating over it
  panic: sys_info: Align constant definition names with parameters
  panic: sys_info: Replace struct sys_info_name with plain array of
    strings
  panic: sys_info: Rewrite a fix for a compilation error (`make W=1`)
  panic: sys_info: Deduplicate local variable 'table; assignments
  panic: sys_info: Factor out read and write handlers

 include/linux/sys_info.h |   2 +-
 kernel/panic.c           |   2 +-
 lib/sys_info.c           | 138 +++++++++++++++++++++------------------
 3 files changed, 78 insertions(+), 64 deletions(-)

-- 
2.50.1
Re: [PATCH v3 0/6] panic: sys_info: Refactor and fix a potential issue
Posted by Andy Shevchenko 3 months, 1 week ago
On Thu, Oct 30, 2025 at 12:44:16PM +0100, Andy Shevchenko wrote:

+Cc: Petr, sorry, forgot to add you to the Cc list.

> While targeting the compilation issue due to dangling variable,
> I have noticed more opportunities for refactoring that helps to
> avoid above mentioned compilation issue in a cleaner way and
> also fixes a potential problem with global variable access.
> Please, give it a try.
> 
> Changelog v3:
> - addressed an issue with empty parameter returned (Feng)
> - gathered tags (Feng)
> 
> Changelog v2:
> v2: https://lore.kernel.org/r/20251029111202.3217870-2-andriy.shevchenko@linux.intel.com
> - rebased on top of the current codebase
> - addressed an issue when converting to match_string() (Feng)
> - Cc'ed to Petr (requested by Feng)
> 
> v1: https://lore.kernel.org/r/20250711095413.1472448-1-andriy.shevchenko@linux.intel.com

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v3 0/6] panic: sys_info: Refactor and fix a potential issue
Posted by Petr Mladek 3 months, 1 week ago
On Thu 2025-10-30 16:07:47, Andy Shevchenko wrote:
> On Thu, Oct 30, 2025 at 12:44:16PM +0100, Andy Shevchenko wrote:
> 
> +Cc: Petr, sorry, forgot to add you to the Cc list.

Thank you for Cc-ing me.

> > While targeting the compilation issue due to dangling variable,
> > I have noticed more opportunities for refactoring that helps to
> > avoid above mentioned compilation issue in a cleaner way and
> > also fixes a potential problem with global variable access.
> > Please, give it a try.
> > 
> > Changelog v3:
> > - addressed an issue with empty parameter returned (Feng)
> > - gathered tags (Feng)

I like all the changes and do not see any problem there.
For the entire patchset, feel free to use:

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr
Re: [PATCH v3 0/6] panic: sys_info: Refactor and fix a potential issue
Posted by Andy Shevchenko 3 months, 1 week ago
On Thu, Oct 30, 2025 at 04:48:03PM +0100, Petr Mladek wrote:
> On Thu 2025-10-30 16:07:47, Andy Shevchenko wrote:
> > On Thu, Oct 30, 2025 at 12:44:16PM +0100, Andy Shevchenko wrote:
> > 
> > +Cc: Petr, sorry, forgot to add you to the Cc list.
> 
> Thank you for Cc-ing me.
> 
> > > While targeting the compilation issue due to dangling variable,
> > > I have noticed more opportunities for refactoring that helps to
> > > avoid above mentioned compilation issue in a cleaner way and
> > > also fixes a potential problem with global variable access.
> > > Please, give it a try.
> > > 
> > > Changelog v3:
> > > - addressed an issue with empty parameter returned (Feng)
> > > - gathered tags (Feng)
> 
> I like all the changes and do not see any problem there.
> For the entire patchset, feel free to use:
> 
> Reviewed-by: Petr Mladek <pmladek@suse.com>

Thank you!

-- 
With Best Regards,
Andy Shevchenko