Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp595288pxb; Thu, 9 Sep 2021 07:51:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTwXZoWSbfhIw+YeExFFXiXvh0MMvEzbYp7b6OQjI1b74Ez/3VbMBl2GVzcXewD3IScCVi X-Received: by 2002:a6b:c8c7:: with SMTP id y190mr3002198iof.210.1631199086705; Thu, 09 Sep 2021 07:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631199086; cv=none; d=google.com; s=arc-20160816; b=DX1texVDZw+zXlMFT2P7ELc9nokrNR+woj4udNn08+bTJ/nRZhvGMKx96Tq4xud1fN vltpxZJa7M5KN6z6OwaIh2g69ZnlcUkAi5Mo3nC9mvTYwybFKa/SMgtwWwnvg6D0+rjS q3wUVaqQJ2UPSxl5SerCRL6zf1FghVIcWcaMYxVq5MfMLfCOZPzKj1BMAo60vUXqZX5+ pGvw7crW1EzJB3PXEpEtBRWIENJiFqaCqCRIBwLZbwnezyZp34fxORn0Srq49r7pibF3 B2FKgvXbQyWYy3vFEiwhrEmPOdTBFvwYAJjRkUSR3trdoDU7I4To6Ze++q9VANhV+KS2 rpYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=cWDaWmG5Lob01QAvgu5Bnl5LuwE52WvgfqkTICSQozc=; b=ZwbMPtA5XNA31tG3qp6YBnUtfBALm734JDlganupyJk5HZLBJr7+H4LJ8UEOrAIprK 3pQRcMMgK9y+LpRdRAEEk6qseT5+IWA7P/x5lHsVYgZH1FbXrecwuCaCw3Oem9zeRem/ /MyPudC7/XYM2P5APFRWHl4ddvl4pLXJWtrEFyrErx2QyUqem8myM8UXok5nlLA8HFZX sLx3T+LdfBXX//YR1FxkoyfRZveZVsSpu5Z/RzElfZilDzf5Ox3QPA+AYumhAl/6+8VK tCfLKUkgKORp791GN5VjO5RUPwL8sLc/VhNb7u2H9bhpA+8AwWcBiYeyf2x9Om0KoV5p okyw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h11si2137043ild.67.2021.09.09.07.51.13; Thu, 09 Sep 2021 07:51:26 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236322AbhIIOvk (ORCPT + 99 others); Thu, 9 Sep 2021 10:51:40 -0400 Received: from verein.lst.de ([213.95.11.211]:44669 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232566AbhIIOvj (ORCPT ); Thu, 9 Sep 2021 10:51:39 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 8523F67373; Thu, 9 Sep 2021 16:50:27 +0200 (CEST) Date: Thu, 9 Sep 2021 16:50:27 +0200 From: Christoph Hellwig To: Keith Busch Cc: Jiapeng Chong , axboe@fb.com, hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme: Fix missing error code in nvme_configure_directives() Message-ID: <20210909145027.GA32109@lst.de> References: <1631181021-108687-1-git-send-email-jiapeng.chong@linux.alibaba.com> <20210909144739.GA2464330@dhcp-10-100-145-180.wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210909144739.GA2464330@dhcp-10-100-145-180.wdc.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 09, 2021 at 07:47:39AM -0700, Keith Busch wrote: > On Thu, Sep 09, 2021 at 05:50:21PM +0800, Jiapeng Chong wrote: > > From: chongjiapeng > > > > The error code is missing in this code scenario, add the error code > > '-EINVAL' to the return value 'ret'. > > > > Eliminate the follow smatch warning: > > > > drivers/nvme/host/core.c:786 nvme_configure_directives() warn: missing > > error code 'ret'. > > Nak, the code is correct as-is. Returning a negative error for this > harmless condition will result in disabling the controller when we can > proceed just fine without directives. Oh, indeed. We should probably throw a comment in to make this more clear.