From patchwork Thu Jul 13 10:49:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 107667 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2053764qge; Thu, 13 Jul 2017 03:54:58 -0700 (PDT) X-Received: by 10.84.193.129 with SMTP id f1mr9362500pld.158.1499943297985; Thu, 13 Jul 2017 03:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499943297; cv=none; d=google.com; s=arc-20160816; b=A5Fq5xMkB6u1XDFqN/kF5B31IGh/iUxqbx1BMcG3QBd8zuElfNty/OacG7u3a5+qM9 LLMOiqUdMJ5HQ7UpiLm1AHyc3WVqfp6E/v+oGkyF/Tu5S3/QkyXTUF/bSjfJwARxTSG4 1SXzl8LKTogICP0q4ao1XvJV1+lzFSTc3JnutzgJDrJjM0gH4TUJbq085Nde/X82MIBH YdYEDpqFVTQtHTQSzz1CVUh2gnEU1GtlImhdOXcnaYZKeYcRjlil3pDo3cZkhy1yFz5M rIkCFYJwUTKCy44nlj4W2BKZlSRM1Qrw0udJqWMCmpt/ojCmSGVjFBzQ3TTppYb3KsZ9 iM0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=lSqfh/7GnU7yXtOkchc6R+CVRLk/JhUZqbQirP3dnI4=; b=MXFY7N7ZwadvTpRnAw9lAxqjdxT74w0nV2uua2t+1H/Za3yrNBRen8UZQJKLf+8KIu U7MLEjKHe/mLeCvDnkzvt3yfySbQOG8jBN72IHaW5CZysgGOnAO9tpnk1vNaCbLRGTtU b0m3qC3UotVWOPxyJeZ2tlnrdVpXHDD4RreYGtuNbg0DpV2GatWfgEJtnH++rayIEzoG e+7bdrNLxr34DdfuN7PeGWriNlkv8TmIzZswjdP6vmC1rDrbU9jkREDPUcxT1iiTDU7z dFpL+j30EUhqFKtaHRm8+ezENUpb7QhrS4uw4Eg8DEV4159jwkPhNq77adoTghqfgtkC tGnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z74si3963766pff.289.2017.07.13.03.54.57; Thu, 13 Jul 2017 03:54:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751330AbdGMKyo (ORCPT + 25 others); Thu, 13 Jul 2017 06:54:44 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:8915 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbdGMKyn (ORCPT ); Thu, 13 Jul 2017 06:54:43 -0400 Received: from 172.30.72.54 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.54]) by dggrg03-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ARB12038; Thu, 13 Jul 2017 18:51:26 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Thu, 13 Jul 2017 18:51:19 +0800 From: Kefeng Wang To: Bjorn Helgaas , CC: David Woodhouse , Kefeng Wang Subject: [PATCH] pci: remove unused res in pci_resource_io Date: Thu, 13 Jul 2017 18:49:40 +0800 Message-ID: <1499942980-95496-1-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.596750AF.0002, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 04c0f693773fea1fdb29fac38b9d7c81 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After commit dca40b186b75 ("PCI: Use BAR index in sysfs attr->private instead of resource pointer"), no need res variable, kill it. Signed-off-by: Kefeng Wang --- drivers/pci/pci-sysfs.c | 3 --- 1 file changed, 3 deletions(-) -- 1.8.3.1 diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 2f3780b..0e43705 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -1211,11 +1211,8 @@ static ssize_t pci_resource_io(struct file *filp, struct kobject *kobj, { struct pci_dev *pdev = to_pci_dev(kobj_to_dev(kobj)); int bar = (unsigned long)attr->private; - struct resource *res; unsigned long port = off; - res = &pdev->resource[bar]; - port += pci_resource_start(pdev, bar); if (port > pci_resource_end(pdev, bar))