Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp778430pxf; Thu, 11 Mar 2021 14:56:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkeSO/F26m2j3QCGHie603qPle+t+cVfZ3/I6PhE0d220oVTrp2K96X7JEys8wke4rXjIr X-Received: by 2002:a17:906:5453:: with SMTP id d19mr5289983ejp.150.1615503390837; Thu, 11 Mar 2021 14:56:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615503390; cv=none; d=google.com; s=arc-20160816; b=DwPybGQbt8PfJq409U6LWMc6Cb3sHu66TUu7sTUATwvv0sVAhQC+CLFphvRIAqp/9z woSapAX3C0GnUfXJ6a3ii84P/r6qVc09iMbRE3iHSYDBhX90WYy2RTmtlzCBYpsCrHCb g6l6hCHuN0IWj0KPzqId1yaxNKQNknSs8g6Jwap55eQdV3nabM52tF4uJyeOWFsFZ/XN JIjQl94toyUnqrVxt5WPxpcukSqBBMTqEKoeE9Rk4V7nCUSWxfNccYiups1hG5CB3pdO FOSuMq/ZY5/v2uoz+am9Q9QSQDxwJvgncwmeBMCa3qKM/jdKUA0d4axgWJAjHr9RcQW4 f5wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=q1PiX2KbwtJrcokIpS7hmTZypC1pxEJgIB8W7te43Ic=; b=mFJHhgTW0FPjQ/l1WmA9Y0lIvNBT2rzCcQO5jRnT/viO+4ChHglu9czWCTPx5dFhuf HglwTedaGxbqs2Bax3FucActj20wMs3Y61TJf5bSvjbv7StXle7X82/VHqFa1GIJhZ4I +Fh01Yf4dc8TxxaXyCr6OmfRmdRdOnabFhFSyphcjVw7PJ7HZn5exzgI0vpQMPyCzIIB 1ljNxMM++4nyweQ3A0sbewFAifeCjaPxed3WEBaXFZuMVVTgQXEfqr5TmT/VuaU/ldW0 YICc9bu1gE4royZjjo7KyELjBpLDhQsTCRs3G+3FH2dI/3+6rtoDGoF9sJPu0RsukB9x hFpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f+BMf0Fa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b10si2681570edz.577.2021.03.11.14.56.07; Thu, 11 Mar 2021 14:56:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f+BMf0Fa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230259AbhCKWv7 (ORCPT + 99 others); Thu, 11 Mar 2021 17:51:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:42598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbhCKWv4 (ORCPT ); Thu, 11 Mar 2021 17:51:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2E22664F26; Thu, 11 Mar 2021 22:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615503115; bh=vntZGoqs0CqwH2BmBiZ/QL0YFTZvd8CMaMCrkmzsLCg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=f+BMf0FazeCKv7+xE2a01FZyMKDgIawfrWTDN4xWxAzc2mfB71aO3C0KLvte4kma4 iROzJRsSfNj8KrEO0bqFAg0E2kwnoFKs3x/7IjXEM5v0xzw7kUI/95m8Xd9+HxkhTd 9at+Jpa4379HW1DRVl4e83r4Sc7zREp4lwLFYgtvxXJeczUDeL76RbOARydfVdF5Yq w1Qr1R3+mHFHjTOXf91syngUVHVI+wHFuUR1edJW8WktKkWC6sZ+Sj0Nebt9C2qyJL IALRiMTROT+dxsxol1TdkuLJw3skon/moH0QFZ1xvDs5WfJVBAZzD4GLJUH7HAstbM y6gsSKxweYxvg== Message-ID: <8dff1af3191e65e28615a2a3df5269bdaea18754.camel@kernel.org> Subject: Re: [PATCH] net: mellanox: mlx5: fix error return code in mlx5_fpga_device_start() From: Saeed Mahameed To: Leon Romanovsky , Jia-Ju Bai Cc: borisp@nvidia.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 11 Mar 2021 14:51:54 -0800 In-Reply-To: References: <20210304141814.8508-1-baijiaju1990@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2021-03-07 at 10:50 +0200, Leon Romanovsky wrote: > On Thu, Mar 04, 2021 at 06:18:14AM -0800, Jia-Ju Bai wrote: > > When mlx5_is_fpga_lookaside() returns a non-zero value, no error > > return code is assigned. > > To fix this bug, err is assigned with -EINVAL as error return code. > > > > Reported-by: TOTE Robot > > Signed-off-by: Jia-Ju Bai > > --- > >  drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 4 +++- > >  1 file changed, 3 insertions(+), 1 deletion(-) > > Like Heiner said, the current code has correct behavior. > The mlx5_fpga_device_load_check() has same mlx5_is_fpga_lookaside() > check and it is not an error if it returns true. > > NAK: Leon Romanovsky > > Thanks Agreed, apparently this robot is looking for "goto {out|*err*}" statements and treats all of them as errors, this is very unreliable,