mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* On the definition of the module_param_string macro
@ 2006-08-20 16:05 Julio Auto
  0 siblings, 0 replies; only message in thread
From: Julio Auto @ 2006-08-20 16:05 UTC (permalink / raw)
  To: linux-kernel

In kernel 2.6.17.9, the definition of the module_param_string macro
receives 4 parameters (see linux/include/linux/moduleparam.h:87):

#define module_param_string(name, string, len, perm) ...

allowing the name of the parameter (fed to the macro as 'name'), as it
will be in the .modinfo section, to be different from the actual name
of the variable (fed to the macro as 'string').
To me, it looks inconsistent. If, on the other hand, it was supposed
to be a 'feature', the it looks plain useless (otherwise, the same
rule should apply to other module_param* macros).
So, I would suggest that the definition changes to:

#define module_param_string(name, len, perm) ...

where it would behave like a current use of 'module_param_string(name,
name, len, perm);'

I understand that such changes in the API of modules may cause some
trouble, but it doesn't cost a thing to look at this one as a possible
improvement for the future.

Cheers,

    Julio Auto

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-20 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-20 16:05 On the definition of the module_param_string macro Julio Auto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®