From: Joe Perches <joe@perches.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>,
Ariel Elior <Ariel.Elior@qlogic.com>,
Dept-Eng Everest Linux L2 <Dept-EngEverestLinuxL2@qlogic.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] qed: Add and use specific logging functions to reduce object size
Date: Sun, 31 Jul 2016 11:04:20 -0700 [thread overview]
Message-ID: <1469988260.3998.128.camel@perches.com> (raw)
In-Reply-To: <CO2PR11MB00889101E00EA4328672A374970F0@CO2PR11MB0088.namprd11.prod.outlook.com>
On Wed, 2016-07-27 at 07:24 +0000, Yuval Mintz wrote:
> >
> > Current DP_ macros generate a lot of code.
> > Using functions with vsprintf extension %pV helps reduce that size.
> >
> > drivers/net/ethernet/qlogic/qed/Makefile | 2 +-
> > drivers/net/ethernet/qlogic/qed/qed_util.c | 82 ++++++++++++++++++++++++++++++
> > include/linux/qed/qed_if.h | 60 +++++++++-------------
> > 3 files changed, 106 insertions(+), 38 deletions(-) create mode 100644
> > drivers/net/ethernet/qlogic/qed/qed_util.c
> This won't compile when CONFIG_QED*=m, as qede can't link to
> the new qed_{err, verbose, info, notice} functions.
> That was the original reason for putting the macros in the interface
> header.
>
> Other alternatives:
> - We can EXPORT_SYMBOL() the functions, although we've taken a
> strain not adding such to the interface.
> - Code duplication between qed/qede [ugly].
> - Implementing this in qede via the interface functions with qed;
> But the notion of defining an interface between 2 modules passing
> va_args seems [to me] like a bad one.
>
> If you have cleaner solutions, I'd be happy to hear those.
Hello Yuval.
EXPORT_SYMBOL is probably the simplest solution.
It's pretty commonly used for private logging functions
in drivers/net/, e.g.: drivers/net/wireless/ath/main.c
I'll submit that in awhile.
cheers, Joe
next prev parent reply other threads:[~2016-07-31 18:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 21:25 [PATCH] qed: Add and use specific logging functions to reduce object size Joe Perches
2016-07-27 1:24 ` Joe Perches
2016-07-27 7:32 ` Yuval Mintz
2016-07-27 7:24 ` Yuval Mintz
2016-07-31 18:04 ` Joe Perches [this message]
2016-07-31 0:15 ` kbuild test robot
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=1469988260.3998.128.camel@perches.com \
--to=joe@perches.com \
--cc=Ariel.Elior@qlogic.com \
--cc=Dept-EngEverestLinuxL2@qlogic.com \
--cc=Yuval.Mintz@qlogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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