From: Minho Ban <mhban@samsung.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Rob Landley <rob@landley.net>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH] PM / Hibernate : Use get_gendisk to verify partition if resume_file is integer format
Date: Mon, 14 May 2012 09:53:04 +0900 [thread overview]
Message-ID: <4FB05770.3050809@samsung.com> (raw)
In-Reply-To: <201205122339.01696.rjw@sisk.pl>
On 05/13/2012 06:39 AM, Rafael J. Wysocki wrote:
> On Wednesday, May 09, 2012, Minho Ban wrote:
>> /* Check if the device is there */
>> swsusp_resume_device = name_to_dev_t(resume_file);
>> +
>> + /*
>> + * name_to_dev_t is ineffective to verify parition if resume_file is in
>> + * integer format. (e.g. major:minor)
>> + */
>> + if (isdigit(resume_file[0]) && resume_wait) {
>> + int partno;
>> + while (!get_gendisk(swsusp_resume_device, &partno))
>> + msleep(10);
>> + }
>
> Hmm. Wouldn't it be better to do:
>
> if (isdigit(resume_file[0]) && resume_wait) {
> int partno;
> while (!get_gendisk(swsusp_resume_device, &partno))
> msleep(10);
> } else {
> swsusp_resume_device = name_to_dev_t(resume_file);
> }
>
> ?
Do you want name_to_dev_t to be called again? If not, swsusp_resume_device parameter
in get_gendisk can not be used because it is not initialized yet.
>
> Your new code will overwrite whatever swsusp_resume_device is set to by the
> preceding statement anyway.
>
Sorry, I don't understand what will be overwritten by the new code. It would be very
much appreciated if you point it again.
Regards,
Minho Ban
next prev parent reply other threads:[~2012-05-14 0:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 10:23 [PATCH] PM / Hibernate : Use get_gendisk to verify partition if resume_file is integer format Minho Ban
2012-05-12 21:39 ` Rafael J. Wysocki
2012-05-14 0:53 ` Minho Ban [this message]
2012-05-14 19:00 ` Rafael J. Wysocki
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=4FB05770.3050809@samsung.com \
--to=mhban@samsung.com \
--cc=len.brown@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=rob@landley.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.