Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp948757pxb; Sun, 7 Mar 2021 00:54:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIbJQqfUOvUL1s2OJEsT/JPQbVBa/y+qF5oaQIAJzb7EuN5vyFJVL4TSG9tLU+LsAcCKMM X-Received: by 2002:a17:906:c081:: with SMTP id f1mr10102425ejz.97.1615107254427; Sun, 07 Mar 2021 00:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615107254; cv=none; d=google.com; s=arc-20160816; b=j4lYzwGh8uKex24G8EHxJtge1a5o5gDhitdKd7loT2gpt2178U5V5S2Vt/udKJOgs/ /5xo75OpnFnn4NsI1MhozMajmxFNBWf6yozSiFpNflhs0dV5lxUNqWX9OMpxumB7rs7Z Z+m5vUT4sHDWXgFiUvAK3is3U4/Oc13S/7iDdszITodgAqxtkKCqR04VhwzOuifPNN/v aaMvyV0czRsCPgpEvkUjZwWVa6RszldO7MreY3E69SfByb9MKDuC6ZNl3cdCoeCUqzT0 AF1kaGHLeclNZ1B2xo+mFy6bnyMZFCp36eFzJVzFbEXjeLW4LDaUW2DYCxZeAmdRvEmO 07jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BIahpeDG0aRl+mUFfJXnuiyjod2RcTMffuWBrR1XAek=; b=yIkehKhLRdzhpEogcEUfsIx2F/FzppTXCgyhzSUrfSUcpFfkfx6qiFFL50OlXhCYyt Dk6SIVwvx55cop98JuUAjpUWWIntEB1znxT2bwaaYQ7dMgUmjnsIbai+TpNVKBrcr7z4 tkLnoDAvrqwUL5YeFi+y6sfzckbXzLH1CTqAJqXPQRiSWmBctkGXhhtsvZtZzNLOOT4L MZ9x78tDOBhI2uJOGTvSDvs5nRaYIXV54HkiniZjx9yWrN+l679AK1XKGH2c17bJix33 AY8/HmrnlJM1BEYssfYaYRSQVh3iNvhNvol6U8QXUgMiXuw/yt7vzTS96gQgCG4BslSV P2Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rxmx0Rr/"; 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 a10si5491598edf.499.2021.03.07.00.53.52; Sun, 07 Mar 2021 00:54:14 -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="rxmx0Rr/"; 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 S231129AbhCGIuW (ORCPT + 99 others); Sun, 7 Mar 2021 03:50:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:35734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbhCGIuI (ORCPT ); Sun, 7 Mar 2021 03:50:08 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E34A965128; Sun, 7 Mar 2021 08:50:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615107007; bh=RyrzOKBjD3Cw2eItGuby/Ri2355vEW2bs64dRDjRbFM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rxmx0Rr/E56tayDbpBsAK/B8oKaS3/MFKLIZ7JFKuMUQ0KqecbL3MA7PTNgiuflWI 0J+CUH6EgwAwvR5pIlxwm5JZjiQhnaJzL0Js0XP+GAvyUlIzkU3kNwCvAjRD+bsa6W U+DkAO3i45zOD46a9MkFh77ZYD4XnpqkOiTlCLjmOM+PM9cadUeQFr2drPW4c/DmUx VjSet8JWpFFEE3ar9A9L2DzxzdIPwrlsCmfF0CQYcUnQAxET8XtD94thGk5hkYa39U 5UEG5ZnBXLiVgPLxs20109oEyghwXlnAynADOOjb/ir9k7IqyX/3QIphq59QG24hR6 dF/uEt4vqKMAQ== Date: Sun, 7 Mar 2021 10:50:03 +0200 From: Leon Romanovsky To: Jia-Ju Bai Cc: borisp@nvidia.com, saeedm@nvidia.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: mellanox: mlx5: fix error return code in mlx5_fpga_device_start() Message-ID: References: <20210304141814.8508-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210304141814.8508-1-baijiaju1990@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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