audit: rename struct node to struct audit_node to prevent future name collisions
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 3 Sep 2021 15:48:22 +0000 (15:48 +0000)
committerPaul Moore <paul@paul-moore.com>
Mon, 13 Sep 2021 20:17:30 +0000 (16:17 -0400)
commit57d4374be94aa27712fbcb2f0fa2a30802c43556
treedc98528e2c5c15531fdfd74925d03dde6059a51c
parent6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f
audit: rename struct node to struct audit_node to prevent future name collisions

Future work in the powerpc code results in a name collision with the
identified "node" as struct node defined in kernel/audit_tree.c
conflicts with struct node defined in include/linux/node.h (below).
This patch takes the proactive route and renames the audit code's
struct node to audit_node.

  CC      kernel/audit_tree.o
kernel/audit_tree.c:33:9: error: redefinition of 'struct node'
   33 |  struct node {
      |         ^~~~
In file included from ./include/linux/cpu.h:17,
                  from ./include/linux/static_call.h:102,
                  from ./arch/powerpc/include/asm/machdep.h:10,
                  from ./arch/powerpc/include/asm/archrandom.h:7,
                  from ./include/linux/random.h:121,
                  from ./include/linux/net.h:18,
                  from ./include/linux/skbuff.h:26,
                  from kernel/audit.h:11,
                  from kernel/audit_tree.c:2:
./include/linux/node.h:84:8: note: originally defined here
   84 | struct node {
      |        ^~~~
make[2]: *** [kernel/audit_tree.o] Error 1

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
[PM: rewrite subj/desc as the build failure is just a RFC patch]
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit_tree.c