Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp155292pxy; Thu, 6 May 2021 23:33:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyccFGVIx5zkV2E4BEXyGzYIkRBZs8xWrByg1ib8E1ymcaBXv9qbe3M5nz/h4EToopgaKWB X-Received: by 2002:a05:6402:1547:: with SMTP id p7mr9515908edx.319.1620369185858; Thu, 06 May 2021 23:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620369185; cv=none; d=google.com; s=arc-20160816; b=tsSF3ZPPe4vcJlNrlbRhSe7zdjxQ9XG7KY0jnrqJaS7yWnRnODi1XDJxg5a0EUMFTd hN2R++BaCbfEVEcNZQRZ90pBQsaCyF3d7UXpleKANpes085KwPS2ir7TJZqdJ//dGWzn 4db5BLXO/otnmZaYuIao5eNBi8mFXKIgnfHbroYrTc4nRNgc5RICVicmFmDerrdhgn7j fFen243HGK42da6bleSdu/i+eD01ivQV114MJDqIf4oelEOr2326Xl5VJbmxb/8RNnrt m8K0e43K0XFAVw9Uaf+164//xta4OwP6Zz1rzTVn8DwvFM93+AqNzVP/Y3GUuTwTEDTi K/Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:sender:reply-to:subject :mime-version:dkim-signature:dkim-filter; bh=tMDSGAXVC4BUwXo0/K/7DTop80yCWUElxEYdrjJ0eUM=; b=qvKGaP4mIZ17eMkSS3hgjn2hrdtwc6lXO/xR6gkzKW4h2nVdrcv7K1XtI0KXP7azLA ClnaQs2+YFGKMeWZzMN2xEAK5ojB/vRIaLvl7kmawsVGITF+kiGVARvXqWOhKW3ADtFL jUBGKuTahgD4RlSrW6h8tmG8nl9FE/lff8rRTslLmSoQKJ/UK9y9P+Pxz8e+jLLtc3JD 41/iYpidWWBKePT1MgdXGOU0RMIYw60t+Nv82zspweWdptTxHSOv3zuCB46rKIoZg0sV 58Y4VPGIBKgDSKP8EuR4RIZNrvETpBG5/o+FKjh6ZwinegMyGM5maRufxCTpmwh5aR3D J98g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=snOia+U1; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si5139607eje.519.2021.05.06.23.32.42; Thu, 06 May 2021 23:33:05 -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=@samsung.com header.s=mail20170921 header.b=snOia+U1; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230486AbhEGDJF (ORCPT + 99 others); Thu, 6 May 2021 23:09:05 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:16182 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229942AbhEGDJE (ORCPT ); Thu, 6 May 2021 23:09:04 -0400 Received: from epcas3p3.samsung.com (unknown [182.195.41.21]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210507030802epoutp0353fe2b1a00b87df67631beb771c5eedc~8qf-smJBg1140411404epoutp03R for ; Fri, 7 May 2021 03:08:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210507030802epoutp0353fe2b1a00b87df67631beb771c5eedc~8qf-smJBg1140411404epoutp03R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1620356882; bh=tMDSGAXVC4BUwXo0/K/7DTop80yCWUElxEYdrjJ0eUM=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=snOia+U1VQuKJ6vWDsbqBoBCUKcGKC1LQQU8Lh2TaTI6nxhywMa1/1HcaBTywUePQ svD3IQxeiI8+E6bMwWiMYd0SxgjqaMFjPP44p0r+duzemsAVH/3JNqA5buoCD8auo2 dfobW8SF7AoI8bkani5cxC/Zqtt5rw46fM+mk1Uo= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas3p4.samsung.com (KnoxPortal) with ESMTP id 20210507030802epcas3p4fe3c2d9bb9ee38323891fbaee7640dcf~8qf-LzOuK0293102931epcas3p4c; Fri, 7 May 2021 03:08:02 +0000 (GMT) Received: from epcpadp4 (unknown [182.195.40.18]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4FbwPG01Mcz4x9Q2; Fri, 7 May 2021 03:08:02 +0000 (GMT) Mime-Version: 1.0 Subject: RE: Re: [PATCH] scsi: ufs: remove redundant initialization of variable Reply-To: keosung.park@samsung.com Sender: Keoseong Park From: Keoseong Park To: Bean Huo , Keoseong Park , ALIM AKHTAR , "avri.altman@wdc.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "beanhuo@micron.com" , "jaegeuk@kernel.org" , "adrian.hunter@intel.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Daejun Park , Sung-Jun Park , Jinyoung CHOI X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <3c5dde7cd24cf10707b682cce0cac74e5ac37e9b.camel@gmail.com> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <2038148563.21620356881996.JavaMail.epsvc@epcpadp4> Date: Fri, 07 May 2021 12:05:06 +0900 X-CMS-MailID: 20210507030506epcms2p69691635624f79d6732fbf6901774878d Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20210430021419epcms2p402717e968615d301ba18341d28a828ee References: <3c5dde7cd24cf10707b682cce0cac74e5ac37e9b.camel@gmail.com> <2038148563.21619749381770.JavaMail.epsvc@epcpadp4> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bean, > On Fri, 2021-04-30 at 11:14 +0900, Keoseong Park wrote: >> The variable d_lu_wb_buf_alloc may be repeatedly initialized to 0 in >> a for-loop. >> >> If the variable is set to a value other than 0, it exits the for- >> loop, so there is no need to reset it to 0. >> >> >> >> Since lun and d_lu_wb_buf_alloc are just being used in a else >> statement inside a local scope, move the declaration of the variables >> to that scope. >> >> >> >> Signed-off-by: Keoseong Park > >UFS Spec 3.1, bDeviceMaxWriteBoosterLUs is 01h, for LU dedicated buffer >mode, WriteBooster Buffer can be configured in only one logical unit. > >Bean > > I don't think this patch has anything to do with "bDeviceMaxWriteBoosterLUs is 01h". If the WB LUN is 7, this patch prevents d_lu_wb_buf_alloc from being redundantly initialized 8 times. Thanks, Keoseong