Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp355544pxb; Wed, 27 Oct 2021 04:21:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1JAfLdCoz+luAUyzxwHfJxP14/rxo+jehgAoFPxbeWAXUGUbPVSr/kvRWxii8DlIThPGJ X-Received: by 2002:a63:e00b:: with SMTP id e11mr23506119pgh.190.1635333715932; Wed, 27 Oct 2021 04:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635333715; cv=none; d=google.com; s=arc-20160816; b=D4jb5rOez7/o9Phd7V58LyN8WxTc1Z94Yk9uZfWbH6DspqW04NQzYojLdzlSqeJTPR jHChFU3AJrpVXsOM920gtTr2kaGDqE8A0n8zDaL5fiJf2Jfq7CVJHfiVjr6dz5fb0e3W dwtob25H/07Yh2OF16fBigpWrj4iYfSmVYPr5WsxehP6o1DJxXipQTpFr5OxwmuRgX+6 wW6HQQoGCfuglvPzvXP2yqMaKWS8BxxILkFzxZmK9UQU3SMhO8i11eFRkIMKbnwNQyJR 5ekNNH409TsQScqUmTx7R2QjksBWqEFDtcZCOdAwCludmhnb0rP/IA6pcZ1FSuAkBaJN VP/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=qHA1dduwBzJ0OW0PQlfCNcvS/ao6MgiYWYVIOo0TtNA=; b=wAPhH16Id+z+el6T37BAPO8/zX073V4hFB+tBmhMIZ9vuugb8o0RRJ5IcTi2W+KYGu OzQBmnlQDooarWwPWmg3pnPB75BCZlzzAigFNLtWQQqvRcPg40xsq9a4jbQw9KUKIEtx qqz4C4KN5vmXpeCzIA5zNEXigvSnExRMoYLS2w+LFV3buvaiF5hfqKLiuid65rQXsgK4 r1Y1LtckGXEfDpQcM7BwhxUYLp+hM/4p6+kt5jjK3XInTICjmoB+ePPRQo6RnuU3wa7W nyPfvW1GUaECre7XY/oEgHFNkKFwlnRor4oChCRGZLW3AwBC6dDI5jm3lCFOMSyRHE7e k1Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aAdJL3R6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si9728495pgq.26.2021.10.27.04.21.43; Wed, 27 Oct 2021 04:21:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aAdJL3R6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239651AbhJZVii (ORCPT + 99 others); Tue, 26 Oct 2021 17:38:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:59932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239682AbhJZViZ (ORCPT ); Tue, 26 Oct 2021 17:38:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2E71860E8B; Tue, 26 Oct 2021 21:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635284161; bh=huHOq3qPce2MozjKdd043JAI+SHWVUUw15CzyMPZhJM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=aAdJL3R6ihlnTL7eSG/MT6fP9CtWwOm9xv5cZXuQWA8aKLL7JqoQP1KXEeA3nmpnv w3gtEtbuZLdp5k0PCB8lgC8PafetVmtwVnWS51X6seHCAWhlhbIbCTtsit1sDO5mwq VfN3Ww8PPq24ztxXK4RWEosiyCXR69XJC5FzuZswK0TPmSIhK/pgOGqNfrVQe0hr/n 18SRBCTtjKUQzDjrFvBH1N0rMWahfBK1yTsg/Yr4P3hZkgd1FZ+mltioZTNdDig69K Xpd2DJRwXPUJ/xN5uuqFMI8goDt4neOvYnidqDLj+X4/KXMzI/IM+l4+N3JrDZ31XY ZPppp79qdwlcA== Date: Tue, 26 Oct 2021 16:35:59 -0500 From: Bjorn Helgaas To: Colin King Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: Remove redundant initialization of variable rc Message-ID: <20211026213559.GA169971@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210910161417.91001-1-colin.king@canonical.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 10, 2021 at 05:14:17PM +0100, Colin King wrote: > From: Colin Ian King > > The variable rc is being initialized with a value that is never read, it > is being updated later on. The assignment is redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Applied with Krzysztof's reviewed-by to pci/misc for v5.16, thanks! > --- > drivers/pci/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index ce2ab62b64cf..cd8cb94cc450 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -5288,7 +5288,7 @@ const struct attribute_group pci_dev_reset_method_attr_group = { > */ > int __pci_reset_function_locked(struct pci_dev *dev) > { > - int i, m, rc = -ENOTTY; > + int i, m, rc; > > might_sleep(); > > -- > 2.32.0 >