* [PATCH net-next] net: freescale: dpaa: simplify the return dpaa_eth_refill_bpools()
@ 2020-12-09 9:21 Zheng Yongjun
2020-12-09 9:24 ` Madalin Bucur (OSS)
2020-12-10 1:12 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-09 9:21 UTC (permalink / raw)
To: davem, netdev; +Cc: kuba, linux-kernel, madalin.bucur, Zheng Yongjun
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index cb7c028b1bf5..edc8222d96dc 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -1599,17 +1599,13 @@ static int dpaa_eth_refill_bpools(struct dpaa_priv *priv)
{
struct dpaa_bp *dpaa_bp;
int *countptr;
- int res;
dpaa_bp = priv->dpaa_bp;
if (!dpaa_bp)
return -EINVAL;
countptr = this_cpu_ptr(dpaa_bp->percpu_count);
- res = dpaa_eth_refill_bpool(dpaa_bp, countptr);
- if (res)
- return res;
- return 0;
+ return dpaa_eth_refill_bpool(dpaa_bp, countptr);
}
/* Cleanup function for outgoing frame descriptors that were built on Tx path,
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net-next] net: freescale: dpaa: simplify the return dpaa_eth_refill_bpools()
2020-12-09 9:21 [PATCH net-next] net: freescale: dpaa: simplify the return dpaa_eth_refill_bpools() Zheng Yongjun
@ 2020-12-09 9:24 ` Madalin Bucur (OSS)
2020-12-10 1:12 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Madalin Bucur (OSS) @ 2020-12-09 9:24 UTC (permalink / raw)
To: Zheng Yongjun, davem, netdev; +Cc: kuba, linux-kernel
> -----Original Message-----
> From: Zheng Yongjun <zhengyongjun3@huawei.com>
> Sent: 09 December 2020 11:21
> To: davem@davemloft.net; netdev@vger.kernel.org
> Cc: kuba@kernel.org; linux-kernel@vger.kernel.org; Madalin Bucur
> <madalin.bucur@nxp.com>; Zheng Yongjun <zhengyongjun3@huawei.com>
> Subject: [PATCH net-next] net: freescale: dpaa: simplify the return
> dpaa_eth_refill_bpools()
>
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
> drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> index cb7c028b1bf5..edc8222d96dc 100644
> --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> @@ -1599,17 +1599,13 @@ static int dpaa_eth_refill_bpools(struct dpaa_priv
> *priv)
> {
> struct dpaa_bp *dpaa_bp;
> int *countptr;
> - int res;
>
> dpaa_bp = priv->dpaa_bp;
> if (!dpaa_bp)
> return -EINVAL;
> countptr = this_cpu_ptr(dpaa_bp->percpu_count);
> - res = dpaa_eth_refill_bpool(dpaa_bp, countptr);
> - if (res)
> - return res;
>
> - return 0;
> + return dpaa_eth_refill_bpool(dpaa_bp, countptr);
> }
>
> /* Cleanup function for outgoing frame descriptors that were built on Tx
> path,
> --
> 2.22.0
Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: freescale: dpaa: simplify the return dpaa_eth_refill_bpools()
2020-12-09 9:21 [PATCH net-next] net: freescale: dpaa: simplify the return dpaa_eth_refill_bpools() Zheng Yongjun
2020-12-09 9:24 ` Madalin Bucur (OSS)
@ 2020-12-10 1:12 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-12-10 1:12 UTC (permalink / raw)
To: zhengyongjun3; +Cc: netdev, kuba, linux-kernel, madalin.bucur
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Wed, 9 Dec 2020 17:21:07 +0800
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-10 1:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 9:21 [PATCH net-next] net: freescale: dpaa: simplify the return dpaa_eth_refill_bpools() Zheng Yongjun
2020-12-09 9:24 ` Madalin Bucur (OSS)
2020-12-10 1:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).