Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Hulk Robot <hulkci@huawei.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
	linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH -next] PCI: hv: Make some functions static
Date: Tue, 28 Jul 2020 11:23:57 +0100
Message-ID: <20200728102357.GB32448@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <20200706135234.80758-1-weiyongjun1@huawei.com>

On Mon, Jul 06, 2020 at 09:52:34PM +0800, Wei Yongjun wrote:
> sparse report build warning as follows:
> 
> drivers/pci/controller/pci-hyperv.c:941:5: warning:
>  symbol 'hv_read_config_block' was not declared. Should it be static?
> drivers/pci/controller/pci-hyperv.c:1021:5: warning:
>  symbol 'hv_write_config_block' was not declared. Should it be static?
> drivers/pci/controller/pci-hyperv.c:1090:5: warning:
>  symbol 'hv_register_block_invalidate' was not declared. Should it be static?
> 
> Those functions are not used outside of this file, so mark them static.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/pci/controller/pci-hyperv.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)

Applied to pci/hv, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index bf40ff09c99d..5c496b93cea9 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -938,8 +938,9 @@ static void hv_pci_read_config_compl(void *context, struct pci_response *resp,
>   *
>   * Return: 0 on success, -errno on failure
>   */
> -int hv_read_config_block(struct pci_dev *pdev, void *buf, unsigned int len,
> -			 unsigned int block_id, unsigned int *bytes_returned)
> +static int hv_read_config_block(struct pci_dev *pdev, void *buf,
> +				unsigned int len, unsigned int block_id,
> +				unsigned int *bytes_returned)
>  {
>  	struct hv_pcibus_device *hbus =
>  		container_of(pdev->bus->sysdata, struct hv_pcibus_device,
> @@ -1018,8 +1019,8 @@ static void hv_pci_write_config_compl(void *context, struct pci_response *resp,
>   *
>   * Return: 0 on success, -errno on failure
>   */
> -int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len,
> -			  unsigned int block_id)
> +static int hv_write_config_block(struct pci_dev *pdev, void *buf,
> +				unsigned int len, unsigned int block_id)
>  {
>  	struct hv_pcibus_device *hbus =
>  		container_of(pdev->bus->sysdata, struct hv_pcibus_device,
> @@ -1087,9 +1088,9 @@ int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len,
>   *
>   * Return: 0 on success, -errno on failure
>   */
> -int hv_register_block_invalidate(struct pci_dev *pdev, void *context,
> -				 void (*block_invalidate)(void *context,
> -							  u64 block_mask))
> +static int hv_register_block_invalidate(struct pci_dev *pdev, void *context,
> +					void (*block_invalidate)(void *context,
> +								 u64 block_mask))
>  {
>  	struct hv_pcibus_device *hbus =
>  		container_of(pdev->bus->sysdata, struct hv_pcibus_device,
> 

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 13:52 Wei Yongjun
2020-07-28 10:23 ` Lorenzo Pieralisi [this message]

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=20200728102357.GB32448@e121166-lin.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=bhelgaas@google.com \
    --cc=haiyangz@microsoft.com \
    --cc=hulkci@huawei.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@kernel.org \
    --cc=weiyongjun1@huawei.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

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git