Re: [PATCH 1/1] RDMA/rxe: Make pr_fmt work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux