Message ID | 20200513101751.111907-1-pterjan@google.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | cpuidle: Delete unused define_one_ro/rw macros | expand |
On Wed, May 13, 2020 at 12:18 PM Pascal Terjan <pterjan@google.com> wrote: > > They were already unused when cpuidle was introduced. > > Signed-off-by: Pascal Terjan <pterjan@google.com> > --- > drivers/cpuidle/sysfs.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c > index cdeedbf02646..7729cf622d1e 100644 > --- a/drivers/cpuidle/sysfs.c > +++ b/drivers/cpuidle/sysfs.c > @@ -167,11 +167,6 @@ struct cpuidle_attr { > ssize_t (*store)(struct cpuidle_device *, const char *, size_t count); > }; > > -#define define_one_ro(_name, show) \ > - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0444, show, NULL) > -#define define_one_rw(_name, show, store) \ > - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0644, show, store) > - > #define attr_to_cpuidleattr(a) container_of(a, struct cpuidle_attr, attr) > > struct cpuidle_device_kobj { > -- This patch doesn't apply on top of the cpuidle material for 5.8 present in linux-next, thanks!
On Thu, 14 May 2020 at 12:47, Rafael J. Wysocki <rafael@kernel.org> wrote: > > On Wed, May 13, 2020 at 12:18 PM Pascal Terjan <pterjan@google.com> wrote: > > > > They were already unused when cpuidle was introduced. > > > > Signed-off-by: Pascal Terjan <pterjan@google.com> > > --- > > drivers/cpuidle/sysfs.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c > > index cdeedbf02646..7729cf622d1e 100644 > > --- a/drivers/cpuidle/sysfs.c > > +++ b/drivers/cpuidle/sysfs.c > > @@ -167,11 +167,6 @@ struct cpuidle_attr { > > ssize_t (*store)(struct cpuidle_device *, const char *, size_t count); > > }; > > > > -#define define_one_ro(_name, show) \ > > - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0444, show, NULL) > > -#define define_one_rw(_name, show, store) \ > > - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0644, show, store) > > - > > #define attr_to_cpuidleattr(a) container_of(a, struct cpuidle_attr, attr) > > > > struct cpuidle_device_kobj { > > -- > > This patch doesn't apply on top of the cpuidle material for 5.8 > present in linux-next, thanks! Funny timing, it was actually already done a few weeks ago after all those years :) https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=2f516e7cbe88f05023b6cc458d3a22b7dc56af99
On 2020/5/15 2:07, Pascal Terjan wrote: > On Thu, 14 May 2020 at 12:47, Rafael J. Wysocki <rafael@kernel.org> wrote: >> >> On Wed, May 13, 2020 at 12:18 PM Pascal Terjan <pterjan@google.com> wrote: >>> >>> They were already unused when cpuidle was introduced. >>> >>> Signed-off-by: Pascal Terjan <pterjan@google.com> >>> --- >>> drivers/cpuidle/sysfs.c | 5 ----- >>> 1 file changed, 5 deletions(-) >>> >>> diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c >>> index cdeedbf02646..7729cf622d1e 100644 >>> --- a/drivers/cpuidle/sysfs.c >>> +++ b/drivers/cpuidle/sysfs.c >>> @@ -167,11 +167,6 @@ struct cpuidle_attr { >>> ssize_t (*store)(struct cpuidle_device *, const char *, size_t count); >>> }; >>> >>> -#define define_one_ro(_name, show) \ >>> - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0444, show, NULL) >>> -#define define_one_rw(_name, show, store) \ >>> - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0644, show, store) >>> - >>> #define attr_to_cpuidleattr(a) container_of(a, struct cpuidle_attr, attr) >>> >>> struct cpuidle_device_kobj { >>> -- >> >> This patch doesn't apply on top of the cpuidle material for 5.8 >> present in linux-next, thanks! > > Funny timing, it was actually already done a few weeks ago after all > those years :) > https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=bleeding-edge&id=2f516e7cbe88f05023b6cc458d3a22b7dc56af99 It is :) I spotted it when trying to make cpudile governor switchable to be the default behaviour [0]. [0]: https://patchwork.kernel.org/cover/11519511/ Thanks Hanjun
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index cdeedbf02646..7729cf622d1e 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c @@ -167,11 +167,6 @@ struct cpuidle_attr { ssize_t (*store)(struct cpuidle_device *, const char *, size_t count); }; -#define define_one_ro(_name, show) \ - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0444, show, NULL) -#define define_one_rw(_name, show, store) \ - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0644, show, store) - #define attr_to_cpuidleattr(a) container_of(a, struct cpuidle_attr, attr) struct cpuidle_device_kobj {
They were already unused when cpuidle was introduced. Signed-off-by: Pascal Terjan <pterjan@google.com> --- drivers/cpuidle/sysfs.c | 5 ----- 1 file changed, 5 deletions(-)