Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp593754pxb; Thu, 9 Sep 2021 07:49:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+d0sjRigSI9gxX+KdhCfsJns5gQVnuorHdBJWwEx92zzTM90FuYhZCv4HQ4vtT7eHg3HX X-Received: by 2002:a05:6602:22d4:: with SMTP id e20mr3007124ioe.203.1631198962880; Thu, 09 Sep 2021 07:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631198962; cv=none; d=google.com; s=arc-20160816; b=fecDee75y0OW+HWcFwCRWgeX73UUacDsTCsPyOajkAUIigVvRyz9QaXaYH+/UA+Rtq mAigIaA/ZrnwKnnbFQ1jTI5g2yehUx4aI70QZCKW6zob6BcCKb17pYjLf9EjgPp1p3Po bTHLn0mHUwJwP2C9bi23Z5vxUSW1WShwUkI/ySAEgMvh7RGLCW9ujJIa56hFn39UnMBj c/ZqHo/eLJIo8yDyNXxtDoJCh3AkW/UTaJO79ZAtgxXXIOGsCBYOqU+Us3f8ZAUisB9T 8EP7sip+Fb2Srjz8ystXKP57xaInNtkfSFYhezd9loBCoJtKn29j51R+7IJMks56yGXl AWqA== 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=n9pOvbH1uJzhbwSANx7XQSZKn1ftayYDpXeQ76gDvU8=; b=PJ7A23FPKsQAoWPXVBea7OBRoTgHA+fAizBj7apZsHzeGvJKogMm73TJ6VYCI90yKT aDacD/x2SEmNDrrC6AaWIggOb7G5izrySCbDqAK31+iKeTN4SH/xwAWprKcAY7AQdQFz XB8fMHeUSPSZnBs6sCWGCOvq1gN3+RGNLnjrKkQ+AqaxGw83do/SQm/WjRciZrdQaYZ8 MyeriKdMzm8qoPFT81K5ItkwN5/4WLNJHd4ROiZuh9iNBUZ1uzqUU+7NKLqnZleQoYXJ m0oDRHxsHI3aoYGqDvc8OA0bIEmJEnzLMz0XgYKXkzLYhTRhTsImDc9rnQcWxqDvOoqL XxTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IlXZ8ig5; 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 n3si2060852ioh.98.2021.09.09.07.49.06; Thu, 09 Sep 2021 07:49:22 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IlXZ8ig5; 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 S238647AbhIIOtC (ORCPT + 99 others); Thu, 9 Sep 2021 10:49:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:58098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241698AbhIIOsv (ORCPT ); Thu, 9 Sep 2021 10:48:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BAEF0611B0; Thu, 9 Sep 2021 14:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631198862; bh=Dz/OOUamLZNNHgporcJbIVgfcdT9MPY39TSGUVp8YKg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IlXZ8ig5LFKt5nySMsmNqcvj9N0NGiSHlJnSyYkoEaErTynyQqibuV7k3LT1w7vjo H0jy+qQtpWi3aBvryvheZhPM008LNRfdXPofGsBN02tQitwSDwNgXSr6dUMu/AgvhY 9ducIeaNn6lyD0/sbi/V90SDfoUb2XNzbkfWCkuWcOxrySPn+v46yC56akSRA9Iv7s Wez8eeyovNqtcFHsOtV63plqtlMc11iwD5Mrkrjia0QwNVL8vPRys0EDwklvJ3gYhA V4kb5ksdiUCKkPSg5KREYd1NZca/zeqf0cxrvV6EOoD/zyty+fWsniBq3ag3gEz+e7 DyIaOdMZPO1Kg== Date: Thu, 9 Sep 2021 07:47:39 -0700 From: Keith Busch To: Jiapeng Chong Cc: 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: <20210909144739.GA2464330@dhcp-10-100-145-180.wdc.com> References: <1631181021-108687-1-git-send-email-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1631181021-108687-1-git-send-email-jiapeng.chong@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.