[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR21MB133796BB3D4A41278C513332CAA30@DM6PR21MB1337.namprd21.prod.outlook.com>
Date: Wed, 28 Aug 2019 22:32:11 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Krzysztof Wilczynski <kw@...ux.com>,
Bjorn Helgaas <helgaas@...nel.org>
CC: KY Srinivasan <kys@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Sasha Levin <sashal@...nel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
Subject: RE: [PATCH v2] PCI: hv: Make functions only used locally static in
pci-hyperv.c
> -----Original Message-----
> From: Krzysztof Wilczynski <kswilczynski@...il.com> On Behalf Of Krzysztof
> Wilczynski
> Sent: Wednesday, August 28, 2019 3:19 PM
> To: Bjorn Helgaas <helgaas@...nel.org>
> Cc: KY 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: [PATCH v2] PCI: hv: Make functions only used locally static in pci-
> hyperv.c
>
> 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 following compiler warning that can be seen when
> building with warnings enabled (W=1):
>
> drivers/pci/controller/pci-hyperv.c:933:5: warning: no previous prototype for
> ‘hv_read_config_block’ [-Wmissing-prototypes]
> int hv_read_config_block(struct pci_dev *pdev, void *buf, unsigned int len,
> ^
> drivers/pci/controller/pci-hyperv.c:1013:5: warning: no previous prototype
> for ‘hv_write_config_block’ [-Wmissing-prototypes]
> int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len,
> ^
> drivers/pci/controller/pci-hyperv.c:1082:5: warning: no previous prototype
> for ‘hv_register_block_invalidate’ [-Wmissing-prototypes]
> int hv_register_block_invalidate(struct pci_dev *pdev, void *context,
> ^
> Signed-off-by: Krzysztof Wilczynski <kw@...ux.com>
> ---
> Changes in v2:
> Update commit message to include compiler warning.
>
> 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)
The second line should be aligned next to the "(" on the first line.
Also the first line is now over 80 chars.
Thanks,
- Haiyang
Powered by blists - more mailing lists