Commit 7692a982 authored by Tomas Winkler's avatar Tomas Winkler Committed by Wim Van Sebroeck

watchdog: mei_wdt: don't use of variable length array

Fixes sparse warning:
drivers/watchdog/mei_wdt.c:530:18: warning: Variable length array is used
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Reviewed-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 788c2fdb
...@@ -526,11 +526,10 @@ static ssize_t mei_dbgfs_read_state(struct file *file, char __user *ubuf, ...@@ -526,11 +526,10 @@ static ssize_t mei_dbgfs_read_state(struct file *file, char __user *ubuf,
size_t cnt, loff_t *ppos) size_t cnt, loff_t *ppos)
{ {
struct mei_wdt *wdt = file->private_data; struct mei_wdt *wdt = file->private_data;
const size_t bufsz = 32; char buf[32];
char buf[bufsz];
ssize_t pos; ssize_t pos;
pos = scnprintf(buf, bufsz, "state: %s\n", pos = scnprintf(buf, sizeof(buf), "state: %s\n",
mei_wdt_state_str(wdt->state)); mei_wdt_state_str(wdt->state));
return simple_read_from_buffer(ubuf, cnt, ppos, buf, pos); return simple_read_from_buffer(ubuf, cnt, ppos, buf, pos);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment