7cbf6bd7328f5f1a4673380f8f41093829393ae3
[openwrt/staging/wigyori.git] /
1 From 65aacd457eaf5d0c958ed8030ec46f99ea808dd9 Mon Sep 17 00:00:00 2001
2 From: Lorenzo Bianconi <lorenzo@kernel.org>
3 Date: Fri, 17 Nov 2023 17:39:22 +0100
4 Subject: [PATCH 3/5] net: ethernet: mtk_wed: rely on __dev_alloc_page in
5 mtk_wed_tx_buffer_alloc
6
7 Simplify the code and use __dev_alloc_page() instead of __dev_alloc_pages()
8 with order 0 in mtk_wed_tx_buffer_alloc routine
9
10 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
12 ---
13 drivers/net/ethernet/mediatek/mtk_wed.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
17 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
18 @@ -670,7 +670,7 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
19 void *buf;
20 int s;
21
22 - page = __dev_alloc_pages(GFP_KERNEL, 0);
23 + page = __dev_alloc_page(GFP_KERNEL);
24 if (!page)
25 return -ENOMEM;
26