gro: simplify gro_list_prepare()
authorAlexander Lobakin <alobakin@pm.me>
Sat, 13 Mar 2021 20:30:05 +0000 (20:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 14 Mar 2021 21:41:08 +0000 (14:41 -0700)
commit0ccf4d50d14f360dfae5b25b8ffcb27f98e591f0
tree817fd9202857df9590a1fb7da4e66e47c80a99f5
parentf4e6d7cdbfae502788bc468295b232dec76ee57e
gro: simplify gro_list_prepare()

gro_list_prepare() always returns &napi->gro_hash[bucket].list,
without any variations. Moreover, it uses 'napi' argument only to
have access to this list, and calculates the bucket index for the
second time (firstly it happens at the beginning of
dev_gro_receive()) to do that.
Given that dev_gro_receive() already has an index to the needed
list, just pass it as the first argument to eliminate redundant
calculations, and make gro_list_prepare() return void.
Also, both arguments of gro_list_prepare() can be constified since
this function can only modify the skbs from the bucket list.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c