From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>
Cc: linux-kernel@vger.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH v2] tty: audit: remove unused variable
Date: Wed, 24 Feb 2016 16:45:09 +0530 [thread overview]
Message-ID: <1456312509-21904-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)
While building with W=1 we were getting build warning:
drivers/tty/tty_audit.c:149:16: warning: variable 'sessionid' set but not used
The local variable sessionid was only assigned the value of
current->sessionid but was never reused. On further inspection it turned
out that there is no need of audit_get_loginuid() also.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
v2: audit_get_loginuid() also removed.
drivers/tty/tty_audit.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c
index 66d53fc..df2d735 100644
--- a/drivers/tty/tty_audit.c
+++ b/drivers/tty/tty_audit.c
@@ -144,14 +144,8 @@ void tty_audit_tiocsti(struct tty_struct *tty, char ch)
if (tty_audit_push())
return;
- if (audit_enabled) {
- kuid_t auid;
- unsigned int sessionid;
-
- auid = audit_get_loginuid(current);
- sessionid = audit_get_sessionid(current);
+ if (audit_enabled)
tty_audit_log("ioctl=TIOCSTI", dev, &ch, 1);
- }
}
/**
--
1.9.1
next reply other threads:[~2016-02-24 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 11:15 Sudip Mukherjee [this message]
2016-03-01 16:10 ` Peter Hurley
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=1456312509-21904-1-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.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®