lkml.org 
[lkml]   [2015]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers/usb/core: sysfs.c: Removed a couple warnings
Date
Removed a warnings(from checkpatch.pl) about sizeof not having parenthesis'. added parenthesis'
around the strings being used.

Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
---
drivers/usb/core/sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index d269738..bb8aff1 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -428,11 +428,11 @@ static ssize_t level_store(struct device *dev, struct device_attribute *attr,

usb_lock_device(udev);

- if (len == sizeof on_string - 1 &&
+ if (len == sizeof(on_string) - 1 &&
strncmp(buf, on_string, len) == 0)
usb_disable_autosuspend(udev);

- else if (len == sizeof auto_string - 1 &&
+ else if (len == sizeof(auto_string) - 1 &&
strncmp(buf, auto_string, len) == 0)
usb_enable_autosuspend(udev);

--
1.9.1


\
 
 \ /
  Last update: 2015-04-11 11:21    [W:0.027 / U:3.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site