From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from devianza.investici.org (devianza.investici.org [198.167.222.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD162305057 for ; Tue, 28 Jul 2026 20:21:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.167.222.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785270078; cv=none; b=DsLqKaO3wWC4Eugsyw87x4YIxr2cZaJL5lzts/06ezzNB78wuhD5NcPlRybCj9jqj8kdAYmG0hMAHCGhT4i0c74kHjCIikGRaB9knvpsr0MGHr6VxTgnZj2FVYfskWXL7A54IrhyHwwpQeu8Guym6tfmLS13Kzj5T/W1lrhxQ3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785270078; c=relaxed/simple; bh=gyeQzOfsbo2g19gIoOVRuTFJJnFgakedC2yr9QrpNuk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p5h7IYlze9NsdDjgwaV2yvrWN+0mexAeyj/GesmEiE1tjrebTJ9L4LeawVzuFL2j4UTHAxfsbQEeCquhS0DIKT4yE28ffOfm9THfiBUN+GWvxo2j4EdZPwMAgDdmk1BIiVtNWUhGkAPrVGzQgfhaRhREeII3LVCh/FCswkOAtdQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=grrlz.net; spf=pass smtp.mailfrom=grrlz.net; dkim=pass (1024-bit key) header.d=grrlz.net header.i=@grrlz.net header.b=EyrWxOPs; arc=none smtp.client-ip=198.167.222.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=grrlz.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=grrlz.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=grrlz.net header.i=@grrlz.net header.b="EyrWxOPs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=grrlz.net; s=stigmate; t=1785270067; bh=kisCW2Z2MZh3HeJJrGv63mjB0RMWwgK7CVK+R4FZNTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EyrWxOPsT6EoM5L0BSsArpZ23M0Ez42380Tu2DL9zHIUK7uD1lFuKAeLvUVL2fuFt uqhX49/gon7VYYnAiDUe8lYK9h6zhEKlp90oUV1Twd4TtyJfnPUxLPcr3qOiyy6KpM CsaK9vfT02v59+rG2v+mTUrE/Ov/FlXmsuSk0yeY= Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4h8n0g2QtPz6vMF; Tue, 28 Jul 2026 20:21:07 +0000 (UTC) Received: by mx2.investici.org (Postfix) id 4h8n0f6Kgwz4y43; Tue, 28 Jul 2026 20:21:06 +0000 (UTC) From: Bradley Morgan To: Balbir Singh , Andrew Morton Cc: linux-kernel@vger.kernel.org, Bradley Morgan Subject: [PATCH 1/2] taskstats: drop the dead NULL attribute check in parse() Date: Tue, 28 Jul 2026 20:21:03 +0000 Message-ID: <20260728202104.17839-2-include@grrlz.net> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260728202104.17839-1-include@grrlz.net> References: <20260728202104.17839-1-include@grrlz.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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