Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1258540rdb; Fri, 19 Jan 2024 13:13:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQyvr2ifZLchdopnGbMf1j0GuePVx8MZhCkxJvFqXNRBMO0mAj9LH04bBEFN4zG4SUFkLv X-Received: by 2002:a05:6a00:2788:b0:6db:c6b1:aa5c with SMTP id bd8-20020a056a00278800b006dbc6b1aa5cmr435890pfb.34.1705698793559; Fri, 19 Jan 2024 13:13:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705698793; cv=pass; d=google.com; s=arc-20160816; b=SuP+yJvR/PKLUbTbN5pnzCl2oFlufd4oRgC1Jexk9UaIzpo2nfgaDCOfF/xiPFgTC5 UQXtzO66X+GaruJReHmWOwkEnrt2lCR46eBD+ZSl01n2RsvMHQXExlW/F7ONlZOHoGfl RZcBzEsoE+UXeXNS6gY+QL2y2+bnOQYbVl1SpFumY+tkIvlCF/4oRNQTpEk0fQassQIw GGeVTiMoBXhfitfttCPQ+DhOpwf2G2c31Y8RgJsqQVxtl6b67dudrH72V8Ze1mS+sQ+I 2y6fnUTqY9t621vBrUEXCcreAqM6B6nDRdlXon/2WuqXivZqyzO891CYDYp+NKLrH1Yi dGFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=fobi/c23MKEH7jqFdn8riQnk+GJRGAE8FvOvCQX5GaE=; fh=vsHW3w5lhrWZ0M8wlWEM4RaqZeoZIcyUODWWf5YBt08=; b=AywuqjcxmKJDIeyEnYWQaQcmFoK7MH0rL3FrmCsqQ0Gz7RzD5QfjKLusxCP3dKk4QA QjLmB2la5J8YWsAc2dTAEeC6HXMNjQSkb7IBhtxub4mzX1V8oD1Tb/GCbLxZzKXBRas4 N0+JbLaBIMVltsUHQv/z/7Av5Sw6oaQOy6BdkfizU4bjPWLb/qaK4/OHp+qf5jwmpRzC QFeDliB0ilJIZXIC21Bth3lGC8HF9X3fm9TLv3dlGyEWRAEM+7Qc5To+CjJBExJJi6/p RlhEiihtn1OSsDeJdo26F53vL7nNnDF9HWXw0y2eseMdhGrqaHv+G7YoYzXP18wo/swd diAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jmmPcA50; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-1501-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 207-20020a6302d8000000b005bdfbf1d562si3799961pgc.192.2024.01.19.13.13.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 13:13:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1501-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jmmPcA50; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-1501-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 10294B22CAC for ; Fri, 19 Jan 2024 21:13:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F362458100; Fri, 19 Jan 2024 21:13:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jmmPcA50" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A4EF857888; Fri, 19 Jan 2024 21:13:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705698782; cv=none; b=HkQxKsVlFWWu40uSUCACddfAN2Ftmtq2A4cAJGS4qI9UZgUOiKCTVSTfa83BB+9mpBdsD8cjV/3JK6eTH6xEnwOENTM+0UGfwYH2OAveeJtqASjIS+ttXKBAO439fdYc5Wqw8U0Zgn4A+Q2DmLejsvY1EAUmTPSSRuNLIwyxG7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705698782; c=relaxed/simple; bh=K5XRA4pHgspNItWgN06atRk3dlBp3RHa7wRvvR+DpcI=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=BkNAGy8iGELReRS122n53hrWa3WTExiO23CVQ8fI5Wt8Ejfqkgqbb6qElVy1ms2DE4K/JIRlNcmNNihE0QGv5qKScAjvNqHFV7KnflBBDOS7djF5QHT8hw28F+x3rrd+m+p9vgF8vJMlYbNK3dhr0qrfN+0VD2szgAMbE50fd+A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jmmPcA50; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79A4AC433C7; Fri, 19 Jan 2024 21:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705698782; bh=K5XRA4pHgspNItWgN06atRk3dlBp3RHa7wRvvR+DpcI=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=jmmPcA50gLbqSB8r+VHjTHJbVd2EdfI8cUj6CWJcZR+McJ6OYl/pezGaDfOWzqVZT 36nzUu3nIh1yAX5W74v9uT0P0SU3s8SsJbAMFf/IvlkKBaFEtvABuorRjdMDO/mTZp ffTFoD5vtDwi9KbjHz1BNBqbgQDMqwH7m9pSK9VJ30aRKFAirf5RoF+LKZPywCvjAc hRFVK8y/FK6qB4odZILqQIMTPHOZLwdfusTxCAbQ/Okwh6Dn3EMpI5AQxJDSQSLnaQ IPsiFYIW2ed4l68VMhRKjguD7WEt7rG4VGlFCqdZzVEFk7mQPyRVKwcM/BKYXxoAjd qVT17ntQRADJA== Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 19 Jan 2024 21:12:58 +0000 Message-Id: Cc: , Subject: Re: [PATCH][next] crypto: asymmetric_keys: remove redundant pointer secs From: "Jarkko Sakkinen" To: "Colin Ian King" , "David Howells" , "Herbert Xu" , "David S . Miller" , , X-Mailer: aerc 0.15.2 References: <20240118120745.2519762-1-colin.i.king@gmail.com> In-Reply-To: <20240118120745.2519762-1-colin.i.king@gmail.com> On Thu Jan 18, 2024 at 12:07 PM UTC, Colin Ian King wrote: > The pointer secs is being assigned a value however secs is never > read afterwards. The pointer secs is redundant and can be removed. > > Cleans up clang scan build warning: > warning: Although the value stored to 'secs' is used in the enclosing > expression, the value is never actually read from 'secs' > [deadcode.DeadStores] > > Signed-off-by: Colin Ian King > --- > crypto/asymmetric_keys/verify_pefile.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/crypto/asymmetric_keys/verify_pefile.c b/crypto/asymmetric_k= eys/verify_pefile.c > index f440767bd727..2863984b6700 100644 > --- a/crypto/asymmetric_keys/verify_pefile.c > +++ b/crypto/asymmetric_keys/verify_pefile.c > @@ -28,7 +28,7 @@ static int pefile_parse_binary(const void *pebuf, unsig= ned int pelen, > const struct pe32plus_opt_hdr *pe64; > const struct data_directory *ddir; > const struct data_dirent *dde; > - const struct section_header *secs, *sec; > + const struct section_header *sec; > size_t cursor, datalen =3D pelen; > =20 > kenter(""); > @@ -110,7 +110,7 @@ static int pefile_parse_binary(const void *pebuf, uns= igned int pelen, > ctx->n_sections =3D pe->sections; > if (ctx->n_sections > (ctx->header_size - cursor) / sizeof(*sec)) > return -ELIBBAD; > - ctx->secs =3D secs =3D pebuf + cursor; > + ctx->secs =3D pebuf + cursor; > =20 > return 0; > } Reviewed-by: Jarkko Sakkinen BR, Jarkko