From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752608AbcBKANq (ORCPT ); Wed, 10 Feb 2016 19:13:46 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36185 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbcBKANo (ORCPT ); Wed, 10 Feb 2016 19:13:44 -0500 Date: Wed, 10 Feb 2016 16:13:43 -0800 From: Victor Dodon To: linux-kernel@vger.kernel.org Cc: Matthew Dharm , Greg Kroah-Hartman , linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, Gwendal Grignou Subject: [PATCH] usb: storage: make US_DEBUGPX print with LOGLEVEL_DEBUG Message-ID: <20160211001343.GA133746@printesoi1.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The US_DEBUGPX macro uses printk without specifying a kernel log level, so the default kernel log level is used, which may not match LOGLEVEL_DEBUG used in usb_stor_dbg. Use printk_emit with LOGLEVEL_DEBUG instead. Signed-off-by: Victor Dodon --- drivers/usb/storage/debug.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h index f525203..fc1c02f 100644 --- a/drivers/usb/storage/debug.h +++ b/drivers/usb/storage/debug.h @@ -43,6 +43,7 @@ #define _DEBUG_H_ #include +#include #define USB_STORAGE "usb-storage: " @@ -53,7 +54,8 @@ void usb_stor_show_sense(const struct us_data *us, unsigned char key, __printf(2, 3) void usb_stor_dbg(const struct us_data *us, const char *fmt, ...); -#define US_DEBUGPX(fmt, ...) printk(fmt, ##__VA_ARGS__) +#define US_DEBUGPX(fmt, ...) \ + printk_emit(0, LOGLEVEL_DEBUG, NULL, 0, fmt, ##__VA_ARGS__) #define US_DEBUG(x) x #else __printf(2, 3) @@ -64,7 +66,11 @@ static inline void _usb_stor_dbg(const struct us_data *us, #define usb_stor_dbg(us, fmt, ...) \ do { if (0) _usb_stor_dbg(us, fmt, ##__VA_ARGS__); } while (0) #define US_DEBUGPX(fmt, ...) \ - do { if (0) printk(fmt, ##__VA_ARGS__); } while (0) + do { \ + if (0) \ + printk_emit(0, LOGLEVEL_DEBUG, NULL, 0, \ + fmt, ##__VA_ARGS__); \ + } while (0) #define US_DEBUG(x) #endif -- 2.7.0.rc3.207.g0ac5344