net: ena: make symbol 'ena_alloc_map_page' static
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 9 Jun 2021 14:25:06 +0000 (14:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jun 2021 22:35:48 +0000 (15:35 -0700)
The sparse tool complains as follows:

drivers/net/ethernet/amazon/ena/ena_netdev.c:978:13: warning:
 symbol 'ena_alloc_map_page' was not declared. Should it be static?

This symbol is not used outside of ena_netdev.c, so marks it static.

Fixes: 947c54c395cb ("net: ena: Use dev_alloc() in RX buffer allocation")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c

index cd6ea59..3bb0e66 100644 (file)
@@ -975,7 +975,8 @@ static void ena_free_all_io_rx_resources(struct ena_adapter *adapter)
                ena_free_rx_resources(adapter, i);
 }
 
-struct page *ena_alloc_map_page(struct ena_ring *rx_ring, dma_addr_t *dma)
+static struct page *ena_alloc_map_page(struct ena_ring *rx_ring,
+                                      dma_addr_t *dma)
 {
        struct page *page;