From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: 'Doug Ledford' <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
'Sean Hefty' <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
'Hal Rosenstock'
<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
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
next prev parent reply other threads:[~2017-02-09 22:39 UTC|newest]
Thread overview: 18+ 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 ` 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:34 ` Steve Wise
2017-02-09 22:39 ` Joe Perches [this message]
2017-02-09 22:39 ` Joe Perches
2017-02-09 22:23 ` [PATCH 2/4] cxgb3: Convert PDBG to pr_debug Joe Perches
[not found] ` <41a74ceecd35cf2f38e2a1a1a394c7718547deb6.1486678686.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-02-09 22:35 ` Steve Wise
2017-02-09 22:35 ` Steve Wise
2017-02-09 22:23 ` [PATCH 3/4] cxgb4: Use more common logging style Joe Perches
[not found] ` <d054cd530aeef452c7c252504f7d4d6ebba31ae3.1486678686.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-02-09 22:36 ` Steve Wise
2017-02-09 22:36 ` Steve Wise
2017-02-09 22:23 ` [PATCH 4/4] cxgb4: Convert PDBG to pr_debug Joe Perches
[not found] ` <747edc68212781296de30dd2b4e63711240da7a9.1486678686.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-02-09 22:37 ` Steve Wise
2017-02-09 22:37 ` Steve Wise
[not found] ` <cover.1486678686.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-04-20 20:14 ` [PATCH 0/4] infiniband: chelsio Doug Ledford
2017-04-20 20:14 ` 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-6d6dil74uinbdgjk7y7tuq@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.