linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] PM: Constify returned PM event name
@ 2017-06-12 15:19 Krzysztof Kozlowski
  2017-06-12 15:19 ` [PATCH 2/3] PM: Constify info string used in messages Krzysztof Kozlowski
  2017-06-12 15:19 ` [PATCH 3/3] PM / sysfs: Constify attribute groups Krzysztof Kozlowski
  0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2017-06-12 15:19 UTC (permalink / raw)
  To: Rafael J. Wysocki, Kevin Hilman, Ulf Hansson, Len Brown,
	Pavel Machek, Greg Kroah-Hartman, linux-pm, linux-kernel
  Cc: Krzysztof Kozlowski

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 --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:
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-12 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 15:19 [PATCH 1/3] PM: Constify returned PM event name Krzysztof Kozlowski
2017-06-12 15:19 ` [PATCH 2/3] PM: Constify info string used in messages Krzysztof Kozlowski
2017-06-12 15:19 ` [PATCH 3/3] PM / sysfs: Constify attribute groups Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).