Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3132473pxk; Mon, 21 Sep 2020 06:10:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOy0KBqT8lbBbg15L3mZfN1ZaHFlOYRLAjPPMc3tO3NyeY9YsoWxd5WDh78B50M3aW/U96 X-Received: by 2002:a05:6402:1641:: with SMTP id s1mr54293182edx.66.1600693819285; Mon, 21 Sep 2020 06:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600693819; cv=none; d=google.com; s=arc-20160816; b=vPijO8e2xG545seQV3smHEJCYEO8MUqmQGf3neS3knbab6DWUgFVu46zKnivrpGaY2 pprLDnN3hVi02M4bCEhTBjuUmj4x77SyhGZJwB9u+wYCsDirnjUiNkbWYuzhvojD2DSl APYe+HefzZrw61y2ovo9J0cPmdpjW7KT66rELCK7beFxylhuH6LQ16Z4QCHqWfZWOSnP IOvtUCH1M5T/miXedfQjidDkUNT5TM6ue8RAXJgq3v3t6UTBXS9wJgcsWy0P3WdOWQQy VOpx4cjIxMR+KRjpz5+RUI2QpsjfZaOb41aVr1wvmquB2hwJvI+JHjjruKIEpD+q+CBP Bnxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=CI/QtwAqMS6hny89laklBlab+MOavdn1ZinmsRajm88=; b=LYncYAeMHo/xoeukvxe9w9n+/sOkQCegWbKZa8Iot4PlL9xa+UmGeEfFwcqxWv/DoK apGJIU0AYxwhwB1GtcLAKbMseZAglpsef2gpzruOdcfmbtcT7TAN33FAFusGkPiPEJo3 mIEsdsSpXWtn4/gH5G0hUUsS10wqavVVsLU0keDeEBPKaloKsVuNHVl2bwVaI5woR2UP mCY4eSMkfDMp01F+ZNyKTxmt3v4EK780DDmNVZ1y+1dvMIWsBvNG5x9olVNFrzCz0zZL 5HqSK6sLwbkf/gjQd2KCQsPkKO3ODLPYoG5AkNLfn25YOcPtJW1bOr3lro21vpqqi5SO rFNg== 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 d3si8181961ejm.474.2020.09.21.06.09.55; Mon, 21 Sep 2020 06:10:19 -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 S1726659AbgIUNG3 (ORCPT + 99 others); Mon, 21 Sep 2020 09:06:29 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2904 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726341AbgIUNG1 (ORCPT ); Mon, 21 Sep 2020 09:06:27 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 14C2077031D4F8552A14; Mon, 21 Sep 2020 14:06:25 +0100 (IST) Received: from [127.0.0.1] (10.210.166.25) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1913.5; Mon, 21 Sep 2020 14:06:24 +0100 Subject: Re: [PATCH -next] scsi: libsas: simplify the return expression of sas_discover_end_dev To: Liu Shixin , "James E.J. Bottomley" , "Martin K. Petersen" CC: , References: <20200921082453.2592137-1-liushixin2@huawei.com> From: John Garry Message-ID: Date: Mon, 21 Sep 2020 14:03:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20200921082453.2592137-1-liushixin2@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.210.166.25] X-ClientProxiedBy: lhreml701-chm.china.huawei.com (10.201.108.50) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/09/2020 09:24, Liu Shixin wrote: > Simplify the return expression. > > Signed-off-by: Liu Shixin > --- > drivers/scsi/libsas/sas_discover.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c > index d0f9e90e3279..161c9b387da7 100644 > --- a/drivers/scsi/libsas/sas_discover.c > +++ b/drivers/scsi/libsas/sas_discover.c > @@ -278,13 +278,7 @@ static void sas_resume_devices(struct work_struct *work) > */ > int sas_discover_end_dev(struct domain_device *dev) > { > - int res; > - > - res = sas_notify_lldd_dev_found(dev); > - if (res) > - return res; > - > - return 0; > + return sas_notify_lldd_dev_found(dev); > } > > /* ---------- Device registration and unregistration ---------- */ > You can make a similar change at the end of sas_discover_data() [and include in the same patch]