public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Atul Kumar Pant <atulpant.linux@gmail.com>
To: paul@paul-moore.com, eparis@redhat.com
Cc: Atul Kumar Pant <atulpant.linux@gmail.com>,
	audit@vger.kernel.org, linux-kernel@vger.kernel.org,
	shuah@kernel.org
Subject: [PATCH v1] kernel: auditsc: Removes use of assignment in if condition and moves open brace following function definitions to the next line.
Date: Wed, 16 Aug 2023 02:16:44 +0530	[thread overview]
Message-ID: <20230815204644.52358-1-atulpant.linux@gmail.com> (raw)

The patch fixes following checkpatch.pl issue:
ERROR: open brace '{' following function definitions go on the next line
ERROR: do not use assignment in if condition

Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com>
---
 kernel/auditsc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index a674039ea9ef..d88ebc911277 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -880,7 +880,8 @@ static void audit_filter_syscall(struct task_struct *tsk,
  */
 static int audit_filter_inode_name(struct task_struct *tsk,
 				   struct audit_names *n,
-				   struct audit_context *ctx) {
+				   struct audit_context *ctx)
+{
 	int h = audit_hash_ino((u32)n->ino);
 	struct list_head *list = &audit_inode_hash[h];
 
@@ -1064,7 +1065,8 @@ int audit_alloc(struct task_struct *tsk)
 		return 0;
 	}
 
-	if (!(context = audit_alloc_context(state))) {
+	context = audit_alloc_context(state);
+	if (!context) {
 		kfree(key);
 		audit_log_lost("out of memory in audit_alloc");
 		return -ENOMEM;
-- 
2.25.1


             reply	other threads:[~2023-08-15 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15 20:46 Atul Kumar Pant [this message]
2023-08-15 22:10 ` [PATCH v1] kernel: auditsc: Removes use of assignment in if condition and moves open brace following function definitions to the next line Paul Moore
2023-08-15 22:14   ` Paul Moore
2023-08-16  2:58     ` Atul Kumar Pant

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=20230815204644.52358-1-atulpant.linux@gmail.com \
    --to=atulpant.linux@gmail.com \
    --cc=audit@vger.kernel.org \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=shuah@kernel.org \
    /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