mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bradley Morgan <include@grrlz.net>
To: Balbir Singh <bsingharora@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Bradley Morgan <include@grrlz.net>
Subject: [PATCH 1/2] taskstats: drop the dead NULL attribute check in parse()
Date: Tue, 28 Jul 2026 20:21:03 +0000	[thread overview]
Message-ID: <20260728202104.17839-2-include@grrlz.net> (raw)
In-Reply-To: <20260728202104.17839-1-include@grrlz.net>

taskstats_user_cmd() only calls the cpumask handlers after checking the
same info->attrs[] entry, so parse() never sees a NULL attribute. Drop the
check and its odd "return 1", which no caller tested for anyway.

No functional change.

Signed-off-by: Bradley Morgan <include@grrlz.net>
---
 kernel/taskstats.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index bca91c394793..e7f8e1b5d1bc 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -361,8 +361,6 @@ static int parse(struct nlattr *na, struct cpumask *mask)
 	int len;
 	int ret;
 
-	if (na == NULL)
-		return 1;
 	len = nla_len(na);
 	if (len > TASKSTATS_CPUMASK_MAXLEN)
 		return -E2BIG;
-- 
2.47.3


  reply	other threads:[~2026-07-28 20:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 20:21 [PATCH 0/2] taskstats: tidy up the cpumask command path Bradley Morgan
2026-07-28 20:21 ` Bradley Morgan [this message]
2026-07-28 20:21 ` [PATCH 2/2] taskstats: fold the two cpumask handlers into one Bradley Morgan

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=20260728202104.17839-2-include@grrlz.net \
    --to=include@grrlz.net \
    --cc=akpm@linux-foundation.org \
    --cc=bsingharora@gmail.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®