From: Alex Shi <alex.shi@linux.alibaba.com>
To: paul@paul-moore.com
Cc: Eric Paris <eparis@redhat.com>,
linux-audit@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH] audit: remove unused macros
Date: Fri, 6 Nov 2020 16:31:22 +0800 [thread overview]
Message-ID: <1604651482-9780-1-git-send-email-alex.shi@linux.alibaba.com> (raw)
Some unused macros could cause gcc warning:
kernel/audit.c:68:0: warning: macro "AUDIT_UNINITIALIZED" is not used
[-Wunused-macros]
kernel/auditsc.c:104:0: warning: macro "AUDIT_AUX_IPCPERM" is not used
[-Wunused-macros]
kernel/auditsc.c:82:0: warning: macro "AUDITSC_INVALID" is not used
[-Wunused-macros]
remove them to tame gcc.
Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: linux-audit@redhat.com
Cc: linux-kernel@vger.kernel.org
---
kernel/audit.c | 1 -
kernel/auditsc.c | 3 ---
2 files changed, 4 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index ac0aeaa99937..dfac1e0ca887 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -65,7 +65,6 @@
/* No auditing will take place until audit_initialized == AUDIT_INITIALIZED.
* (Initialization happens after skb_init is called.) */
#define AUDIT_DISABLED -1
-#define AUDIT_UNINITIALIZED 0
#define AUDIT_INITIALIZED 1
static int audit_initialized;
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 183d79cc2e12..eeb4930d499f 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -80,7 +80,6 @@
#include "audit.h"
/* flags stating the success for a syscall */
-#define AUDITSC_INVALID 0
#define AUDITSC_SUCCESS 1
#define AUDITSC_FAILURE 2
@@ -102,8 +101,6 @@ struct audit_aux_data {
int type;
};
-#define AUDIT_AUX_IPCPERM 0
-
/* Number of target pids per aux struct. */
#define AUDIT_AUX_PIDS 16
--
1.8.3.1
next reply other threads:[~2020-11-06 8:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 8:31 Alex Shi [this message]
2020-11-10 15:23 ` Richard Guy Briggs
2020-11-11 2:47 ` Paul Moore
2020-11-11 3:03 ` Richard Guy Briggs
2020-11-11 6:19 ` Alex Shi
2020-11-11 13:17 ` Richard Guy Briggs
2020-11-12 0:36 ` Alex Shi
2020-11-25 4:31 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1604651482-9780-1-git-send-email-alex.shi@linux.alibaba.com \
--to=alex.shi@linux.alibaba.com \
--cc=eparis@redhat.com \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®