lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] cpufreq: use helper macro __ATTR_XX
On 06-03-22, 10:12, zhanglianjie wrote:
> Use helper macro __ATTR_XX to make code more clear.
> Minor readability improvement.
>
> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
>
> diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h
> index 65ecf32ba4f8..a5a0bc3cc23e 100644
> --- a/drivers/cpufreq/cpufreq_governor.h
> +++ b/drivers/cpufreq/cpufreq_governor.h
> @@ -68,12 +68,10 @@ static ssize_t file_name##_show \
> }
>
> #define gov_attr_ro(_name) \
> -static struct governor_attr _name = \
> -__ATTR(_name, 0444, _name##_show, NULL)
> +static struct governor_attr _name = __ATTR_RO(_name)
>
> #define gov_attr_rw(_name) \
> -static struct governor_attr _name = \
> -__ATTR(_name, 0644, _name##_show, _name##_store)
> +static struct governor_attr _name = __ATTR_RW(_name)
>
> /* Common to all CPUs of a policy */
> struct policy_dbs_info {

This change looks fine though.

--
viresh

\
 
 \ /
  Last update: 2022-03-07 06:45    [W:0.096 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site