From: Chanwoo Choi <cw00.choi@samsung.com>
To: myungjoo.ham@samsung.com,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/4] PM / devfreq: Modify the device name as devfreq[X] for sysfs
Date: Mon, 23 Jan 2017 12:25:03 +0900 [thread overview]
Message-ID: <5885778F.7010004@samsung.com> (raw)
In-Reply-To: <20170123021924epcms1p86578a78189221928e48ede3e26ecce38@epcms1p8>
On 2017년 01월 23일 11:19, MyungJoo Ham wrote:
>> if (!dev || !profile || !governor_name) {
>> @@ -568,7 +569,8 @@ struct devfreq *devfreq_add_device(struct device *dev,
>> mutex_lock(&devfreq->lock);
>> }
>>
>> - dev_set_name(&devfreq->dev, "%s", dev_name(dev));
>> + dev_set_name(&devfreq->dev, "devfreq%lu",
>> + (unsigned long)atomic_inc_return(&devfreq_no));
>
> Do you have any specific reason to use "unsigned long" here?
> (atomic_t has 32bit int).
There is no any reason. I'll change to use the integer value as following:
dev_set_name(&devfreq->dev, "devfreq%d", atomic_inc_return(&devfreq_no));
>
>> err = device_register(&devfreq->dev);
>> if (err) {
>> mutex_unlock(&devfreq->lock);
>> --
>> 1.9.1
--
Best Regards,
Chanwoo Choi
S/W R&D Center
Samsung Electronics
prev parent reply other threads:[~2017-01-23 3:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170116122609epcas5p34b6109202b5bc05f13325318d0f2dbe3@epcas5p3.samsung.com>
2017-01-16 12:26 ` [PATCH v3 0/4] PM / devfreq: Update the devfreq and devfreq-event device Chanwoo Choi
2017-01-16 12:26 ` [PATCH v3 1/4] PM / devfreq: Fix the wrong description for userspace governor Chanwoo Choi
2017-01-16 12:26 ` [PATCH v3 2/4] PM / devfreq: exynos-ppmu: Show the registred device for ppmu device Chanwoo Choi
2017-01-16 12:26 ` Chanwoo Choi
2017-01-16 12:26 ` [PATCH v3 3/4] PM / devfreq: Simplify the sysfs name of devfreq-event device Chanwoo Choi
2017-01-16 12:26 ` [PATCH v3 4/4] PM / devfreq: Modify the device name as devfreq[X] for sysfs Chanwoo Choi
2017-01-23 0:29 ` [PATCH v3 0/4] PM / devfreq: Update the devfreq and devfreq-event device Chanwoo Choi
[not found] ` <CGME20170116122609epcas5p3e9f106e6d097613cd866107bc0e065c7@epcas5p3.samsung.com>
2017-01-23 2:19 ` [PATCH v3 4/4] PM / devfreq: Modify the device name as devfreq[X] for sysfs MyungJoo Ham
2017-01-23 3:25 ` Chanwoo Choi [this message]
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=5885778F.7010004@samsung.com \
--to=cw00.choi@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=rjw@rjwysocki.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.