提交 e3771fa9 编写于 作者: K Krzysztof Kozlowski 提交者: Rafael J. Wysocki

PM: Constify info string used in messages

The 'info' string appearing in many places points to a .rodata string so
it should be passes as pointer to const.
Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 952856db
...@@ -208,7 +208,8 @@ static ktime_t initcall_debug_start(struct device *dev) ...@@ -208,7 +208,8 @@ static ktime_t initcall_debug_start(struct device *dev)
} }
static void initcall_debug_report(struct device *dev, ktime_t calltime, static void initcall_debug_report(struct device *dev, ktime_t calltime,
int error, pm_message_t state, char *info) int error, pm_message_t state,
const char *info)
{ {
ktime_t rettime; ktime_t rettime;
s64 nsecs; s64 nsecs;
...@@ -403,21 +404,22 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t stat ...@@ -403,21 +404,22 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t stat
return NULL; return NULL;
} }
static void pm_dev_dbg(struct device *dev, pm_message_t state, char *info) static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info)
{ {
dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event), dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event),
((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ? ((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ?
", may wakeup" : ""); ", may wakeup" : "");
} }
static void pm_dev_err(struct device *dev, pm_message_t state, char *info, static void pm_dev_err(struct device *dev, pm_message_t state, const char *info,
int error) int error)
{ {
printk(KERN_ERR "PM: Device %s failed to %s%s: error %d\n", printk(KERN_ERR "PM: Device %s failed to %s%s: error %d\n",
dev_name(dev), pm_verb(state.event), info, error); dev_name(dev), pm_verb(state.event), info, error);
} }
static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) static void dpm_show_time(ktime_t starttime, pm_message_t state,
const char *info)
{ {
ktime_t calltime; ktime_t calltime;
u64 usecs64; u64 usecs64;
...@@ -435,7 +437,7 @@ static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) ...@@ -435,7 +437,7 @@ static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info)
} }
static int dpm_run_callback(pm_callback_t cb, struct device *dev, static int dpm_run_callback(pm_callback_t cb, struct device *dev,
pm_message_t state, char *info) pm_message_t state, const char *info)
{ {
ktime_t calltime; ktime_t calltime;
int error; int error;
...@@ -535,7 +537,7 @@ static void dpm_watchdog_clear(struct dpm_watchdog *wd) ...@@ -535,7 +537,7 @@ static void dpm_watchdog_clear(struct dpm_watchdog *wd)
static int device_resume_noirq(struct device *dev, pm_message_t state, bool async) static int device_resume_noirq(struct device *dev, pm_message_t state, bool async)
{ {
pm_callback_t callback = NULL; pm_callback_t callback = NULL;
char *info = NULL; const char *info = NULL;
int error = 0; int error = 0;
TRACE_DEVICE(dev); TRACE_DEVICE(dev);
...@@ -665,7 +667,7 @@ void dpm_resume_noirq(pm_message_t state) ...@@ -665,7 +667,7 @@ void dpm_resume_noirq(pm_message_t state)
static int device_resume_early(struct device *dev, pm_message_t state, bool async) static int device_resume_early(struct device *dev, pm_message_t state, bool async)
{ {
pm_callback_t callback = NULL; pm_callback_t callback = NULL;
char *info = NULL; const char *info = NULL;
int error = 0; int error = 0;
TRACE_DEVICE(dev); TRACE_DEVICE(dev);
...@@ -793,7 +795,7 @@ EXPORT_SYMBOL_GPL(dpm_resume_start); ...@@ -793,7 +795,7 @@ EXPORT_SYMBOL_GPL(dpm_resume_start);
static int device_resume(struct device *dev, pm_message_t state, bool async) static int device_resume(struct device *dev, pm_message_t state, bool async)
{ {
pm_callback_t callback = NULL; pm_callback_t callback = NULL;
char *info = NULL; const char *info = NULL;
int error = 0; int error = 0;
DECLARE_DPM_WATCHDOG_ON_STACK(wd); DECLARE_DPM_WATCHDOG_ON_STACK(wd);
...@@ -955,7 +957,7 @@ void dpm_resume(pm_message_t state) ...@@ -955,7 +957,7 @@ void dpm_resume(pm_message_t state)
static void device_complete(struct device *dev, pm_message_t state) static void device_complete(struct device *dev, pm_message_t state)
{ {
void (*callback)(struct device *) = NULL; void (*callback)(struct device *) = NULL;
char *info = NULL; const char *info = NULL;
if (dev->power.syscore) if (dev->power.syscore)
return; return;
...@@ -1080,7 +1082,7 @@ static pm_message_t resume_event(pm_message_t sleep_state) ...@@ -1080,7 +1082,7 @@ static pm_message_t resume_event(pm_message_t sleep_state)
static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool async) static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool async)
{ {
pm_callback_t callback = NULL; pm_callback_t callback = NULL;
char *info = NULL; const char *info = NULL;
int error = 0; int error = 0;
TRACE_DEVICE(dev); TRACE_DEVICE(dev);
...@@ -1225,7 +1227,7 @@ int dpm_suspend_noirq(pm_message_t state) ...@@ -1225,7 +1227,7 @@ int dpm_suspend_noirq(pm_message_t state)
static int __device_suspend_late(struct device *dev, pm_message_t state, bool async) static int __device_suspend_late(struct device *dev, pm_message_t state, bool async)
{ {
pm_callback_t callback = NULL; pm_callback_t callback = NULL;
char *info = NULL; const char *info = NULL;
int error = 0; int error = 0;
TRACE_DEVICE(dev); TRACE_DEVICE(dev);
...@@ -1384,7 +1386,7 @@ EXPORT_SYMBOL_GPL(dpm_suspend_end); ...@@ -1384,7 +1386,7 @@ EXPORT_SYMBOL_GPL(dpm_suspend_end);
*/ */
static int legacy_suspend(struct device *dev, pm_message_t state, static int legacy_suspend(struct device *dev, pm_message_t state,
int (*cb)(struct device *dev, pm_message_t state), int (*cb)(struct device *dev, pm_message_t state),
char *info) const char *info)
{ {
int error; int error;
ktime_t calltime; ktime_t calltime;
...@@ -1426,7 +1428,7 @@ static void dpm_clear_suppliers_direct_complete(struct device *dev) ...@@ -1426,7 +1428,7 @@ static void dpm_clear_suppliers_direct_complete(struct device *dev)
static int __device_suspend(struct device *dev, pm_message_t state, bool async) static int __device_suspend(struct device *dev, pm_message_t state, bool async)
{ {
pm_callback_t callback = NULL; pm_callback_t callback = NULL;
char *info = NULL; const char *info = NULL;
int error = 0; int error = 0;
DECLARE_DPM_WATCHDOG_ON_STACK(wd); DECLARE_DPM_WATCHDOG_ON_STACK(wd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册