To explain this feature, let's take an example from the (5.4.0) kernel source tree: the direct mapping buffered I/O library driver, drivers/md/dm-bufio.c, has a need to use the dm_bufio_current_allocated variable as a module parameter. However, this name is really that of an internal variable and is not highly intuitive to a user of this driver. The authors of this driver would much prefer to use another name – current_allocated_bytes – as an alias or name override. Precisely this can be achieved via the module_param_named() macro, overriding and completely equivalent to the internal variable name, as follows:
// drivers/md/dm-bufio.c
[...]
module_param_named(current_allocated_bytes, dm_bufio_current_allocated, ulong, S_IRUGO);
MODULE_PARM_DESC(current_allocated_bytes, "Memory currently used by the cache");
So, when the user performs insmod on this driver,...