On Mon, 2019-08-05 at 11:07 +0200, Ilya Dryomov wrote: > On Fri, Aug 2, 2019 at 7:23 PM Jeff Layton <jlayton@xxxxxxxxxx> wrote: > > The preprocessor throws a warning here in some cases: > > > > In file included from fs/ceph/super.h:5, > > from fs/ceph/io.c:16: > > ./include/linux/ceph/ceph_debug.h:5: warning: "pr_fmt" redefined > > 5 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > | > > In file included from ./include/linux/kernel.h:15, > > from fs/ceph/io.c:12: > > ./include/linux/printk.h:288: note: this is the location of the previous definition > > 288 | #define pr_fmt(fmt) fmt > > | > > > > Since we do mean to redefine it, make that explicit by undefining it > > first. > > > > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx> > > --- > > include/linux/ceph/ceph_debug.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/include/linux/ceph/ceph_debug.h b/include/linux/ceph/ceph_debug.h > > index d5a5da838caf..fa4a84e0e018 100644 > > --- a/include/linux/ceph/ceph_debug.h > > +++ b/include/linux/ceph/ceph_debug.h > > @@ -2,6 +2,7 @@ > > #ifndef _FS_CEPH_DEBUG_H > > #define _FS_CEPH_DEBUG_H > > > > +#undef pr_fmt > > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > > > #include <linux/string.h> > > Hi Jeff, > > Looks like fs/ceph/io.c is a new file you are working on? ceph_debug.h > should be included at the top of every file. > > Thanks, > > Ilya Yes, io.c is a new file I'm working on, though I had seen something similar when working on the tracepoints that I posted recently. If I include ceph_debug.h first though, this does go away though, so I'll drop this patch then. Thanks, -- Jeff Layton <jlayton@xxxxxxxxxx>