lkml.org 
[lkml]   [2016]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/14] USB: serial: safe_serial: fix assignment of bool to non 0/1 constant
Date
This patch fixes the following coccinelle error:

drivers/usb/serial/safe_serial.c:85:12-18: ERROR: Assignment of bool to non-0/1 constant

Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
---
drivers/usb/serial/safe_serial.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 5662df6..93c6c9b 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -76,13 +76,8 @@
#include <linux/usb.h>
#include <linux/usb/serial.h>

-
-#ifndef CONFIG_USB_SERIAL_SAFE_PADDED
-#define CONFIG_USB_SERIAL_SAFE_PADDED 0
-#endif
-
static bool safe = true;
-static bool padded = CONFIG_USB_SERIAL_SAFE_PADDED;
+static bool padded = IS_ENABLED(CONFIG_USB_SERIAL_SAFE_PADDED);

#define DRIVER_AUTHOR "sl@lineo.com, tbr@lineo.com, Johan Hovold <jhovold@gmail.com>"
#define DRIVER_DESC "USB Safe Encapsulated Serial"
--
2.6.4
\
 
 \ /
  Last update: 2016-01-30 19:01    [W:0.116 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site