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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7cb4d3be-925f-05bd-78fe-67a69dfee18d@deltatee.com>
Date:   Tue, 19 Apr 2022 09:49:51 -0600
From:   Logan Gunthorpe <logang@...tatee.com>
To:     Guo Zhengkui <guozhengkui@...o.com>, Jon Mason <jdmason@...zu.us>,
        Dave Jiang <dave.jiang@...el.com>,
        Allen Hubbe <allenbh@...il.com>,
        Yang Li <yang.lee@...ux.alibaba.com>,
        Alexander Fomichev <fomichev.ru@...il.com>,
        Serge Semin <fancer.lancer@...il.com>,
        "open list:NTB DRIVER CORE" <ntb@...ts.linux.dev>,
        open list <linux-kernel@...r.kernel.org>
Cc:     zhengkui_guo@...look.com
Subject: Re: [PATCH] ntb_perf: fix doubletest cocci warning



On 2022-04-19 01:18, Guo Zhengkui wrote:
> `!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>

This appears to be a patch against Alexander's patch which has not been
accepted yet. Posting a note on his patch so he fixes it for the next
posting would be preferable.

Logan

> ---
>  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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ