Message ID | 1384886818-11861-1-git-send-email-shuah.kh@samsung.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers | show |
On Tue, 2013-11-19 at 11:46 -0700, Shuah Khan wrote: > Replaced printks with dev_* and pr_* routines. Replacing printk in > __suspend_report_result() will require passing in struct device * > pointer from calling routines and this will require changes to > external interface suspend_report_result() which is used by several > drivers. Hence, this one instance is replaced by pr_err(). [] > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c [] > @@ -1308,9 +1308,8 @@ int dpm_prepare(pm_message_t state) > error = 0; > continue; > } > - printk(KERN_INFO "PM: Device %s not prepared " > - "for power transition: code %d\n", > - dev_name(dev), error); > + dev_info("PM: not prepared for power transition: ", > + "code %d\n", error); Shuah, you have to make sure the files modified by your patches compile successfully before sending patches like this. -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/19/2013 11:53 AM, Joe Perches wrote: > On Tue, 2013-11-19 at 11:46 -0700, Shuah Khan wrote: >> Replaced printks with dev_* and pr_* routines. Replacing printk in >> __suspend_report_result() will require passing in struct device * >> pointer from calling routines and this will require changes to >> external interface suspend_report_result() which is used by several >> drivers. Hence, this one instance is replaced by pr_err(). > [] >> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c > [] >> @@ -1308,9 +1308,8 @@ int dpm_prepare(pm_message_t state) >> error = 0; >> continue; >> } >> - printk(KERN_INFO "PM: Device %s not prepared " >> - "for power transition: code %d\n", >> - dev_name(dev), error); >> + dev_info("PM: not prepared for power transition: ", >> + "code %d\n", error); > > Shuah, you have to make sure the files modified by > your patches compile successfully before sending > patches like this. > > Oops. I did compile. Missed the warning. Sorry about that. -- Shuah
On Tue, 2013-11-19 at 11:57 -0700, Shuah Khan wrote: > On 11/19/2013 11:53 AM, Joe Perches wrote: > > On Tue, 2013-11-19 at 11:46 -0700, Shuah Khan wrote: > >> Replaced printks with dev_* and pr_* routines. Replacing printk in > >> __suspend_report_result() will require passing in struct device * > >> pointer from calling routines and this will require changes to > >> external interface suspend_report_result() which is used by several > >> drivers. Hence, this one instance is replaced by pr_err(). > > [] > >> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c > > [] > >> @@ -1308,9 +1308,8 @@ int dpm_prepare(pm_message_t state) > >> error = 0; > >> continue; > >> } > >> - printk(KERN_INFO "PM: Device %s not prepared " > >> - "for power transition: code %d\n", > >> - dev_name(dev), error); > >> + dev_info("PM: not prepared for power transition: ", > >> + "code %d\n", error); > > > > Shuah, you have to make sure the files modified by > > your patches compile successfully before sending > > patches like this. > Oops. I did compile. Missed the warning. Sorry about that. btw: When you're doing patches like this, not bugfixes, not something that's going to be applied to current or stable, please make them against -next and not against Linus' tree. Also, I would make the larger change that modifies all the drivers like I suggested. What you've done I think is a half-measure and is incomplete. cheers, Joe -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/19/2013 12:07 PM, Joe Perches wrote: > On Tue, 2013-11-19 at 11:57 -0700, Shuah Khan wrote: >> On 11/19/2013 11:53 AM, Joe Perches wrote: >>> On Tue, 2013-11-19 at 11:46 -0700, Shuah Khan wrote: >>>> Replaced printks with dev_* and pr_* routines. Replacing printk in >>>> __suspend_report_result() will require passing in struct device * >>>> pointer from calling routines and this will require changes to >>>> external interface suspend_report_result() which is used by several >>>> drivers. Hence, this one instance is replaced by pr_err(). >>> [] >>>> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c >>> [] >>>> @@ -1308,9 +1308,8 @@ int dpm_prepare(pm_message_t state) >>>> error = 0; >>>> continue; >>>> } >>>> - printk(KERN_INFO "PM: Device %s not prepared " >>>> - "for power transition: code %d\n", >>>> - dev_name(dev), error); >>>> + dev_info("PM: not prepared for power transition: ", >>>> + "code %d\n", error); >>> >>> Shuah, you have to make sure the files modified by >>> your patches compile successfully before sending >>> patches like this. >> Oops. I did compile. Missed the warning. Sorry about that. > > btw: > > When you're doing patches like this, not bugfixes, > not something that's going to be applied to current > or stable, please make them against -next and not > against Linus' tree. ok. Makes sense changes like this don't need to be rushed. They could use soak time in linux-next. > > Also, I would make the larger change that modifies > all the drivers like I suggested. What you've done > I think is a half-measure and is incomplete. > I was a bit reluctant to change all the drivers since the original message didn't include device information. However, adding device information would make this message more useful. I will re-do the patch to make the larger change. -- Shuah
On Tue, Nov 19, 2013 at 11:57:22AM -0700, Shuah Khan wrote: > On 11/19/2013 11:53 AM, Joe Perches wrote: > > On Tue, 2013-11-19 at 11:46 -0700, Shuah Khan wrote: > >> Replaced printks with dev_* and pr_* routines. Replacing printk in > >> __suspend_report_result() will require passing in struct device * > >> pointer from calling routines and this will require changes to > >> external interface suspend_report_result() which is used by several > >> drivers. Hence, this one instance is replaced by pr_err(). > > [] > >> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c > > [] > >> @@ -1308,9 +1308,8 @@ int dpm_prepare(pm_message_t state) > >> error = 0; > >> continue; > >> } > >> - printk(KERN_INFO "PM: Device %s not prepared " > >> - "for power transition: code %d\n", > >> - dev_name(dev), error); > >> + dev_info("PM: not prepared for power transition: ", > >> + "code %d\n", error); > > > > Shuah, you have to make sure the files modified by > > your patches compile successfully before sending > > patches like this. > > > > > > Oops. I did compile. Missed the warning. Sorry about that. It should be an "error"... It adds a codingstyle warning as well, so fix that up for the next version please :) greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 9f098a8..3f42c43 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -349,8 +349,8 @@ static void pm_dev_dbg(struct device *dev, pm_message_t state, char *info) static void pm_dev_err(struct device *dev, pm_message_t state, char *info, int error) { - printk(KERN_ERR "PM: Device %s failed to %s%s: error %d\n", - dev_name(dev), pm_verb(state.event), info, error); + dev_err(dev, "PM: failed to %s%s: error %d\n", + pm_verb(state.event), info, error); } static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) @@ -1308,9 +1308,8 @@ int dpm_prepare(pm_message_t state) error = 0; continue; } - printk(KERN_INFO "PM: Device %s not prepared " - "for power transition: code %d\n", - dev_name(dev), error); + dev_info("PM: not prepared for power transition: ", + "code %d\n", error); put_device(dev); break; } @@ -1347,7 +1346,7 @@ EXPORT_SYMBOL_GPL(dpm_suspend_start); void __suspend_report_result(const char *function, void *fn, int ret) { if (ret) - printk(KERN_ERR "%s(): %pF returns %d\n", function, fn, ret); + pr_err("%s(): %pF returns %d\n", function, fn, ret); } EXPORT_SYMBOL_GPL(__suspend_report_result);
Replaced printks with dev_* and pr_* routines. Replacing printk in __suspend_report_result() will require passing in struct device * pointer from calling routines and this will require changes to external interface suspend_report_result() which is used by several drivers. Hence, this one instance is replaced by pr_err(). Signed-off-by: Shuah Khan <shuah.kh@samsung.com> --- drivers/base/power/main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)