浏览代码

usb: gadget: s3c2410_udc: don't use pr_debug return value

pr_debug() may be defined as "do { } while (0)" in some configurations,
which means one cannot rely on the return value to be available.

In the dprintk function in this driver, we can work around the
resulting build error trivially by returning the length that
this function already knows and ignoring the return value of
pr_debug.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Felipe Balbi <balbi@ti.com>
Arnd Bergmann 11 年之前
父节点
当前提交
64890edb85
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/usb/gadget/s3c2410_udc.c

+ 2 - 1
drivers/usb/gadget/s3c2410_udc.c

@@ -117,7 +117,8 @@ static int dprintk(int level, const char *fmt, ...)
 			sizeof(printk_buf)-len, fmt, args);
 			sizeof(printk_buf)-len, fmt, args);
 	va_end(args);
 	va_end(args);
 
 
-	return pr_debug("%s", printk_buf);
+	pr_debug("%s", printk_buf);
+	return len;
 }
 }
 #else
 #else
 static int dprintk(int level, const char *fmt, ...)
 static int dprintk(int level, const char *fmt, ...)