Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8588322ybl; Thu, 16 Jan 2020 20:18:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyz5Tcmcrm1DP/XThLCk0mX6hkpFp+2/6N8Frw7L+K9NrqowGM9K2DPiz+M+PY1NwRdpTfn X-Received: by 2002:a05:6808:611:: with SMTP id y17mr1997221oih.146.1579234728717; Thu, 16 Jan 2020 20:18:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579234728; cv=none; d=google.com; s=arc-20160816; b=WB7OUcdwKd9FCJeyfNzmIHGCz1xb1xnjpVC28bt7rTT81pH036e1A0v9j9uEEVV5D3 LPJY6nR4kZQhCuWmAaSTsTU9rCGrqbL/Eqk+N6e0SJoAAJOo8d24UNnibpb9bKltdEkl 1uOtnHZXBkktOK0LWjARDPaNU+2aYcVmkFvjmszny6Veq2BS1FbxbcccDfeGjkivR5VC TUUHqmGlmJHlnZe6ssTZ7tH/7ybvImOkjeFXPDtChxd9yU20LqtSGZVsGxFtZKjwJROX zW7noZVZRr5KK67IV8AGAM9h2M7fl8enQFD+Aev8ktMjAogY7pAlx0MoF1fFBg+28MFu K+Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=j/gmt+S+U5biY49eR+qUY302EUGG1032iY8t1Ue0P1s=; b=L1IqvTCNeXGdpDiLW/L/iz2wIADGeJ1vEM8YNHTGiRBziBFu/cBKmj16rfb2t+7JtH sfHoPu/R+Wtu7+OOw6VHW7tcQyrBZzltuxMEeKMP/YKBNTlcrwPeIfPyQWRq3sVXUNN3 NW4zxvgTQRBiq1GNLa6SlgbSN1TtmBIiwCYqPOxrBtX4gwvD4BGY2B1TYklp7kNfWq2U 2YuHoqk32DgAaf1IoPOxIikNJ9r+RhKt7/b+1l2jHMVjVeStmD7Wuoe0sYTAiQrbC9Bz v78N1RlPSO2597Y5zQ6CiLUI6brPQWoQvFuWwKSRntsB0m8DT21WCoisQXKevbJlrMDI 6wBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w29si16614185oth.313.2020.01.16.20.18.36; Thu, 16 Jan 2020 20:18:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730055AbgAQEAO (ORCPT + 99 others); Thu, 16 Jan 2020 23:00:14 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36387 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726853AbgAQEAN (ORCPT ); Thu, 16 Jan 2020 23:00:13 -0500 Received: by mail-pg1-f193.google.com with SMTP id k3so11000187pgc.3; Thu, 16 Jan 2020 20:00:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=j/gmt+S+U5biY49eR+qUY302EUGG1032iY8t1Ue0P1s=; b=SjDjmIptcOzs3J32TQ2+idVc5baQvUVKjWwx/vINIdyY+ETBRl9/yyElOuiPGzwMME JLJ9QG0vQu0+4tgUAoBmlu+JZXKyB0taGZJuf2HWcjNUH8JAnvK1true3bwuRZsHBym7 OM3fxA9YleS0FoSQJdq6RCnUKTtlkEtns884vsZZ1lOeZQI5vGakkKjIo2Trv3av0oTg qUiOicfmquxA1z7ITO27HYChrBppf6+BtisMKK0jFoYjX5cXs+cMDs6kPb3M3C2TH5XG oKe1dRks/dVN9Kpz2wRTYXwKCpQjT8UwGXkKosHKum6b1ixm630tpYuuBTDncKiZ5tCg 09uw== X-Gm-Message-State: APjAAAVcFnnf8P6sld5eezfeJ2S15vR45ItdQwFOawDAznuO3Sf34z9e nogBdJlzeKpGr0S2LrQqASLV4a6Wl50= X-Received: by 2002:a63:ce4b:: with SMTP id r11mr44165950pgi.419.1579233612897; Thu, 16 Jan 2020 20:00:12 -0800 (PST) Received: from ?IPv6:2601:647:4000:d7:8dfb:7edd:e01b:b201? ([2601:647:4000:d7:8dfb:7edd:e01b:b201]) by smtp.gmail.com with ESMTPSA id u26sm26061663pfn.46.2020.01.16.20.00.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jan 2020 20:00:12 -0800 (PST) Subject: Re: [PATCH v2 6/9] scsi: ufs: Delete is_init_prefetch from struct ufs_hba To: Bean Huo , alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, tomas.winkler@intel.com, cang@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200116215914.16015-1-huobean@gmail.com> <20200116215914.16015-7-huobean@gmail.com> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbtBkVoJ/jQsi2H0vBiiCOy fmxMHIPcYxaJdXxrOG2UO4B60Y/BzE6OrPDT44w4cZA9DH5x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Eo998alUfn5XU0RQDYdwp6/kMEXMdmT oH0F0xB3SQ8WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: <125ff67c-bcd5-69e7-2ec8-203b805c246b@acm.org> Date: Thu, 16 Jan 2020 20:00:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200116215914.16015-7-huobean@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-01-16 13:59, Bean Huo wrote: > From: Bean Huo > > Without variable is_init_prefetch, the current logic can guarantee > ufshcd_init_icc_levels() will execute only once, delete it now. > > Signed-off-by: Bean Huo > --- > drivers/scsi/ufs/ufshcd.c | 5 +---- > drivers/scsi/ufs/ufshcd.h | 2 -- > 2 files changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 44b7c0a44b8d..31b6e2a7c166 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -6967,8 +6967,7 @@ static int ufs_lu_add(struct ufs_hba *hba) > { > int ret; > > - if (!hba->is_init_prefetch) > - ufshcd_init_icc_levels(hba); > + ufshcd_init_icc_levels(hba); > > /* Add required well known logical units to scsi mid layer */ > ret = ufshcd_scsi_add_wlus(hba); > @@ -6994,8 +6993,6 @@ static int ufs_lu_add(struct ufs_hba *hba) > scsi_scan_host(hba->host); > pm_runtime_put_sync(hba->dev); > > - if (!hba->is_init_prefetch) > - hba->is_init_prefetch = true; > out: > return ret; > } The current code calls ufshcd_init_icc_levels() once per HBA. This patch changes that into one call per LUN. It seems like the patch description contradicts the code I see above. Thanks, Bart.