Re: [PATCH v3 1/3] PM: core: Rename module parameters prefix to "power"
From: Tomasz Figa
Date: Tue Jun 09 2026 - 07:20:08 EST
On Tue, Jun 9, 2026 at 8:10 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
>
> On Tue, Jun 9, 2026 at 11:03 AM Tzung-Bi Shih <tzungbi@xxxxxxxxxx> wrote:
> >
> > On Mon, Jun 08, 2026 at 04:11:30PM +0200, Rafael J. Wysocki wrote:
> > > On Mon, Jun 8, 2026 at 4:16 AM Tzung-Bi Shih <tzungbi@xxxxxxxxxx> wrote:
> > > >
> > > > Currently, the module parameters defined in drivers/base/power/main.c
> > > > use the default prefix "main" (derived from the filename). The prefix
> > > > "main" is too generic and non-descriptive for power management
> > > > parameters.
> > > >
> > > > Redefine MODULE_PARAM_PREFIX to "power." at the beginning of the file
> > > > to group the module parameters under the "power" namespace instead.
> > > > This makes the parameters more descriptive.
> > > >
> > > > Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
> > > > ---
> > > > v3:
> > > > - No changes.
> > > >
> > > > v2: https://lore.kernel.org/all/20260604090756.2884671-2-tzungbi@xxxxxxxxxx
> > > > - New to the series.
> > > >
> > > > v1: Doesn't exist.
> > > >
> > > > drivers/base/power/main.c | 3 +++
> > > > 1 file changed, 3 insertions(+)
> > > >
> > > > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> > > > index ed48c292f575..cd864f3a2799 100644
> > > > --- a/drivers/base/power/main.c
> > > > +++ b/drivers/base/power/main.c
> > > > @@ -40,6 +40,9 @@
> > > > #include "../base.h"
> > > > #include "power.h"
> > > >
> > > > +#undef MODULE_PARAM_PREFIX
> > > > +#define MODULE_PARAM_PREFIX "power."
> > >
> > > "power" may be confused with the power supply support, so I'd rather
> > > use "pm" or even "pm_sleep" (in which case the "dpm_" prefix could be
> > > dropped from the new module param name in the next patch).
> >
> > Ack, will use "pm_sleep" in the next version.
> >
> > Regarding dropping the "dpm_" prefix, should this also apply to the existing
> > dpm_watchdog_all_cpu_backtrace parameter? Or should we leave it as-is to
> > avoid breaking existing configurations?
>
> Breaking things for someone would be unfortunate.
>
> For consistency, let's retain the "dpm_watchdog" part in this name and
> use it in the new one.
Hmm, doesn't the prefix change already break things?
Best,
Tomasz