Skip to contentSkip to conversation

ipmi/watchdog: Constify ident

PATCH In review Rikard Falkeborn 2 participants 2 messages Nov 28, 2021 – Dec 1, 2021 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipmi/watchdog: Constify ident

ident is not modified and can be made const to allow the compiler to put it in read-only memory.

---
 drivers/char/ipmi/ipmi_watchdog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/ipmi/ipmi_watchdog.c +1 -1
index 883b4a341012..0604abdd249a 100644
@@ -668,7 +668,7 @@ static int ipmi_heartbeat(void)
 	return rv;
 }
 
-static struct watchdog_info ident = {
+static const struct watchdog_info ident = {
 	.options	= 0,	/* WDIOF_SETTIMEOUT, */
 	.firmware_version = 1,
 	.identity	= "IPMI"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 2 lines · Rikard Falkeborn

ident is not modified and can be made const to allow the compiler to put it in read-only memory.

In my queue for next release. Thanks.

-corey

Quoted 22 lines
---
 drivers/char/ipmi/ipmi_watchdog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/ipmi/ipmi_watchdog.c +1 -1
index 883b4a341012..0604abdd249a 100644
@@ -668,7 +668,7 @@ static int ipmi_heartbeat(void)
 	return rv;
 }
 
-static struct watchdog_info ident = {
+static const struct watchdog_info ident = {
 	.options	= 0,	/* WDIOF_SETTIMEOUT, */
 	.firmware_version = 1,
 	.identity	= "IPMI"
Signature · 1 line
2.34.1