Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp996652ybl; Sat, 18 Jan 2020 16:15:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwa9jXsXPdRlK/TGp4loytDC5K6tYQLeFRyQV82tZ+OhxQFj7H1TF5ZWqpAAIbZ91wl25Pb X-Received: by 2002:a9d:dc1:: with SMTP id 59mr11055983ots.250.1579392947890; Sat, 18 Jan 2020 16:15:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579392947; cv=none; d=google.com; s=arc-20160816; b=V/5eFAzPvhlrOJP+XJ7HC12aVEF/pYQYeF8gahXi+fn8RcBj8nn8CQjFFKKIBQjjDQ u8LYyHavaOmGApYJIQla4XCaQIG6VkftiedG96ZnSbrW1PYuKGegNnQziA3jadmh2OO3 /j4zt3Eigzp9ZxD5dLRHfAJlL4QA8T/aQn3RBUXdgR3nBD9w1oBGPqXI4fcQcDhOS64k oZm84lYvBnzsJrG/kNqtQhEs4+vx0dsxVgYSWAL5fBfbJ4TKrY6wSxE2jJqzndWWxZSk +3GbkqPgMYWrOoeDVZnd+Jx2H66mMo86nyFVWtVzlR6zPQI/hyR46nMHQSxrGeYawnWp qDdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ugnjhMRTmnK+PtKom+FYsDk92nymRWFHwav/7Qa5gLg=; b=PVhNEuC2297RfmcIOWZXtqfkqzwtLrgR6tN0GHhnYxWpJs3AKi3OsaHMlWfQPOHyNF 5Rn9+DamNFqCEIuB0wE8PJ4DHJuI84mnsxVF8FtYOkVSbYoxEWZN2U+rhqTLJWAfpH2q Y25a6i7PbqzdN+kOE60tYs/xC3jXIC0QHPnXlqEVuhB6N7urdZcsWxRQPtoMfG0i9/U2 FnHgi1qvIbrV3uiV1TjMvelIdFwlNFckS5NhEVDhagtSypPtd907ih9xo4lOJhkcoJN4 oyYO3jb+xfQtXMxHGa37rFFmr0gnnuK8mReCak2h7xYbrOHP9KJia1lKlyYa9DEp09P8 sFEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="fb/I1AUO"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f17si16412130oto.85.2020.01.18.16.15.35; Sat, 18 Jan 2020 16:15:47 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="fb/I1AUO"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729019AbgASAOR (ORCPT + 99 others); Sat, 18 Jan 2020 19:14:17 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:51410 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728901AbgASAOO (ORCPT ); Sat, 18 Jan 2020 19:14:14 -0500 Received: by mail-wm1-f67.google.com with SMTP id d73so10892868wmd.1; Sat, 18 Jan 2020 16:14:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ugnjhMRTmnK+PtKom+FYsDk92nymRWFHwav/7Qa5gLg=; b=fb/I1AUO9WZ+sdrn1r9HSCuC3R4I3ezam0h3JleUYJACLuGWZ1tdZfA5gAfKviiP0Z HS8qM1r6zT+B/jWR5VJYIPCSi493opNtjZRuGDg4hwxi5fcuMLYJnXyHYOFTE5ViFK0Q QHybKJJc45aVFTdfBhE+yAtK8I9mKrl2hLeDif+Ae5nhKiBMSfZE+SwdjaeA5+eoIXja K4UxFp4ULvpgy+4bHNElNTZ70lQdDdfsNEHASiuLdTRXBid1awWV0DVYIXl3F41mlH2L NQQOsRl2623Udvzc2iAXa7hkI+IlLxG+t2pFLAaQzwaKBifseUBUiIT2BmOVkJ9PmlN5 JzGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ugnjhMRTmnK+PtKom+FYsDk92nymRWFHwav/7Qa5gLg=; b=laJH/2SHm6GE2GmArH948iXWn28kBe26ghRIPR5nyA9VfU0wlBHloWmYdey/tqp2Ly ENRAlL5p3r2yG5SWQjXeTL3D6RGMZPjAWeifayJMALtBHJI2zA4ODCmeZalofCHE0GFi Y+ApOEGWenElEAt4GhN/SmSyPfAWEVTkXwbSlvdGqL6D2jez3hj6HpWyqrNMb22ApTGe VZWEdow8Q/5ufuGzJuVe00wRLcLnCCF9YeCBzLPr1PfY0iOdmzxaxQvm2S6XGV6q1VGF AhESTfgvgBSlhklTlgWbgo5djEcVYzfmbFWmtFF8ytyOImHJfzpAprDUNQSRAhG/uq+Z X5og== X-Gm-Message-State: APjAAAVSp+8IMDPhH2WpXGPFGvz1yzimSEq2FyxTuCsismStPIwH4sfj +IPtxEQuB+pfJ9qL+RtmH8o= X-Received: by 2002:a1c:3187:: with SMTP id x129mr12358687wmx.91.1579392852886; Sat, 18 Jan 2020 16:14:12 -0800 (PST) Received: from localhost.localdomain (ip5f5bee3c.dynamic.kabel-deutschland.de. [95.91.238.60]) by smtp.gmail.com with ESMTPSA id i8sm42177432wro.47.2020.01.18.16.14.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2020 16:14:12 -0800 (PST) From: Bean Huo To: 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, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 6/8] scsi: ufs: Delete is_init_prefetch from struct ufs_hba Date: Sun, 19 Jan 2020 01:13:25 +0100 Message-Id: <20200119001327.29155-7-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200119001327.29155-1-huobean@gmail.com> References: <20200119001327.29155-1-huobean@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 5f3b0ad5135a..4f8fcbb5f92e 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6967,8 +6967,7 @@ static int ufshcd_add_lus(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 ufshcd_add_lus(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; } diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 32b6714f25a5..5c65d9fdeb14 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -501,7 +501,6 @@ struct ufs_stats { * @intr_mask: Interrupt Mask Bits * @ee_ctrl_mask: Exception event control mask * @is_powered: flag to check if HBA is powered - * @is_init_prefetch: flag to check if data was pre-fetched in initialization * @init_prefetch_data: data pre-fetched during initialization * @eh_work: Worker to handle UFS errors that require s/w attention * @eeh_work: Worker to handle exception events @@ -652,7 +651,6 @@ struct ufs_hba { u32 intr_mask; u16 ee_ctrl_mask; bool is_powered; - bool is_init_prefetch; struct ufs_init_prefetch init_prefetch_data; /* Work Queues */ -- 2.17.1