Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: zyjzyj2000@gmail.com, leon@kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 1/1] RDMA/rxe: Make pr_fmt work
Date: Sat, 6 Apr 2024 18:35:21 +0200	[thread overview]
Message-ID: <ed9e2b80-0e0f-4628-9a57-e061acf9f4d5@linux.dev> (raw)
In-Reply-To: <20240404235931.GA5792@ziepe.ca>

在 2024/4/5 1:59, Jason Gunthorpe 写道:
> 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?

Got your point. There are about more 130 header files that define pr_fmt 
in the kernel include directory. And these header files are included one 
another. Is there any tool to clarify the including relationship between 
these header files?

Thanks a lot
Zhu Yanjun
> 
> Jason


  reply	other threads:[~2024-04-06 16:35 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
2024-04-06 16:35             ` Zhu Yanjun [this message]
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=ed9e2b80-0e0f-4628-9a57-e061acf9f4d5@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --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