OSDN Git Service

net: ena: Use dev_alloc() in RX buffer allocation
authorShay Agroskin <shayagr@amazon.com>
Tue, 8 Jun 2021 16:01:17 +0000 (19:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jun 2021 21:41:10 +0000 (14:41 -0700)
commit947c54c395cb8368abebf3bec1413123d5dd4339
tree5babbd1c71fb940c25a1897bda1c0878184f11cb
parent9e8afb05961147509181baf4de5cbd644757e850
net: ena: Use dev_alloc() in RX buffer allocation

Use dev_alloc() when allocating RX buffers instead of specifying the
allocation flags explicitly. This result in same behaviour with less
code.

Also move the page allocation and its DMA mapping into a function. This
creates a logical block, which may help understanding the code.

Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c