Commit e04ab958 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

[WATCHDOG] sizeof cleanup

Use sizeof(*) instead of sizeof * (See Codingstyle documentation).
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent d1833c21
...@@ -139,7 +139,7 @@ static long iop_wdt_ioctl(struct file *file, ...@@ -139,7 +139,7 @@ static long iop_wdt_ioctl(struct file *file,
switch (cmd) { switch (cmd) {
case WDIOC_GETSUPPORT: case WDIOC_GETSUPPORT:
if (copy_to_user(argp, &ident, sizeof ident)) if (copy_to_user(argp, &ident, sizeof(ident)))
ret = -EFAULT; ret = -EFAULT;
else else
ret = 0; ret = 0;
......
...@@ -340,7 +340,7 @@ static const struct resource *wdt_gpi_get_resource(struct platform_device *pdv, ...@@ -340,7 +340,7 @@ static const struct resource *wdt_gpi_get_resource(struct platform_device *pdv,
const char *name, unsigned int type) const char *name, unsigned int type)
{ {
char buf[80]; char buf[80];
if (snprintf(buf, sizeof buf, "%s_0", name) >= sizeof buf) if (snprintf(buf, sizeof(buf), "%s_0", name) >= sizeof(buf))
return NULL; return NULL;
return platform_get_resource_byname(pdv, type, buf); return platform_get_resource_byname(pdv, type, buf);
} }
......
...@@ -197,7 +197,7 @@ static long sc1200wdt_ioctl(struct file *file, unsigned int cmd, ...@@ -197,7 +197,7 @@ static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,
switch (cmd) { switch (cmd) {
case WDIOC_GETSUPPORT: case WDIOC_GETSUPPORT:
if (copy_to_user(argp, &ident, sizeof ident)) if (copy_to_user(argp, &ident, sizeof(ident)))
return -EFAULT; return -EFAULT;
return 0; return 0;
......
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