Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751779AbbKHSCe (ORCPT ); Sun, 8 Nov 2015 13:02:34 -0500 Received: from mail-io0-f177.google.com ([209.85.223.177]:34572 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbbKHSBi (ORCPT ); Sun, 8 Nov 2015 13:01:38 -0500 From: Peter Hurley To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-kernel@vger.kernel.org, Peter Hurley , Joe Perches Subject: [PATCH 01/14] tty: Improve tty_debug() macro Date: Sun, 8 Nov 2015 13:01:08 -0500 Message-Id: <1447005681-4912-2-git-send-email-peter@hurleysoftware.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1447005681-4912-1-git-send-email-peter@hurleysoftware.com> References: <1447005681-4912-1-git-send-email-peter@hurleysoftware.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1186 Lines: 37 Incorporate suggestions for tty core debug macro improvements - printk(KERN_DEBUG) => pr_debug() - ##args => ##__VA_ARGS__ - remove do {} while() - output tty_name() first cc: Joe Perches Signed-off-by: Peter Hurley --- include/linux/tty.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/linux/tty.h b/include/linux/tty.h index 5e31f1b..3695c88 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -667,10 +667,7 @@ static inline void proc_tty_register_driver(struct tty_driver *d) {} static inline void proc_tty_unregister_driver(struct tty_driver *d) {} #endif -#define tty_debug(tty, f, args...) \ - do { \ - printk(KERN_DEBUG "%s: %s: " f, __func__, \ - tty_name(tty), ##args); \ - } while (0) +#define tty_debug(tty, f, ...) \ + pr_debug("%s: %s: " f, tty_name(tty), __func__, ##__VA_ARGS__) #endif -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/