Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp934947pxb; Fri, 22 Jan 2021 03:04:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnNpZL5Cuh3xrVjIhuSuawxGiuimoUisNi3XCZ8cVRMowhUensQvVbLHncLzoIde04gPTt X-Received: by 2002:a17:906:f950:: with SMTP id ld16mr2635410ejb.553.1611313461405; Fri, 22 Jan 2021 03:04:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611313461; cv=none; d=google.com; s=arc-20160816; b=QciVq10NIlXMvGhhOJuuzinA0KqLA0p/Yr6jWHKns5ijkEQvJU1RCtop70rPJrSUiR PI2ydsd2ywLQUuWU0LmWh+0UCyasBi1k8Nh/dHAd61JItwVLm3BKoAuO8nZjC+Pz+KVP OdY+nTdTN/9/aVEs9uoHWLw8frg52JQz+0Nxm5J0v3RKwQw8NEgVc2u0kEsROflNEJ7V YQK993+s4sBFJMhPgKq/JLBFB+N+kM0FRehSu6jrqNBlbsvAJp6fESokHLeK+FD6U8oL ag0WRb5R2372UNhFN52aBqM2ZIYIQ5Q4vUSKBOD75ykQeq4sBAKVmc7DERrUXDohkW8s mc6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=FlvMFRQ5WfualtnNXgAH9NBN3bYQT17wZtgGhpgzIe4=; b=O6zj2SOKQSlaRU5Hj2A9c+I0oANVv/06ew5F+RiE86wDViJ0AMGkkUcRlptCyTGaWW Ikr0xrbUOvsQYoDz7Qki1Pn/v7hMFfX8/dlsyhCf6B7bcGpmMoZ34m5SXO50WFRci9/d 86/vJIRhY37LxW/Rdd3Hs9lkyue78kyFcw7B1FTqlBQnHYmEn4tt9DdGjHCFeJCdY1wa Oliu4IVQc5o1o8KDqOlIcn9+kzDxz1FxM3pMbERupeyNfshq03pLG1ZX0izAq0r/9JWp e2D1B2SjVozMTbP2aX4rpIZenCTck8QeOXuGK1LiAHYfYZ19aRz4fNP+GMMgSBFNelM3 xcyQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si2915809ejc.637.2021.01.22.03.03.57; Fri, 22 Jan 2021 03:04:21 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727956AbhAVK7X (ORCPT + 99 others); Fri, 22 Jan 2021 05:59:23 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:11130 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727494AbhAVKvo (ORCPT ); Fri, 22 Jan 2021 05:51:44 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DMbcc5sd6z15wZP; Fri, 22 Jan 2021 18:49:52 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Fri, 22 Jan 2021 18:50:50 +0800 From: Ye Bin To: , , , , CC: Ye Bin , Hulk Robot Subject: [PATCH] PCI: endpoint: remove set but not used parameter in pci-epf-ntb.c Date: Fri, 22 Jan 2021 18:57:06 +0800 Message-ID: <20210122105706.3206057-1-yebin10@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix follow warnings: drivers/pci/endpoint/functions/pci-epf-ntb.c: In function ‘epf_ntb_peer_spad_bar_set’: drivers/pci/endpoint/functions/pci-epf-ntb.c:763:18: warning: variable ‘epc’ set but not used [-Wunused-but-set-variable] 763 | struct pci_epc *epc; | ^~~ drivers/pci/endpoint/functions/pci-epf-ntb.c: In function ‘epf_ntb_config_spad_bar_alloc’: drivers/pci/endpoint/functions/pci-epf-ntb.c:976:18: warning: variable ‘epc’ set but not used [-Wunused-but-set-variable] 976 | struct pci_epc *epc; | ^~~ drivers/pci/endpoint/functions/pci-epf-ntb.c:972:17: warning: variable ‘peer_barno’ set but not used [-Wunused-but-set-variable] 972 | enum pci_barno peer_barno, barno; Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/pci/endpoint/functions/pci-epf-ntb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-ntb.c b/drivers/pci/endpoint/functions/pci-epf-ntb.c index e2dc5cae5c81..0e8249b8aeba 100644 --- a/drivers/pci/endpoint/functions/pci-epf-ntb.c +++ b/drivers/pci/endpoint/functions/pci-epf-ntb.c @@ -760,7 +760,6 @@ epf_ntb_peer_spad_bar_set(struct epf_ntb *ntb, enum pci_epc_interface_type type) struct pci_epf_bar *peer_epf_bar, *epf_bar; enum pci_barno peer_barno, barno; u32 peer_spad_offset; - struct pci_epc *epc; struct device *dev; u8 func_no; int ret; @@ -775,7 +774,6 @@ epf_ntb_peer_spad_bar_set(struct epf_ntb *ntb, enum pci_epc_interface_type type) barno = ntb_epc->epf_ntb_bar[BAR_PEER_SPAD]; epf_bar = &ntb_epc->epf_bar[barno]; func_no = ntb_epc->func_no; - epc = ntb_epc->epc; peer_spad_offset = peer_ntb_epc->reg->spad_offset; epf_bar->phys_addr = peer_epf_bar->phys_addr + peer_spad_offset; @@ -969,11 +967,10 @@ epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb, const struct pci_epc_features *peer_epc_features, *epc_features; struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; size_t msix_table_size, pba_size, align; - enum pci_barno peer_barno, barno; + enum pci_barno barno; struct epf_ntb_ctrl *ctrl; u32 spad_size, ctrl_size; u64 size, peer_size; - struct pci_epc *epc; struct pci_epf *epf; struct device *dev; bool msix_capable; @@ -983,7 +980,6 @@ epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb, epf = ntb->epf; dev = &epf->dev; ntb_epc = ntb->epc[type]; - epc = ntb_epc->epc; epc_features = ntb_epc->epc_features; barno = ntb_epc->epf_ntb_bar[BAR_CONFIG]; @@ -992,7 +988,6 @@ epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb, peer_ntb_epc = ntb->epc[!type]; peer_epc_features = peer_ntb_epc->epc_features; - peer_barno = ntb_epc->epf_ntb_bar[BAR_PEER_SPAD]; peer_size = peer_epc_features->bar_fixed_size[barno]; /* Check if epc_features is populated incorrectly */ -- 2.25.4