From nobody Sun Oct 5 00:07:03 2025 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (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 B7B191DFDAB for ; Mon, 11 Aug 2025 16:40:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754930458; cv=none; b=QafqyiDT2wiVyEv9HNWCfQuVz16FKEENwKa8oi97q5xCdQKL5mCj5SgHwn2VDmTdyhSXuHW5IV+prbAEYgZlz+FLoWV24K+GjszEjvPNd4oZz6Ct4nGZer/vI6IgrmwebBGRjazfjcA3IpeFp9NzOUOIibaLhrzKExPRkt+Uzmc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754930458; c=relaxed/simple; bh=lrErPlSj13yeFJFUN8Q+kC49+CUkgmgYn8aKCHsxA4Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PGVRs/7CSq5YqT1X45CIMJctRtsE81Ly58kwoz+9n2wg0U7P/xTd1vnEtDtN3qPkXjfXlqbHhnQcwVPCRYrlXrM4dCvGvV+HPlFgaMB88oBKoQdPkYBrRb7+DvNqSELkzqif9Ab+Hod9x52ZRuCKGXz8iQXeOzBeiM3sTlUxTPM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=de/EJevO; arc=none smtp.client-ip=95.215.58.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="de/EJevO" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1754930454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=KNDajDqdLKrAEXDEBtkk4JWlF60OExIU365++ZNVha8=; b=de/EJevOJMu6noS+TC2khMQmxZEZYD++D2WCoMRVnIueEVBjT0eZ6IshQFPcxYsTu1XC2h myv7TLHmSR0Q6XtSIwxxAvLiMaHgW0VFUj3HVH20Wc7QOmVYvmWXLXHO0cROKYrFoHkXHf uG7WNFN/xX7JluXTCIUpBo+d901c0ZM= From: Thorsten Blum To: Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman Cc: Thorsten Blum , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net/sched: Remove redundant memset(0) call in reset_policy() Date: Mon, 11 Aug 2025 18:40:38 +0200 Message-ID: <20250811164039.43250-1-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" The call to nla_strscpy() already zero-pads the tail of the destination buffer which makes the additional memset(0) call redundant. Remove it. Signed-off-by: Thorsten Blum Reviewed-by: Joe Damato --- net/sched/act_simple.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index f3abe0545989..8e69a919b4fe 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c @@ -72,7 +72,6 @@ static int reset_policy(struct tc_action *a, const struct= nlattr *defdata, d =3D to_defact(a); spin_lock_bh(&d->tcf_lock); goto_ch =3D tcf_action_set_ctrlact(a, p->action, goto_ch); - memset(d->tcfd_defdata, 0, SIMP_MAX_DATA); nla_strscpy(d->tcfd_defdata, defdata, SIMP_MAX_DATA); spin_unlock_bh(&d->tcf_lock); if (goto_ch) --=20 2.50.1