From: Neil Horman <nhorman@tuxdriver.com>
To: Joe Perches <joe@perches.com>
Cc: linux-sctp@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2 1/2] printk: Add a pr_warn_deprecated macro
Date: Tue, 17 Dec 2013 09:18:48 -0500 [thread overview]
Message-ID: <20131217141848.GA8633@hmsreliant.think-freely.org> (raw)
In-Reply-To: <1387216201.18217.58.camel@joe-AO722>
On Mon, Dec 16, 2013 at 09:50:01AM -0800, Joe Perches wrote:
> (adding Andrew Morton to cc's)
>
> On Mon, 2013-12-16 at 12:06 -0500, Neil Horman wrote:
> > sctp has several points in its setsockopt path in which it issues deprecation
> > warnings. It seems like it might be handy to macrotize such a warning so other
> > subsystems can use it easily
> []
> > diff --git a/include/linux/printk.h b/include/linux/printk.h
> []
> > @@ -336,6 +336,9 @@ extern asmlinkage void dump_stack(void) __cold;
> > printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
> > /* no pr_cont_ratelimited, don't do that... */
> >
> > +#define pr_warn_deprecated(fmt, ...) \
> > + pr_warn_ratelimited("Deprecated: " fmt, ##__VA_ARGS__)
>
> Continuing the thread from:
> http://patchwork.ozlabs.org/patch/301738/
>
> Making this a global kernel #define is different than
> using it in your subsystem.
>
> I think this is very analogous to the FW_INFO/FW_WARN
> uses and maybe should just have a #define for the
> string "deprecated:" inserted as a constant.
>
> ie: just using
>
> pr_warn_once(DEPRECATED fmt, args...)
> or
> pr_warn_ratelimited(DEPRECATED fmt, args...)
>
The define is a nice idea, but I'm not sure about the use of the once variant.
Multiple users may use multiple programs that trigger these deprecation
warnings, and we should probably warn on each of them to avoid masking the
others.
I'll work up a new patch set
Neil
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2013-12-17 14:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1387205049-22752-1-git-send-email-nhorman@tuxdriver.com>
2013-12-16 17:06 ` [PATCH v2 0/2] sctp: Consolidate and ratelimit deprecation warnings Neil Horman
2013-12-16 17:06 ` [PATCH v2 1/2] printk: Add a pr_warn_deprecated macro Neil Horman
2013-12-16 17:50 ` Joe Perches
2013-12-17 14:18 ` Neil Horman [this message]
2013-12-17 16:19 ` [PATCH v3 0/2] sctp: Consolidate and ratelimit deprecation warnings Neil Horman
2013-12-17 16:19 ` [PATCH v3 1/2] printk: Add a DEPRECATED macro Neil Horman
2013-12-22 22:56 ` [PATCH v3 0/2] sctp: Consolidate and ratelimit deprecation warnings David Miller
2013-12-23 13:19 ` Neil Horman
2013-12-23 13:29 ` [PATCH v4 " Neil Horman
2013-12-23 13:29 ` [PATCH v4 1/2] printk: Add a DEPRECATED macro Neil Horman
2013-12-23 22:55 ` [PATCH v4 0/2] sctp: Consolidate and ratelimit deprecation warnings Ben Hutchings
2013-12-24 13:37 ` Neil Horman
2013-12-31 19:00 ` David Miller
2013-12-31 20:08 ` Joe Perches
2014-01-02 14:31 ` Neil Horman
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=20131217141848.GA8633@hmsreliant.think-freely.org \
--to=nhorman@tuxdriver.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®