From: Peter Hurley <peter@hurleysoftware.com>
To: Joe Perches <joe@perches.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/14] tty: Improve tty_debug() macro
Date: Sun, 8 Nov 2015 14:30:25 -0500 [thread overview]
Message-ID: <563FA2D1.5000504@hurleysoftware.com> (raw)
In-Reply-To: <1447008694.2701.28.camel@perches.com>
Hi Joe,
On 11/08/2015 01:51 PM, Joe Perches wrote:
> On Sun, 2015-11-08 at 13:01 -0500, Peter Hurley wrote:
>> Incorporate suggestions for tty core debug macro improvements
>> - printk(KERN_DEBUG) => pr_debug()
>> - ##args => ##__VA_ARGS__
>> - remove do {} while()
>> - output tty_name() first
> []
>> diff --git 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
>
> Unless there's a #define DEBUG in the path, this now
> basically requires dynamic debugging to output anything.
It's what Greg wanted.
> Given that, I suggest removing __func__ from the output
> because dynamic debugging can add it.
Done in a follow-on patch in the series because the messages needed
some (minor) context if the function name is not output.
> And f is more commonly fmt, so:
I have a terse style :)
Regards,
Peter Hurley
next prev parent reply other threads:[~2015-11-08 19:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-08 18:01 [PATCH 00/14] tty core printk cleanup Peter Hurley
2015-11-08 18:01 ` [PATCH 01/14] tty: Improve tty_debug() macro Peter Hurley
2015-11-08 18:51 ` Joe Perches
2015-11-08 19:30 ` Peter Hurley [this message]
2015-11-08 19:33 ` Joe Perches
2015-11-08 18:01 ` [PATCH 02/14] tty: Make tty_paranoia_check() file scope Peter Hurley
2015-11-08 18:01 ` [PATCH 03/14] tty: synclink_gt: Rename tty_driver_name Peter Hurley
2015-11-08 18:01 ` [PATCH 04/14] tty: core: Remove redundant oom message Peter Hurley
2015-11-08 18:01 ` [PATCH 05/14] tty: core: Add helper fn to deref tty driver name Peter Hurley
2015-11-08 18:01 ` [PATCH 06/14] tty: Define tty_*() printk macros Peter Hurley
2015-11-08 18:01 ` [PATCH 07/14] tty: Convert SAK messages to tty_notice() Peter Hurley
2015-11-08 18:01 ` [PATCH 08/14] tty: core: Add driver name to invalid device registration message Peter Hurley
2015-11-08 18:01 ` [PATCH 09/14] tty: core: Refactor parameters for unset_locked_termios() helper Peter Hurley
2015-11-08 18:01 ` [PATCH 10/14] tty: Remove unset_locked_termios() error message Peter Hurley
2015-11-08 18:01 ` [PATCH 11/14] tty: core: Prefer pr_* to printk(*) Peter Hurley
2015-11-08 18:01 ` [PATCH 12/14] tty: Remove __func__ from tty_debug() macro Peter Hurley
2015-11-08 18:01 ` [PATCH 13/14] tty: Merge conditional + error message + WARN_ON() Peter Hurley
2015-11-08 18:01 ` [PATCH 14/14] tty: core: Prefer dev_dbg() over pr_debug() Peter Hurley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563FA2D1.5000504@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.