* [PATCH net-next] net: marvell: octeontx2: simplify the otx2_ptp_adjfine()
@ 2020-12-09 9:27 Zheng Yongjun
2020-12-10 1:13 ` David Miller
2020-12-10 1:13 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-09 9:27 UTC (permalink / raw)
To: davem, kuba, netdev; +Cc: linux-kernel, Zheng Yongjun
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
index 7bcf5246350f..56390a664517 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
@@ -12,7 +12,6 @@ static int otx2_ptp_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm)
struct otx2_ptp *ptp = container_of(ptp_info, struct otx2_ptp,
ptp_info);
struct ptp_req *req;
- int err;
if (!ptp->nic)
return -ENODEV;
@@ -24,11 +23,7 @@ static int otx2_ptp_adjfine(struct ptp_clock_info *ptp_info, long scaled_ppm)
req->op = PTP_OP_ADJFINE;
req->scaled_ppm = scaled_ppm;
- err = otx2_sync_mbox_msg(&ptp->nic->mbox);
- if (err)
- return err;
-
- return 0;
+ return otx2_sync_mbox_msg(&ptp->nic->mbox);
}
static u64 ptp_cc_read(const struct cyclecounter *cc)
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: marvell: octeontx2: simplify the otx2_ptp_adjfine()
2020-12-09 9:27 [PATCH net-next] net: marvell: octeontx2: simplify the otx2_ptp_adjfine() Zheng Yongjun
@ 2020-12-10 1:13 ` David Miller
2020-12-10 1:13 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-12-10 1:13 UTC (permalink / raw)
To: zhengyongjun3; +Cc: kuba, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Wed, 9 Dec 2020 17:27:26 +0800
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: marvell: octeontx2: simplify the otx2_ptp_adjfine()
2020-12-09 9:27 [PATCH net-next] net: marvell: octeontx2: simplify the otx2_ptp_adjfine() Zheng Yongjun
2020-12-10 1:13 ` David Miller
@ 2020-12-10 1:13 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-12-10 1:13 UTC (permalink / raw)
To: zhengyongjun3; +Cc: kuba, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Wed, 9 Dec 2020 17:27:26 +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:14 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:27 [PATCH net-next] net: marvell: octeontx2: simplify the otx2_ptp_adjfine() Zheng Yongjun
2020-12-10 1:13 ` David Miller
2020-12-10 1:13 ` 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).