Skip to contentSkip to conversation

drivers/usb/core: sysfs.c: Removed a couple warnings

PATCH New Chase Metzger 1 participant 1 message Apr 11, 2015 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/usb/core: sysfs.c: Removed a couple warnings

Removed a warnings(from checkpatch.pl) about sizeof not having parenthesis'. added parenthesis' around the strings being used.

---
 drivers/usb/core/sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/core/sysfs.c +2 -2
index d269738..bb8aff1 100644
@@ -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);
 
Signature · 1 line
1.9.1