Skip to content

Commit a459d9e

Browse files
Wei YongjunLorenzo Pieralisi
authored andcommitted
PCI: hv: Make some functions static
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. Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]>
1 parent d6af2ed commit a459d9e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

drivers/pci/controller/pci-hyperv.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,9 @@ static void hv_pci_read_config_compl(void *context, struct pci_response *resp,
938938
*
939939
* Return: 0 on success, -errno on failure
940940
*/
941-
int hv_read_config_block(struct pci_dev *pdev, void *buf, unsigned int len,
942-
unsigned int block_id, unsigned int *bytes_returned)
941+
static int hv_read_config_block(struct pci_dev *pdev, void *buf,
942+
unsigned int len, unsigned int block_id,
943+
unsigned int *bytes_returned)
943944
{
944945
struct hv_pcibus_device *hbus =
945946
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,
10181019
*
10191020
* Return: 0 on success, -errno on failure
10201021
*/
1021-
int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len,
1022-
unsigned int block_id)
1022+
static int hv_write_config_block(struct pci_dev *pdev, void *buf,
1023+
unsigned int len, unsigned int block_id)
10231024
{
10241025
struct hv_pcibus_device *hbus =
10251026
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,
10871088
*
10881089
* Return: 0 on success, -errno on failure
10891090
*/
1090-
int hv_register_block_invalidate(struct pci_dev *pdev, void *context,
1091-
void (*block_invalidate)(void *context,
1092-
u64 block_mask))
1091+
static int hv_register_block_invalidate(struct pci_dev *pdev, void *context,
1092+
void (*block_invalidate)(void *context,
1093+
u64 block_mask))
10931094
{
10941095
struct hv_pcibus_device *hbus =
10951096
container_of(pdev->bus->sysdata, struct hv_pcibus_device,

0 commit comments

Comments
 (0)