在 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.
I made a simple checks. In about 130 header files, this pr_fmt is defined.
Zhu Yanjun
Jason