memory-provider: fix compilation issue without SYSFS

When CONFIG_SYSFS is not set, the kernel fails to compile:

     net/core/page_pool_user.c:368:45: error: implicit declaration of function 'get_netdev_rx_queue_index' [-Werror=implicit-function-declaration]
      368 |                 if (pool->slow.queue_idx == get_netdev_rx_queue_index(rxq)) {
          |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~

When CONFIG_SYSFS is not set, get_netdev_rx_queue_index() is not defined
as well.

Fix by removing the ifdef around get_netdev_rx_queue_index(). It is not
needed anymore after commit e817f85652 ("xdp: generic XDP handling of
xdp_rxq_info") removed most of the CONFIG_SYSFS ifdefs.

Fixes: 0f92140468 ("memory-provider: dmabuf devmem memory provider")
Cc: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20240913032824.2117095-1-almasrymina@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Mina Almasry 2024-09-13 03:28:24 +00:00 committed by Jakub Kicinski
parent b523f23f5c
commit 52fa3b6532

View File

@ -45,7 +45,6 @@ __netif_get_rx_queue(struct net_device *dev, unsigned int rxq)
return dev->_rx + rxq; return dev->_rx + rxq;
} }
#ifdef CONFIG_SYSFS
static inline unsigned int static inline unsigned int
get_netdev_rx_queue_index(struct netdev_rx_queue *queue) get_netdev_rx_queue_index(struct netdev_rx_queue *queue)
{ {
@ -55,7 +54,6 @@ get_netdev_rx_queue_index(struct netdev_rx_queue *queue)
BUG_ON(index >= dev->num_rx_queues); BUG_ON(index >= dev->num_rx_queues);
return index; return index;
} }
#endif
int netdev_rx_queue_restart(struct net_device *dev, unsigned int rxq); int netdev_rx_queue_restart(struct net_device *dev, unsigned int rxq);