From: Joe Perches <joe@perches.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Jonathan Toppins <jtoppins@redhat.com>,
netdev@vger.kernel.org, leon@kernel.org,
Jay Vosburgh <j.vosburgh@gmail.com>,
Veaceslav Falico <vfalico@gmail.com>,
Andy Gospodarek <andy@greyhouse.net>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] bonding: combine netlink and console error messages
Date: Wed, 11 Aug 2021 06:23:41 -0700 [thread overview]
Message-ID: <c296dd2f66e97ad38d5456c0fab4e0ff99b14634.camel@perches.com> (raw)
In-Reply-To: <20210811054917.722bd988@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
On Wed, 2021-08-11 at 05:49 -0700, Jakub Kicinski wrote:
> On Tue, 10 Aug 2021 20:27:01 -0700 Joe Perches wrote:
> > > +#define BOND_NL_ERR(bond_dev, extack, errmsg) do { \
> > > + if (extack) \
> > > + NL_SET_ERR_MSG(extack, errmsg); \
> > > + else \
> > > + netdev_err(bond_dev, "Error: %s\n", errmsg); \
> > > +} while (0)
> > > +
> > > +#define SLAVE_NL_ERR(bond_dev, slave_dev, extack, errmsg) do { \
> > > + if (extack) \
> > > + NL_SET_ERR_MSG(extack, errmsg); \
> > > + else \
> > > + slave_err(bond_dev, slave_dev, "Error: %s\n", errmsg); \
> > > +} while (0)
> >
> > Ideally both of these would be static functions and not macros.
>
> That may break our ability for NL_SET_ERR_MSG to place strings
> back in a static buffer, no?
Not really.
The most common way to place things in a particular section is to
use __section("whatever")
It's pretty trivial to mark these errmsg strings as above.
next prev parent reply other threads:[~2021-08-11 13:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1628650079.git.jtoppins@redhat.com>
2021-08-11 2:53 ` [PATCH net-next v2 1/2] bonding: remove extraneous definitions from bonding.h Jonathan Toppins
2021-08-11 2:53 ` [PATCH net-next v2 2/2] bonding: combine netlink and console error messages Jonathan Toppins
2021-08-11 3:27 ` Joe Perches
2021-08-11 12:49 ` Jakub Kicinski
2021-08-11 13:23 ` Joe Perches [this message]
2021-08-11 14:31 ` Jonathan Toppins
2021-08-07 3:30 [PATCH net-next " Jonathan Toppins
2021-08-10 6:40 ` [PATCH net-next v2 " Jonathan Toppins
2021-08-10 6:47 ` Leon Romanovsky
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=c296dd2f66e97ad38d5456c0fab4e0ff99b14634.camel@perches.com \
--to=joe@perches.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=j.vosburgh@gmail.com \
--cc=jtoppins@redhat.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
/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®