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

Re: [PATCH] aufs: Do not refer to AUFS_NAME in pr_fmt

Ben Hutchings:
> Why, how often do you expect to change AUFS_NAME?

I don't know.
I just don't want call myself idiot when it happens.

> I think it would be much better to put this in fs/aufs/aufs.h and make
> each of fs/aufs/*.c include that first.

Yes, that is my another option I have considered.
Also I am considering to move AUFS_NAME back into aufs_type.h.

In aufs_type.h:
(at the top)
#define AUFS_NAME ...
#define pr_fmt ...
#include sched.h

and include aufs_type.h at the top of source files.

> The comment about sparse belongs immediately before the definition of
> pr_fmt.

Yes, I am changing like this.

--- a/fs/aufs/Makefile
+++ b/fs/aufs/Makefile
@@ -8,9 +8,10 @@ endif
 # cf. include/linux/kernel.h
 # enable pr_debug
 ccflags-y += -DDEBUG
+# sparse requires the fullpath
+ccflags-y += -imacros ${srctree}/include/linux/aufs_name.h
+ccflags-y += -include ${srctree}/include/linux/sched.h
 # sparse doesn't allow spaces
-ccflags-y += -imacros linux/aufs_name.h
-ccflags-y += -include linux/sched.h
 ccflags-y += -D'pr_fmt(fmt)=AUFS_NAME"\040%s:%d:%s[%d]:\040"fmt,__func__,__LINE__,current->comm,current->pid'
 obj-$(CONFIG_AUFS_FS) += aufs.o

J. R. Okajima

Reply to: