[LTP] [PATCH v4] device-drivers/cpufreq_boost: Don't hardcode to CPU0
Mike Tipton
mike.tipton@oss.qualcomm.com
Fri Jul 25 16:12:59 CEST 2025
On Fri, Jul 25, 2025 at 02:31:02PM +0200, Cyril Hrubis wrote:
> Hi!
> > -const char governor[] = SYSFS_CPU_DIR "cpu0/cpufreq/scaling_governor";
> > +static int cpu;
> > +
> > +static const char _governor[] = SYSFS_CPU_DIR "cpu%d/cpufreq/scaling_governor";
>
> Identifiers starting with underscore are reserved for kernel/libc
> implementation we shouldn't use them here. I guess that this would be
> better as governor_fmt.
>
> > +static char governor[64];
> > static char governor_name[16];
> >
> > -const char maxspeed[] = SYSFS_CPU_DIR "cpu0/cpufreq/scaling_max_freq";
> > +static const char _maxspeed[] = SYSFS_CPU_DIR "cpu%d/cpufreq/scaling_max_freq";
>
> Here as well.
>
>
> Other than that it looks fine. I can push the patch with the change from
> _governor to governor_fmt and _maxspeed to maxspeed_fmt if you agree.
Sure, sounds good to me.
Thanks!
Mike
More information about the ltp
mailing list