From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AD57CCA47F for ; Mon, 4 Jul 2022 10:22:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233421AbiGDKWR (ORCPT ); Mon, 4 Jul 2022 06:22:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234146AbiGDKVq (ORCPT ); Mon, 4 Jul 2022 06:21:46 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 292A5DF08 for ; Mon, 4 Jul 2022 03:20:04 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id b2so8169214plx.7 for ; Mon, 04 Jul 2022 03:20:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ui6jM4ZYL95jFXsEJNqQO63PcH9wdj9Z4AxG9QKXlsk=; b=GvSzH22gCSolN+ML/4454VuP5xi7hCqYh3iBNj7BsSKVgA4TpvBHywhPCeoApnfRAJ 0ECxw1MihfcLw8YnRZA2hPIX6zybx/LfAnow6UC98HULCRrJIRMUhuMoS5nlkRAun+FG bB1h36cBBBOr0fRSVpvhyJEgIeKP4HnUobKaQ2XrC1ooQTJ2/xziCatTAD4DXPFWc+6u GaaW5Hra03vyAhoYBG0C9oiTMZnow424UlLfLNBXqV7yRwF9m/s0ivRa5i2eSJUoAvEC ZJnrPg/8HP347f5WAyhrBBmymSsT2L/XCgFhSUNTahFG4GshJPafSwasZB8Ep60E1n1i ZbTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ui6jM4ZYL95jFXsEJNqQO63PcH9wdj9Z4AxG9QKXlsk=; b=EJfVFlzQyYlgUTtpAho62KpOABPH+xuRPYvB+iTTkDg1g5hwsj3YMnu3AnyTPxwrSz a9I9UX5IZSGxMXnwTOVHDkl9QrL1nLVccKDrNxgTbbppEtfsTSRdeP9t+3duVRdG6mDy kX3bD0JczAQphZds2/lbR7j8QHJMtm0IVTFOOfkjrQPJbHwBeJDSyoZbj3YN6CG9frSK BNj1XcrNJ+hl8kHTDk4I14jh6YeVshwptJ1buwKmYaM9UV6au137aI3oXZ6+F7TDNLiB VcNbKc0FRtuyL6UmWJU/qYYjBH6v1q22p4OnJQ+5+yPGhHqHRigmkzwYXpJOeXmiixsT CPqQ== X-Gm-Message-State: AJIora+tc/AhP8pNe6lvCT/sLffeX6Zr4+6KIAaHo1bQv7PVQ8iro6rN WMjSSCYaAetblRiEmE/FXpiw X-Google-Smtp-Source: AGRyM1sZ6xYXHsOd/xbmmI/Ti9HJnupEePcXxzVWeGr7WZfxD0YPmcXQaXXzh9r+ytRnh49OAdR35g== X-Received: by 2002:a17:90b:4c0a:b0:1ec:e6b3:7690 with SMTP id na10-20020a17090b4c0a00b001ece6b37690mr35452668pjb.121.1656930003648; Mon, 04 Jul 2022 03:20:03 -0700 (PDT) Received: from thinkpad ([220.158.158.244]) by smtp.gmail.com with ESMTPSA id u14-20020a170903124e00b0015ee60ef65bsm20742341plh.260.2022.07.04.03.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 03:20:01 -0700 (PDT) Date: Mon, 4 Jul 2022 15:49:55 +0530 From: Manivannan Sadhasivam To: Tom Rix Cc: kishon@ti.com, lpieralisi@kernel.org, kw@linux.com, bhelgaas@google.com, Frank.Li@nxp.com, jdmason@kudzu.us, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] PCI: endpoint: reduce several globals to statics Message-ID: <20220704101955.GD6560@thinkpad> References: <20220630210517.1825677-1-trix@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220630210517.1825677-1-trix@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 30, 2022 at 05:05:17PM -0400, Tom Rix wrote: > sparse reports > drivers/pci/endpoint/functions/pci-epf-vntb.c:956:10: warning: symbol 'pci_space' was not declared. Should it be static? > drivers/pci/endpoint/functions/pci-epf-vntb.c:975:5: warning: symbol 'pci_read' was not declared. Should it be static? > drivers/pci/endpoint/functions/pci-epf-vntb.c:984:5: warning: symbol 'pci_write' was not declared. Should it be static? > drivers/pci/endpoint/functions/pci-epf-vntb.c:989:16: warning: symbol 'vpci_ops' was not declared. Should it be static? > > These functions and variables are only used in pci-epf-vntb.c, so their storage > class specifiers should be static. > > Fixes: ff32fac00d97 ("NTB: EPF: support NTB transfer between PCI RC and EP connection") > Signed-off-by: Tom Rix Commit subject should include "pci-epf-vntb" prefix. Otherwise it is not possible to guess which driver this patch touches (unless one reads commit description). With that fixed, Acked-by: Manivannan Sadhasivam Thanks, Mani > --- > v2 : Change commit prefix > > --- > drivers/pci/endpoint/functions/pci-epf-vntb.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c > index ebf7e243eefa..6f0775b1fec3 100644 > --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c > +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c > @@ -953,7 +953,7 @@ static struct config_group *epf_ntb_add_cfs(struct pci_epf *epf, > > #define VPCI_BUS_NUM 0x10 > > -uint32_t pci_space[] = { > +static uint32_t pci_space[] = { > (VNTB_VID | (VNTB_PID << 16)), //DeviceID, Vendor ID > 0, // status, Command > 0xffffffff, // Class code, subclass, prog if, revision id > @@ -972,7 +972,7 @@ uint32_t pci_space[] = { > 0, //Max Lat, Min Gnt, interrupt pin, interrupt line > }; > > -int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) > +static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) > { > if (devfn == 0) { > memcpy(val, ((uint8_t *)pci_space) + where, size); > @@ -981,12 +981,12 @@ int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * > return -1; > } > > -int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) > +static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) > { > return 0; > } > > -struct pci_ops vpci_ops = { > +static struct pci_ops vpci_ops = { > .read = pci_read, > .write = pci_write, > }; > -- > 2.27.0 > -- மணிவண்ணன் சதாசிவம்