All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Tom Rix <trix@redhat.com>
Cc: kishon@ti.com, lpieralisi@kernel.org, kw@linux.com,
	bhelgaas@google.com, jdmason@kudzu.us, Frank.Li@nxp.com,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] PCI: endpoint: pci-epf-vntb: reduce several globals to statics
Date: Tue, 12 Jul 2022 15:05:27 -0500	[thread overview]
Message-ID: <20220712200527.GA791291@bhelgaas> (raw)
In-Reply-To: <20220704132559.2859918-1-trix@redhat.com>

On Mon, Jul 04, 2022 at 09:25:59AM -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 <trix@redhat.com>

Handled via Jon, I guess?

I'm unclear on the future direction of pci-epf-vntb.c.  Jon, are you
signing up to maintain this?  MAINTAINERS doesn't seem to reflect
that, even in next-20220712, so you're not being copied on everything.

If you are planning to merge and maintain this file, it would be
helpful to me if you acknowledge patches you merge so I know to ignore
them.

> ---
> v2,3 : 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
> 

  parent reply	other threads:[~2022-07-12 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 13:25 [PATCH v3] PCI: endpoint: pci-epf-vntb: reduce several globals to statics Tom Rix
2022-07-05 15:14 ` [EXT] " Frank Li
2022-07-12 20:05 ` Bjorn Helgaas [this message]
2022-08-12 14:13   ` Jon Mason
2022-08-12 19:21     ` Bjorn Helgaas
2022-08-12 19:28       ` Jon Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220712200527.GA791291@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=jdmason@kudzu.us \
    --cc=kishon@ti.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.