lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190828222618.GE7013@google.com>
Date:   Wed, 28 Aug 2019 17:26:18 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Krzysztof Wilczynski <kw@...ux.com>
Cc:     "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sasha Levin <sashal@...nel.org>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-hyperv@...r.kernel.org
Subject: Re: [PATCH] PCI: hv: Make functions only used locally static in
 pci-hyperv.c

Maybe just:

  PCI: hv: Make functions static

since we already know it's in pci-hyperv.c, and it's obvious that you
can only do this for functions that are only used locally.

On Mon, Aug 26, 2019 at 05:41:59PM +0200, Krzysztof Wilczynski wrote:
> Functions hv_read_config_block(), hv_write_config_block()
> and hv_register_block_invalidate() are not used anywhere
> else and are local to drivers/pci/controller/pci-hyperv.c,
> and do not need to be in global scope, so make these static.
> 
> Resolve compiler warning that can be seen when building with
> warnings enabled (W=1).

Rewrap commit log to fill 75 columns.

Does this fix all the similar warnings in drivers/pci/?  If there are
more, maybe we could fix them all in a single patch or at least a
single series?

> Signed-off-by: Krzysztof Wilczynski <kw@...ux.com>
> ---
>  drivers/pci/controller/pci-hyperv.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index f1f300218fab..c9642e429c2d 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -930,7 +930,7 @@ 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,
> +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 =
> @@ -1010,7 +1010,7 @@ 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,
> +static int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len,
>  			  unsigned int block_id)
>  {
>  	struct hv_pcibus_device *hbus =
> @@ -1079,7 +1079,7 @@ 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,
> +static int hv_register_block_invalidate(struct pci_dev *pdev, void *context,
>  				 void (*block_invalidate)(void *context,
>  							  u64 block_mask))
>  {
> -- 
> 2.22.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ