Commit 4369d40d authored by Byungchul Park's avatar Byungchul Park Committed by Jakub Kicinski
Browse files

netmem: use _Generic to cover const casting for page_to_netmem()



The current page_to_netmem() doesn't cover const casting resulting in
trying to cast const struct page * to const netmem_ref fails.

To cover the case, change page_to_netmem() to use macro and _Generic.

Signed-off-by: default avatarByungchul Park <byungchul@sk.com>
Reviewed-by: default avatarMina Almasry <almasrymina@google.com>
Reviewed-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
Reviewed-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/20250702053256.4594-5-byungchul@sk.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b56ce868
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment