Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452861

Re: [PATCH] qed: Add and use specific logging functions to reduce object size

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] qed: Add and use specific logging functions to reduce object size
Date 2016-07-31 20:10 +0200
Message-ID <s13lv-3wF-7@gated-at.bofh.it> (permalink)
References <rZi5j-7eZ-23@gated-at.bofh.it> <rZsR3-5wS-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] qed: Add and use specific logging functions to reduce object size Joe Perches <joe@perches.com> - 2016-07-26 23:30 +0200
  Re: [PATCH] qed: Add and use specific logging functions to reduce  object size Joe Perches <joe@perches.com> - 2016-07-27 03:30 +0200
    RE: [PATCH] qed: Add and use specific logging functions to reduce  object size Yuval Mintz <Yuval.Mintz@qlogic.com> - 2016-07-27 11:40 +0200
  RE: [PATCH] qed: Add and use specific logging functions to reduce  object size Yuval Mintz <Yuval.Mintz@qlogic.com> - 2016-07-27 11:00 +0200
    Re: [PATCH] qed: Add and use specific logging functions to reduce  object size Joe Perches <joe@perches.com> - 2016-07-31 20:10 +0200
  Re: [PATCH] qed: Add and use specific logging functions to reduce  object size kbuild test robot <lkp@intel.com> - 2016-07-31 02:20 +0200

csiph-web