diff mbox

[1/3] PM: Constify returned PM event name

Message ID 20170612151933.7588-1-krzk@kernel.org (mailing list archive)
State Mainlined
Delegated to: Rafael Wysocki
Headers show

Commit Message

Krzysztof Kozlowski June 12, 2017, 3:19 p.m. UTC
The pm_verb() returns a pointer to string from .rodata so it should be
marked as const.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/base/power/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 9faee1c893e5..924a5ba7aa27 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -62,7 +62,7 @@  static pm_message_t pm_transition;
 
 static int async_error;
 
-static char *pm_verb(int event)
+static const char *pm_verb(int event)
 {
 	switch (event) {
 	case PM_EVENT_SUSPEND: