Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp463731pxu; Fri, 11 Dec 2020 06:36:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYwazpDqac0VBQcdbayrazfhdquJlUlh5UAehfzlVvxMPNGDKooPpf1ijllIepKjSVU90o X-Received: by 2002:a17:906:1199:: with SMTP id n25mr10941880eja.293.1607697410753; Fri, 11 Dec 2020 06:36:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607697410; cv=none; d=google.com; s=arc-20160816; b=EusgANM3UOVdIEZcBIFWDPm9ETQr0nbm+CadlKlq3s57ttiXz5Sr/eVYxTRJtT/imu byHffW5GQCCofE+grjgWxMWG6eOgoaTFd3GpLiEfR5l+Tz2OpKrKtmq4fxnUt9cr0udi XsTcsZhc1bg/D7IoomW96iG0iaD066OEpBHWPdiVa6wooqHANowq92BSgrJrcKoaoo4u iQYFaQro/jrsx7YpVNoIs7omX5LBcDOw8f39oNMuVuKDQ3mpCkQVwd3q5FTX/LOleJC3 i23/WYn6RUCXkS0X735cL68xVRO0ZnnfXmAaqFu3fBsW2c7aMC+Jbsgrk1BJOO0PwxZg 8pnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Ij2jWlbd33lTLBTZXg3PtNV3E0laB8helhKjcL0SZ3o=; b=MBuG8bfx6Ab25ncIO8MGm0r5zd+sFOSaSjewYNQV+qQ2HxC9VBTo8EfTtV+Hul8od9 Au1zxtaMU3zMvuLYnPx1xy4+jYNDaw4iOAy3LSHIi96NEJ1yndiI38dGisZb49pVu4z4 Tk4UyAYQII5GP98m02L0jaeIMILMfPReM01G3hmO0A0sxbx81zOSFcDbJK80l4TBb6Zy Zt4sVLBCa7zo7wEd0a8i0ZCrYSnsGYvnwVfqoB8ue8hfP/cE2w5HrREzXLvJFrPGrhf1 hCvd+4yE2vm8/qI9Wx0ldcLIBm1G2Jho5TKRnizNpJhzEBo2u89VB1buIqjTog1rO4o4 qXGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bAegCaHU; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a88si4995698ede.230.2020.12.11.06.36.28; Fri, 11 Dec 2020 06:36:50 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=bAegCaHU; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405755AbgLKOBr (ORCPT + 99 others); Fri, 11 Dec 2020 09:01:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395190AbgLKOBo (ORCPT ); Fri, 11 Dec 2020 09:01:44 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB210C0617A6; Fri, 11 Dec 2020 06:00:53 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id k4so9463748edl.0; Fri, 11 Dec 2020 06:00:53 -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=Ij2jWlbd33lTLBTZXg3PtNV3E0laB8helhKjcL0SZ3o=; b=bAegCaHUyMEMbburi06cxlaYRl+cCbKZXTdSpYVVHcHT/OxBDo6R/sFTMRcAdoVlhL 6HPD85In1uAFXHEY4Zl0djrMj1tSXp0KH7/EToVkJPXhxw+NsS8Hr424Qky6bxo9gYQd +cwckb2vOtr3H5Cg7sdrZVIbPMQcyg/ku1NrNLFSVbZZcf9cdrSo1r2gXoLTN+8DJB8n PCV2pdfBp4CFRk4e9TLKGhODmb3IzXnvmcFp+6NeeVqbssc4v8XEn4yj5EjJBtqfjSDN NPMlyT5Jo3XAkce6VvT/iv4+l75N2MA6fkoAyuRKnhV98jVX/T8N/B/TsL1WxB7GNZMo dsgQ== 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=Ij2jWlbd33lTLBTZXg3PtNV3E0laB8helhKjcL0SZ3o=; b=rLBkHrZ2ZFs+2g/kBCpYq6g0XFtBYUi5UeGoELjiVgA6Z3iwX04okWvFRJN906Cb4y +RWPZmsPKr0aNc/C/MZ5DV/gZ67rLzuhhpjbVWhmWMUbEALPPZo4KEBGXNueR1r7gHjz ZZb1X+wuq2HDrVTBAAGy9u5JKZBHuEPPR2nZ6cMhP3Xa1mPbrJdMQKe/ARq1/rkm7xO2 F3pki5Jn4XWERm6SI7ONbtVZrsNR9su7cX1AXiQueHzsiIeVbL56vbfhp9YswAxaF5D2 nu4VQyz2mqfVmnZ69s2j3NBzIg/MSn96GwDTfublr9WRB8ngzSkWq3n27y4udXLR/b6x fXNA== X-Gm-Message-State: AOAM531SeVmW0RZUkacOGSqPr9iZLU2RqWyXa6I0IfBiwqOLYAs5/5oQ AE9ZuJnNmeov3EBbD2KRR+U= X-Received: by 2002:a50:a684:: with SMTP id e4mr11777089edc.148.1607695252668; Fri, 11 Dec 2020 06:00:52 -0800 (PST) Received: from localhost.localdomain (ip5f5bfce9.dynamic.kabel-deutschland.de. [95.91.252.233]) by smtp.gmail.com with ESMTPSA id z24sm7797818edr.9.2020.12.11.06.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 06:00:52 -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 v4 4/6] scsi: ufs: Remove d_wb_alloc_units from struct ufs_dev_info Date: Fri, 11 Dec 2020 15:00:33 +0100 Message-Id: <20201211140035.20016-5-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201211140035.20016-1-huobean@gmail.com> References: <20201211140035.20016-1-huobean@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo d_wb_alloc_units only be used while WB probe, just used to confirm the condition that "if bWriteBoosterBufferType is set to 01h but dNumSharedWriteBoosterBufferAllocUnits is set to zero, the WriteBooster feature is disabled". So, don't need to keep it in runtime. Signed-off-by: Bean Huo --- drivers/scsi/ufs/ufs.h | 1 - drivers/scsi/ufs/ufshcd.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index 45bebca29fdd..8ed342e43883 100644 --- a/drivers/scsi/ufs/ufs.h +++ b/drivers/scsi/ufs/ufs.h @@ -544,7 +544,6 @@ struct ufs_dev_info { bool wb_buf_flush_enabled; u8 wb_dedicated_lu; u8 b_wb_buffer_type; - u32 d_wb_alloc_units; bool b_rpm_dev_flush_capable; u8 b_presrv_uspc_en; diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 528c257df48c..0998e6103cd7 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7243,10 +7243,8 @@ static void ufshcd_wb_probe(struct ufs_hba *hba, u8 *desc_buf) desc_buf[DEVICE_DESC_PARAM_WB_PRESRV_USRSPC_EN]; if (dev_info->b_wb_buffer_type == WB_BUF_MODE_SHARED) { - dev_info->d_wb_alloc_units = - get_unaligned_be32(desc_buf + - DEVICE_DESC_PARAM_WB_SHARED_ALLOC_UNITS); - if (!dev_info->d_wb_alloc_units) + if (!get_unaligned_be32(desc_buf + + DEVICE_DESC_PARAM_WB_SHARED_ALLOC_UNITS)) goto wb_disabled; } else { for (lun = 0; lun < UFS_UPIU_MAX_WB_LUN_ID; lun++) { -- 2.17.1