[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220419071855.23338-1-guozhengkui@vivo.com>
Date: Tue, 19 Apr 2022 15:18:50 +0800
From: Guo Zhengkui <guozhengkui@...o.com>
To: Jon Mason <jdmason@...zu.us>, Dave Jiang <dave.jiang@...el.com>,
Allen Hubbe <allenbh@...il.com>,
Yang Li <yang.lee@...ux.alibaba.com>,
Guo Zhengkui <guozhengkui@...o.com>,
Alexander Fomichev <fomichev.ru@...il.com>,
Serge Semin <fancer.lancer@...il.com>,
ntb@...ts.linux.dev (open list:NTB DRIVER CORE),
linux-kernel@...r.kernel.org (open list)
Cc: zhengkui_guo@...look.com
Subject: [PATCH] ntb_perf: fix doubletest cocci warning
`!data->ops.init` has been repeated triple. The original logic is to
check whether `.init`, `.run` and `.clear` callbacks are NULL or not.
Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
---
drivers/ntb/test/ntb_perf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index c106c3a5097e..dcae4be91365 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -1451,7 +1451,7 @@ static void perf_ext_lat_work(struct work_struct *work)
{
struct perf_ext_lat_data *data = to_ext_lat_data(work);
- if (!data->ops.init || !data->ops.init || !data->ops.init) {
+ if (!data->ops.init || !data->ops.run || !data->ops.clear) {
struct perf_ctx *perf = data->perf;
data->status = -EFAULT;
--
2.20.1
Powered by blists - more mailing lists