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

Andy Shevchenko posted 6 patches 5 months, 1 week ago
There is a newer version of this series
include/linux/sys_info.h |   2 +-
kernel/panic.c           |   2 +-
lib/sys_info.c           | 133 ++++++++++++++++++++++-----------------
3 files changed, 76 insertions(+), 61 deletions(-)
[PATCH v2 0/6] panic: sys_info: Refactor and fix a potential issue
Posted by Andy Shevchenko 5 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 v2:
- 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           | 133 ++++++++++++++++++++++-----------------
 3 files changed, 76 insertions(+), 61 deletions(-)

-- 
2.50.1