Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1079763rdb; Fri, 16 Feb 2024 05:00:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWwom+JJxdv1az9Vtq6wdQIQIXnncgfeC3lPLkpODuwU3nkZb+3/TXQWT+mu5KO8CXJFX/wL3YSt7q8Iw98yO9IsM0WDDWy+FzNMYgQIg== X-Google-Smtp-Source: AGHT+IG7YUw6RjCp5nSJzHETn0t5Md0ECHeYQPGdMCiW5KQ+Pkf54I5rddCm/MZoadc2s7kV/ZiS X-Received: by 2002:a05:6402:b23:b0:562:6185:af1b with SMTP id bo3-20020a0564020b2300b005626185af1bmr3618674edb.25.1708088445348; Fri, 16 Feb 2024 05:00:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708088445; cv=pass; d=google.com; s=arc-20160816; b=OkR6BXUiKDx5vm8zAxDWyUQIHtoqQDIYhK1pJ+2p7ANmpMSC2SsJZ+5k2xmv2XGh9+ eLqRqG0kqJHP5S6ZTcQP8OT5SrCy6touN95vyTDS+sAgir0opGWQZCBQPfe7XUziOlP1 nMjdaoPp5X1+y4WZkH7Nlkrx5ZFwBSoMVX+9hJhXHyb7n1FbZlrAPlDvFUSbq+gLeiH2 gkFwJ/Ox1q56iNruzT8onL9njh8+lJ9i7k9j2gjnY9sH8dpLfLFixvCYhbJlPgbqVXK5 5hZgBU8yOW274GUYJcxKZy5CKghzqDMRCP69QEuStBW0snd+eMPvs9IkKPbMt7717g/d zp/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=cj9qHpnR2tZ5jt/5wBKldh4E6F0wiDuhfNceA+AIwtM=; fh=fzByxhWGrYamSg9l2t1cACe/xxu5hfTTSbza5dabv48=; b=PoCoELHbzxVrrCBTqFkNHEeMynujwH/Uypl35+tf/pdeWEDiOQ1vMdPJW2YFiFcH42 gbmSku7Wxj+RxqGj4nfWD4ukFEFqVX1FGMHvVTWi8WA2HWRx5iTo4d3twTOiR+/wkJrV uY3N0M+sSAghpCP7QpbLUTHKeTxiZidJaBFcDRcU8UajHetGwWtQggfp+iLpQ06qF20u D87XYeR4B8jtdtOhQNmbl3WaWU/pS1axzoZOCiSQpxRpyYFnNND8fMmg+kuwAs3r8n/c PvuWWzx9N8oaI09bJ8bLIrNHrzo5wzdJSXS6ZT7Fl2BbzvfniJPYBjHeU6TxT2wjl702 8uzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=PXlgCRLx; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-68605-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68605-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e12-20020a056402148c00b00563e95df237si619872edv.121.2024.02.16.05.00.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 05:00:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68605-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=PXlgCRLx; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-68605-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68605-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 12E191F26560 for ; Fri, 16 Feb 2024 13:00:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 910571292E1; Fri, 16 Feb 2024 13:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="PXlgCRLx" Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 047E977F25 for ; Fri, 16 Feb 2024 13:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708088422; cv=none; b=tnr9kQylzKPsoVBLHMJYT3Tp+qpvONj6qGQCli5c8Vn7FGB4mjEN5GG1qrSPj4EffE9G79szAjxqrFUuNpwPcfy9dda56ZLocWZlvzmzGXmb2eCRsvz7ANAqlq6eg9ZoTteewCNLeYBolfsT/MkRBo+0KWK5/elgZmCXnKy2oWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708088422; c=relaxed/simple; bh=Q9FiHqnCHL3E9ZvpPaMJlycI3lYQXhzRD9PL8gpGn8A=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=s7deCAsWKzk2A8wQBouVKOimJpoVv8HOAdS3TmKUBd2WcBFpOnz1N//r6PtB8zhltnShcqlAwY56SBsY0K2GuKLaI1h4tDkn4RBIzEU8OUk8mlRcyrrDgvtQQexNkBhhrPp2ZsYW6eE2YBbMp+UC32JLYFVrlNKI/sFbK3p73gI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=PXlgCRLx; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-563dd5bd382so8725a12.1 for ; Fri, 16 Feb 2024 05:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708088419; x=1708693219; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cj9qHpnR2tZ5jt/5wBKldh4E6F0wiDuhfNceA+AIwtM=; b=PXlgCRLxxS/FGlYm89xP7uMKPvWqH+M1p3ZP8ZMWF46ULy7hA0GhUT38lVg+j2pMn2 kJn8UWHcuBcm1/nD4UGjCjfIKvsHkQpDh4kNkKhCu2eeBejlM9ZIXijxfyGgRp2OBGJf HaKHXLehSdttdDs5Ppt9LwR6Pq9WLgAEDcC/R3BwMGgNzVJxP6fMwfFGN8/QSbmL83+a 67BoT+Q4Zm3pnBe6ZAHb0y4fyyWJwZzx/LWfvrCQ2Rfbz+401LXH/z6APb2rahajrAta CFsWH5YbXvC+j2Q8LnLEc4LE1dFgGwCNkUwyXKWCm7xJ5yintfQTVAdHEq6HW1xTymfK KD0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708088419; x=1708693219; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cj9qHpnR2tZ5jt/5wBKldh4E6F0wiDuhfNceA+AIwtM=; b=b2ab4OaBcj8qSSCyGPLrgRraFescqG4+E1Ro2u9M9hblv+DFqbeIOgSLV92tPcJ2/2 2jelmBE3fXa0rXd74+9YL4uotDDrvvWna3UwRqrOYzNzo4IHfq+6RhAvXwu+xfVdhw2I esDR1hwwX9oFwHHyrNvLOnGkzWPQ/Fws/BkocKufFyPwOXMcNqHHeoSliQ/wM2GNmGEU 2pCTePdX+RTYdti4gwxmCzIuibd4u91Te0x4FMjG+blwomqNTrqDSs9CgTNxpEMOrEI4 YcQA0ZLKuFZ3FbpNtpNsDTig/AREf6OfORr1Bt6L+uj41ZsHmLKOw3pv8ErXtzECrkWW LhUw== X-Forwarded-Encrypted: i=1; AJvYcCV+ts8zzofz3joGZNjEGTRHGgVa6LTlSKTWLZUkXJNyVmCG6mt5kluZZ6ok7VfKOulSaOAUSlMmo/pq5AJFlyLbtmH4N2+biCU5MRs2 X-Gm-Message-State: AOJu0Ywp6BSsh106cvexoQxF+UgDGYoXBmQQ0XvkWpuIhQk4e8f9GDtv /egFG49H1UgpNGKGDQ5+LIfsUhORTfQBmTpXWNBzydqWy5Q6Z4ie9yrKGWM0w8AfcdqYnfpgNPE 9h9Cx9fD194BjGSt5aMtd63Fi8UmXhU3gUoFY X-Received: by 2002:a50:d65a:0:b0:560:e82e:2cc4 with SMTP id c26-20020a50d65a000000b00560e82e2cc4mr188151edj.3.1708088418945; Fri, 16 Feb 2024 05:00:18 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240216125443.2107244-1-colin.i.king@gmail.com> In-Reply-To: <20240216125443.2107244-1-colin.i.king@gmail.com> From: Eric Dumazet Date: Fri, 16 Feb 2024 14:00:04 +0100 Message-ID: Subject: Re: [PATCH][next] net: tcp: Remove redundant initialization of variable len To: Colin Ian King , Dmitry Safonov <0x7f454c46@gmail.com> Cc: "David S . Miller" , David Ahern , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 16, 2024 at 1:54=E2=80=AFPM Colin Ian King wrote: > > The variable len being initialized with a value that is never read, an > if statement is initializing it in both paths of the if statement. > The initialization is redundant and can be removed. > > Cleans up clang scan build warning: > net/ipv4/tcp_ao.c:512:11: warning: Value stored to 'len' during its > initialization is never read [deadcode.DeadStores] > > Signed-off-by: Colin Ian King > --- > net/ipv4/tcp_ao.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/ipv4/tcp_ao.c b/net/ipv4/tcp_ao.c > index 87db432c6bb4..3afeeb68e8a7 100644 > --- a/net/ipv4/tcp_ao.c > +++ b/net/ipv4/tcp_ao.c > @@ -509,9 +509,9 @@ static int tcp_ao_hash_header(struct tcp_sigpool *hp, > bool exclude_options, u8 *hash, > int hash_offset, int hash_len) > { > - int err, len =3D th->doff << 2; > struct scatterlist sg; > u8 *hdr =3D hp->scratch; > + int err, len; > > /* We are not allowed to change tcphdr, make a local copy */ > if (exclude_options) { > -- > 2.39.2 > Cc Dmitry Safonov Dmitry, can you take a look ? Thanks !