public inbox for linux-watchdog@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: change "char *" string form to "char []"
@ 2022-05-24  0:33 Yu Zhe
  2022-05-24  0:42 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Zhe @ 2022-05-24  0:33 UTC (permalink / raw)
  To: sander, wim, linux; +Cc: linux-watchdog, linux-kernel, Yu Zhe

The string form of "char []" declares a single variable. It is better
than "char *" which creates two variables.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
 drivers/watchdog/realtek_otto_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/realtek_otto_wdt.c b/drivers/watchdog/realtek_otto_wdt.c
index 60058a0c3ec4..c653ec73a999 100644
--- a/drivers/watchdog/realtek_otto_wdt.c
+++ b/drivers/watchdog/realtek_otto_wdt.c
@@ -265,7 +265,7 @@ static int otto_wdt_probe_clk(struct otto_wdt_ctrl *ctrl)
 
 static int otto_wdt_probe_reset_mode(struct otto_wdt_ctrl *ctrl)
 {
-	static const char *mode_property = "realtek,reset-mode";
+	static const char mode_property[] = "realtek,reset-mode";
 	const struct fwnode_handle *node = ctrl->dev->fwnode;
 	int mode_count;
 	u32 mode;
-- 
2.25.1


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

end of thread, other threads:[~2022-05-24  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-24  0:33 [PATCH] watchdog: change "char *" string form to "char []" Yu Zhe
2022-05-24  0:42 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox