Skip to contentSkip to conversation

IPMI: make ipmi_poweroff_handler const

PATCH In review Bhumika Goyal 2 participants 2 messages Aug 28, 2017 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IPMI: make ipmi_poweroff_handler const

Make this const as it is only passed to a const argument of the function ipmi_create_user.

---
 drivers/char/ipmi/ipmi_poweroff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/ipmi/ipmi_poweroff.c +1 -1
index 9f2e3be..cd0f41f 100644
@@ -133,7 +133,7 @@ static void receive_handler(struct ipmi_recv_msg *recv_msg, void *handler_data)
 		complete(comp);
 }
 
-static struct ipmi_user_hndl ipmi_poweroff_handler = {
+static const struct ipmi_user_hndl ipmi_poweroff_handler = {
 	.ipmi_recv_hndl = receive_handler
 };
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 2 lines · Bhumika Goyal

Make this const as it is only passed to a const argument of the function ipmi_create_user.

Queued for the next kernel release.

-corey

Quoted 18 lines
---
  drivers/char/ipmi/ipmi_poweroff.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/ipmi/ipmi_poweroff.c +1 -1
index 9f2e3be..cd0f41f 100644
@@ -133,7 +133,7 @@ static void receive_handler(struct ipmi_recv_msg *recv_msg, void *handler_data)
  		complete(comp);
  }
 
-static struct ipmi_user_hndl ipmi_poweroff_handler = {
+static const struct ipmi_user_hndl ipmi_poweroff_handler = {
  	.ipmi_recv_hndl = receive_handler
  };