On Wed, Mar 27, 2024 at 08:40:54PM +0100, Zhu Yanjun wrote: > > 在 2024/3/27 14:08, Jason Gunthorpe 写道: > > On Sat, Mar 23, 2024 at 09:31:39AM +0100, Yanjun.Zhu wrote: > > > From: Zhu Yanjun <yanjun.zhu@xxxxxxxxx> > > > > > > If the definition of pr_fmt is before the header file. The pr_fmt > > > will be overwritten by the header file. So move the definition of > > > pr_fmt to the below of the header file. > > what header file? > > include/linux/printk.h > > 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. Jason