lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1482943567-12483-7-git-send-email-thomas.petazzoni@free-electrons.com> Date: Wed, 28 Dec 2016 17:46:02 +0100 From: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com> To: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net> Cc: Jason Cooper <jason@...edaemon.net>, Andrew Lunn <andrew@...n.ch>, Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>, Gregory Clement <gregory.clement@...e-electrons.com>, Nadav Haklai <nadavh@...vell.com>, Hanna Hawa <hannah@...vell.com>, Yehuda Yitschak <yehuday@...vell.com>, linux-arm-kernel@...ts.infradead.org, Stefan Chulski <stefanc@...vell.com>, Marcin Wojtas <mw@...ihalf.com>, Thomas Petazzoni <thomas.petazzoni@...e-electrons.com> Subject: [PATCHv2 net-next 06/11] net: mvpp2: simplify mvpp2_bm_bufs_add() The mvpp2_bm_bufs_add() currently creates a fake cookie by calling mvpp2_bm_cookie_pool_set(), just to be able to call mvpp2_pool_refill(). But all what mvpp2_pool_refill() does is extract the pool ID from the cookie, and call mvpp2_bm_pool_put() with this ID. Instead of doing this convoluted thing, just call mvpp2_bm_pool_put() directly, since we have the BM pool ID. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com> --- drivers/net/ethernet/marvell/mvpp2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index bfa9f77..8174f40 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c @@ -3626,7 +3626,6 @@ static int mvpp2_bm_bufs_add(struct mvpp2_port *port, { struct sk_buff *skb; int i, buf_size, total_size; - u32 bm; dma_addr_t phys_addr; buf_size = MVPP2_RX_BUF_SIZE(bm_pool->pkt_size); @@ -3640,13 +3639,12 @@ static int mvpp2_bm_bufs_add(struct mvpp2_port *port, return 0; } - bm = mvpp2_bm_cookie_pool_set(0, bm_pool->id); for (i = 0; i < buf_num; i++) { skb = mvpp2_skb_alloc(port, bm_pool, &phys_addr, GFP_KERNEL); if (!skb) break; - mvpp2_pool_refill(port, bm, (u32)phys_addr, (u32)skb); + mvpp2_bm_pool_put(port, bm_pool->id, (u32)phys_addr, (u32)skb); } /* Update BM driver with number of buffers added to pool */ -- 2.7.4
Powered by blists - more mailing lists