[PATCH v2 0/3] module: Fix freeing of charp module parameters when CONFIG_SYSFS=n

From: Petr Pavlu

Date: Fri Mar 13 2026 - 10:20:18 EST


Fix freeing of charp module parameters when CONFIG_SYSFS=n and, related to
this, update moduleparam.h to keep its coding style consistent.

Changes since v1 [1]:
* Remove the extern keyword from the declaration of module_destroy_params()
and update the type of its num parameter from `unsigned` to
`unsigned int`.
* Add a cleanup patch for parse_args() to similarly update its num
parameter to `unsigned int` and to synchronize the parameter names
between its prototype and definition.
* Add a cleanup patch to drop the unnecessary extern keyword for all
function declarations in moduleparam.h.

[1] https://lore.kernel.org/linux-modules/20260306125457.1377402-1-petr.pavlu@xxxxxxxx/

Petr Pavlu (3):
module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
module: Clean up parse_args() arguments
module: Remove extern keyword from param prototypes

include/linux/moduleparam.h | 100 +++++++++++++++++-------------------
kernel/module/main.c | 4 +-
kernel/params.c | 29 +++++++----
3 files changed, 68 insertions(+), 65 deletions(-)


base-commit: 0257f64bdac7fdca30fa3cae0df8b9ecbec7733a
--
2.53.0