usb: gadget: vserial: remove unused variable build warnings 72/158572/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 2 Nov 2017 02:06:57 +0000 (11:06 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 2 Nov 2017 02:06:59 +0000 (11:06 +0900)
There are build warnings about unused variable because of debug
log print function. Remove the build warnings with __maybe_unused
macro.

Change-Id: I3b0a61beb388876efab82c7fdc8ee196946ad08f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/usb/gadget/f_vserial.c

index 7481ecc..5e4d927 100755 (executable)
@@ -321,7 +321,7 @@ static ssize_t vser_read(struct file *fp, char __user *buf,
                                size_t count, loff_t *pos)
 {
        struct vser_dev *dev = fp->private_data;
-       struct usb_composite_dev *cdev = dev->cdev;
+       struct usb_composite_dev __maybe_unused *cdev = dev->cdev;
        struct usb_request *req;
        int r = count, xfer;
        int ret;
@@ -394,7 +394,7 @@ static ssize_t vser_write(struct file *fp, const char __user *buf,
                                 size_t count, loff_t *pos)
 {
        struct vser_dev *dev = fp->private_data;
-       struct usb_composite_dev *cdev = dev->cdev;
+       struct usb_composite_dev __maybe_unused *cdev = dev->cdev;
        struct usb_request *req = 0;
        int r = count, xfer;
        int ret;
@@ -632,7 +632,7 @@ static int vser_function_set_alt(struct usb_function *f,
 static void vser_function_disable(struct usb_function *f)
 {
        struct vser_dev *dev = func_to_vser(f);
-       struct usb_composite_dev        *cdev = dev->cdev;
+       struct usb_composite_dev __maybe_unused *cdev = dev->cdev;
 
        DBG(cdev, "vser_function_disable\n");
        dev->online = 0;