From: Viresh Kumar <viresh.kumar@linaro.org>
To: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH V4] thermal: Add cooling device's statistics in sysfs
Date: Wed, 14 Mar 2018 13:44:26 +0530 [thread overview]
Message-ID: <20180314081426.GG15832@vireshk-i7> (raw)
In-Reply-To: <1521014472.2087.32.camel@intel.com>
On 14-03-18, 16:01, Zhang Rui wrote:
> WARNING: please write a paragraph that describes the config symbol
> fully
> #147: FILE: drivers/thermal/Kconfig:18:
> +config THERMAL_STATISTICS
>
> WARNING: Consider renaming function(s)
> 'thermal_cooling_device_total_trans_show' to 'total_trans_show'
> #391: FILE: drivers/thermal/thermal_sysfs.c:901:
> +}
>
> WARNING: Consider renaming function(s)
> 'thermal_cooling_device_time_in_state_show' to 'time_in_state_show'
> #395: FILE: drivers/thermal/thermal_sysfs.c:905:
> +static DEVICE_ATTR(time_in_state, 0444,
>
> WARNING: Consider renaming function(s)
> 'thermal_cooling_device_reset_store' to 'reset_store'
> #397: FILE: drivers/thermal/thermal_sysfs.c:907:
> +static DEVICE_ATTR(reset, 0200, NULL,
> thermal_cooling_device_reset_store);
>
> WARNING: Consider renaming function(s)
> 'thermal_cooling_device_trans_table_show' to 'trans_table_show'
> #398: FILE: drivers/thermal/thermal_sysfs.c:908:
> +static DEVICE_ATTR(trans_table, 0444,
>
> total: 0 errors, 5 warnings, 366 lines checked
>
>
> I'm okay with the first one because the description does not have to be
> larger than 3 lines.
Right.
> the last 4 warnings makes sense to me. I think we should rename the
> function and use DEVICE_ATTR_RO() and DEVICE_ATTR_WO() instead.
>
> what do you think?
I got those warnings as well, and I quietly ignored them :)
I ignored the renaming part for the sake of consistency. The other existing
routines for similar purpose are named as:
thermal_cooling_device_type_show
thermal_cooling_device_max_state_show
thermal_cooling_device_cur_state_show
thermal_cooling_device_cur_state_store
for me it made more sense to follow that naming convention. And I didn't use the
_RO and _WO variants for the same reason.
Now here is what I propose now:
- You apply this patch as-is and ignore the warning.
- I will send few patches on top of that to do:
- renaming of all such routines to shorter versions.
- Use the _RO or _WO variants of the macro everywhere.
What do you say ?
--
viresh
next prev parent reply other threads:[~2018-03-14 8:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 9:52 [PATCH V4] thermal: Add cooling device's statistics in sysfs Viresh Kumar
2018-03-12 4:32 ` Viresh Kumar
2018-03-13 7:02 ` Zhang Rui
2018-03-13 8:36 ` Viresh Kumar
2018-03-14 8:01 ` Zhang Rui
2018-03-14 8:14 ` Viresh Kumar [this message]
2018-03-20 1:38 ` Viresh Kumar
2018-03-20 3:19 ` Zhang Rui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180314081426.GG15832@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=edubezval@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox