From: Jason Gunthorpe <jgg@ziepe.ca>
To: Zhu Yanjun <yanjun.zhu@linux.dev>
Cc: zyjzyj2000@gmail.com, leon@kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 1/1] RDMA/rxe: Make pr_fmt work
Date: Thu, 4 Apr 2024 20:59:31 -0300 [thread overview]
Message-ID: <20240404235931.GA5792@ziepe.ca> (raw)
In-Reply-To: <be9584b6-85fc-46bb-87b8-18ca6103a5a4@linux.dev>
On Thu, Apr 04, 2024 at 08:03:35PM +0200, Zhu Yanjun wrote:
> > > > Because this driver will finally call printk function to output the logs,
> > > > the header file include/linux/printk.h needs be included.
> > > >
> > > > In include/linux/printk.h, pr_fmt is defined.
> > > This doesn't make sense, printk.h has:
> > >
> > > #ifndef pr_fmt
> > > #define pr_fmt(fmt) fmt
> > > #endif
> > >
> > > Before or after printk.h should not have an impact.
>
>
> Sorry. The previous mail is not sent successfully. I resend it.
>
> > #ifndef pr_fmt
> >
> > ...
> >
> > #endif
> >
> > The above will not undefine pr_fmt.
> >
> > #undef pr_fmt will undefine pr_fmt.
> >
> > This link explains the above in details.
> >
> https://www.techonthenet.com/c_language/directives/ifndef.php
Why would you want to undefine it? The point is to #define it to the
rxe specific value. If it is already set to the rxe specific value
before including printk.h then it will work fine?
Jason
next prev parent reply other threads:[~2024-04-04 23:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-23 8:31 [PATCH 1/1] RDMA/rxe: Make pr_fmt work Yanjun.Zhu
2024-03-24 11:43 ` Greg Sword
2024-03-27 13:08 ` Jason Gunthorpe
2024-03-27 19:40 ` Zhu Yanjun
2024-04-04 14:59 ` Jason Gunthorpe
[not found] ` <7a2a41c2-c8ef-402d-933a-2b2d8a956207@linux.dev>
2024-04-04 18:03 ` Zhu Yanjun
2024-04-04 23:59 ` Jason Gunthorpe [this message]
2024-04-06 16:35 ` Zhu Yanjun
2024-04-08 14:08 ` Jason Gunthorpe
2024-04-02 17:45 ` Leon Romanovsky
2024-04-03 16:46 ` Zhu Yanjun
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=20240404235931.GA5792@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=yanjun.zhu@linux.dev \
--cc=zyjzyj2000@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