public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Steve Wise <swise@opengridcomputing.com>
Cc: "'Doug Ledford'" <dledford@redhat.com>,
	"'Sean Hefty'" <sean.hefty@intel.com>,
	"'Hal Rosenstock'" <hal.rosenstock@gmail.com>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] cxgb3: Use more common logging style
Date: Thu, 09 Feb 2017 14:39:43 -0800	[thread overview]
Message-ID: <1486679983.2162.4.camel@perches.com> (raw)
In-Reply-To: <04c801d28324$a8459740$f8d0c5c0$@opengridcomputing.com>

On Thu, 2017-02-09 at 16:34 -0600, Steve Wise wrote:
> > Subject: [PATCH 1/4] cxgb3: Use more common logging style
[]
> > -#define MOD "iw_cxgb3: "
> > -#define PDBG(fmt, args...) pr_debug(MOD fmt, ## args)
> > +#ifdef pr_fmt
> > +#undef pr_fmt
> > +#endif
> 
> Is the ifdef/undef needed?  I see other modules just define pr_fmt() regardless.

Yes.

Because kernel.h may be included before this file,
kernel.h creates a define for pr_fmt, so this must
be undef'd before redefining it.

The other option, done in most files, is to add
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any #include

  reply	other threads:[~2017-02-09 22:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 22:23 [PATCH 0/4] infiniband: chelsio Joe Perches
2017-02-09 22:23 ` [PATCH 1/4] cxgb3: Use more common logging style Joe Perches
2017-02-09 22:34   ` Steve Wise
2017-02-09 22:39     ` Joe Perches [this message]
2017-02-09 22:23 ` [PATCH 2/4] cxgb3: Convert PDBG to pr_debug Joe Perches
2017-02-09 22:35   ` Steve Wise
2017-02-09 22:23 ` [PATCH 3/4] cxgb4: Use more common logging style Joe Perches
2017-02-09 22:36   ` Steve Wise
2017-02-09 22:23 ` [PATCH 4/4] cxgb4: Convert PDBG to pr_debug Joe Perches
2017-02-09 22:37   ` Steve Wise
2017-04-20 20:14 ` [PATCH 0/4] infiniband: chelsio Doug Ledford

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=1486679983.2162.4.camel@perches.com \
    --to=joe@perches.com \
    --cc=dledford@redhat.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sean.hefty@intel.com \
    --cc=swise@opengridcomputing.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