[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1399557141-1346645-2-git-send-email-arnd@arndb.de>
Date: Thu, 8 May 2014 15:52:14 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Felipe Balbi <balbi@...com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Arnd Bergmann <arnd@...db.de>, Ben Dooks <ben-linux@...ff.org>,
Kukjin Kim <kgene.kim@...sung.com>,
linux-samsung-soc@...r.kernel.org
Subject: [PATCH 1/8] 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@...db.de>
Cc: Ben Dooks <ben-linux@...ff.org>
Cc: Kukjin Kim <kgene.kim@...sung.com>
Cc: linux-samsung-soc@...r.kernel.org
---
drivers/usb/gadget/s3c2410_udc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index dd9678f..7987aa0 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -117,7 +117,8 @@ static int dprintk(int level, const char *fmt, ...)
sizeof(printk_buf)-len, fmt, args);
va_end(args);
- return pr_debug("%s", printk_buf);
+ pr_debug("%s", printk_buf);
+ return len;
}
#else
static int dprintk(int level, const char *fmt, ...)
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists