linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jules Irenge <jbi.octave@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jules Irenge <jbi.octave@gmail.com>,
	Paul Moore <paul@paul-moore.com>, Eric Paris <eparis@redhat.com>,
	linux-audit@redhat.com (moderated list:AUDIT SUBSYSTEM)
Subject: [RESEND PATCH 1/2] audit: change unnecessary globals into statics
Date: Mon,  3 Aug 2020 13:34:38 +0100	[thread overview]
Message-ID: <20200803123439.83400-2-jbi.octave@gmail.com> (raw)
In-Reply-To: <20200803123439.83400-1-jbi.octave@gmail.com>

Variables sig_pid, audit_sig_uid and audit_sig_sid
are only used in the audit.c file across the kernel
Hence it appears no reason for declaring them as globals
This patch removes their global declarations from the .h file
and change them into static in the .c file.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 kernel/audit.c | 6 +++---
 kernel/audit.h | 4 ----
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index b2301bdc9773..afd7827cf6e8 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -123,9 +123,9 @@ static u32	audit_backlog_limit = 64;
 static u32	audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME;
 
 /* The identity of the user shutting down the audit system. */
-kuid_t		audit_sig_uid = INVALID_UID;
-pid_t		audit_sig_pid = -1;
-u32		audit_sig_sid = 0;
+static kuid_t		audit_sig_uid = INVALID_UID;
+static pid_t		audit_sig_pid = -1;
+static u32		audit_sig_sid = 0;
 
 /* Records can be lost in several ways:
    0) [suppressed in audit_alloc]
diff --git a/kernel/audit.h b/kernel/audit.h
index ddc22878433d..3b9c0945225a 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -327,10 +327,6 @@ static inline int audit_signal_info_syscall(struct task_struct *t)
 
 extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);
 
-extern pid_t audit_sig_pid;
-extern kuid_t audit_sig_uid;
-extern u32 audit_sig_sid;
-
 extern int audit_filter(int msgtype, unsigned int listtype);
 
 extern void audit_ctl_lock(void);
-- 
2.26.2


  reply	other threads:[~2020-08-03 12:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0/2>
2020-01-30  0:28 ` [PATCH 0/2] Lock warning clean up Jules Irenge
2020-01-30  0:29   ` [PATCH 1/2] fs_pin: Add missing annotation to pin_kill() declaration Jules Irenge
2020-01-30  0:30   ` [PATCH 2/2] rcu/nocb: Add missing annotation for rcu_nocb_bypass_unlock() Jules Irenge
2020-01-31  0:59     ` Boqun Feng
2020-01-31  4:42       ` Paul E. McKenney
2020-04-29 22:57 ` [PATCH 0/2] Lock warning cleanup Jules Irenge
2020-04-29 22:57   ` [PATCH 1/2] cxgb4: Add missing annotation for service_ofldq() Jules Irenge
2020-04-29 22:57   ` [PATCH 2/2] spi: atmel: Add missing annotation for atmel_spi_next_xfer_dma_submit() Jules Irenge
2020-04-30 14:23   ` [PATCH 0/2] Lock warning cleanup Mark Brown
2020-04-30 14:41     ` Mark Brown
     [not found] ` <20200803122430.82364-1-jbi.octave@gmail.com>
2020-08-03 12:24   ` [PATCH 1/2] audit: change unnecessary globals into statics Jules Irenge
2020-08-03 12:24   ` [PATCH 2/2] audit: uninitialize variable audit_sig_sid Jules Irenge
2020-08-03 12:34 ` [RESEND PATCH 0/2] cleanups Jules Irenge
2020-08-03 12:34   ` Jules Irenge [this message]
2020-08-06 18:33     ` [RESEND PATCH 1/2] audit: change unnecessary globals into statics Paul Moore
2020-08-18  0:38       ` Paul Moore
2020-08-03 12:34   ` [RESEND PATCH 2/2] audit: uninitialize variable audit_sig_sid Jules Irenge
2020-08-06 18:35     ` Paul Moore
2020-08-18  0:38       ` 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=20200803123439.83400-2-jbi.octave@gmail.com \
    --to=jbi.octave@gmail.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;
as well as URLs for NNTP newsgroup(s).