Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1006510pxa; Wed, 12 Aug 2020 20:19:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjNCUZnjczImorJVHznwDjU3YKFE/n4GH/zo0TRUH84owGH1FwNXJFMHMTqQSJutcrRt8v X-Received: by 2002:a05:6402:339:: with SMTP id q25mr2729833edw.268.1597288789888; Wed, 12 Aug 2020 20:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597288789; cv=none; d=google.com; s=arc-20160816; b=FlHp+Cp3eVmzta+VSjrg6WQPOcQI/C/h3tIVPIrjyLSkxagjKeXIu8xk8I0yY7sBTs Tw4s0EQRaUcxKeF4aM1Y4GzZOKB92MYSjHMddUX+5VjrN2d1FkDkvx9ubPCiP+yQqpFl 3nqzaseox17CwwwRu2Bt71QF8yXGo0BpviccZ2D7gcPOz/TwPsObjmrAkX3ANkIMevdB tCyB4vDuHOMqyUDpSIwM1QmGPPRu6YjvboalOkswJtU91HByNkGmKKZq95eFUdVXjsZL +vRJGqaRisPlbtLo+Tb397bbagyq+WAchY2jgXytLBeFIclRO7t9mr4Z/PEpgoEhpC0P 0mzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:reply-to:subject:mime-version :dkim-signature:dkim-filter; bh=PbimsoKST2hIlxdVObLAJhxRszolI+mgrlOzs8o6b4g=; b=Th1Od51k+COsT9Ye7BS19vOSLsU9XGm91ekNs5/JPJwI1F53XlpGol+n6hXUlQExpo U3TmL2JUP1xA72tWwM2I3R8D6chWag2IQ1K2dcmiasKgOj29kTdsAoDm0FPTUFt9vybJ 9hIHN+3b+jSsOq860SZdeaUgez2XjdV8CvGFEYAS+5ImiUe0NEqSzlbaNlgaQNCgbhKE 62FHsQXd9H0JeC/0CQtdHVfTkLk/t91kXn6vnAauPvR8y/OwTaJ+FuDmKlndafDziyx7 I5qIShhfbc6YlnQv3WxjZbPDeUAf4NqEzuE+FUfRJAuX+WzZdZM7FBPcwyx96PVJgs5s F45A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="VKqIB/4g"; 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 b21si2410810eja.19.2020.08.12.20.19.27; Wed, 12 Aug 2020 20:19:49 -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="VKqIB/4g"; 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 S1726683AbgHMDSH (ORCPT + 99 others); Wed, 12 Aug 2020 23:18:07 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:44293 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbgHMDSH (ORCPT ); Wed, 12 Aug 2020 23:18:07 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20200813031804epoutp01a62cfaaec407aab8a041d2f1b15703e9~qtZhuWn231998619986epoutp01S for ; Thu, 13 Aug 2020 03:18:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20200813031804epoutp01a62cfaaec407aab8a041d2f1b15703e9~qtZhuWn231998619986epoutp01S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1597288684; bh=PbimsoKST2hIlxdVObLAJhxRszolI+mgrlOzs8o6b4g=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=VKqIB/4g5SmiHIn5pKHW/hP1BEKlkZ95mfd8A0M8Yio9v4ZDqDEAuSRCYGWi4YE87 /WMitBDooPf4QVOXcleElil6YWK6YTDvxuEXWgtZrs7dmt//RRmm8oxH6g+mel3jLw 3Ztc4bk6teh9xrWs68Pv8/Ftx/EyIcE9PAqLbhQc= Received: from epcpadp2 (unknown [182.195.40.12]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200813031803epcas1p2f2585f68585a95c2160db0e5ab12d4c4~qtZhVpD301239712397epcas1p22; Thu, 13 Aug 2020 03:18:03 +0000 (GMT) Mime-Version: 1.0 Subject: Re: [PATCH v8 4/4] scsi: ufs: Prepare HPB read for cached sub-region Reply-To: daejun7.park@samsung.com From: Daejun Park To: Bart Van Assche , Daejun Park , "avri.altman@wdc.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "tomas.winkler@intel.com" , ALIM AKHTAR CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sang-yoon Oh , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , Adel Choi , BoRam Shin X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <89f7bd4e-b328-7916-b099-2882d5182236@acm.org> 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: <1239183618.61597288683730.JavaMail.epsvc@epcpadp2> Date: Thu, 13 Aug 2020 12:15:36 +0900 X-CMS-MailID: 20200813031536epcms2p2ad6e0310107279aee230e411a4f2d8cf 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: 20200806073257epcms2p61564ed62e02fc42fc3c2b18fa92a038d References: <89f7bd4e-b328-7916-b099-2882d5182236@acm.org> <336371513.41596705485601.JavaMail.epsvc@epcpadp2> <231786897.01596705302142.JavaMail.epsvc@epcpadp1> <231786897.01596705001840.JavaMail.epsvc@epcpadp1> <231786897.01596704281715.JavaMail.epsvc@epcpadp2> <231786897.01596705781817.JavaMail.epsvc@epcpadp2> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-08-06 02:18, Daejun Park wrote: > > +static inline u32 ufshpb_get_lpn(struct scsi_cmnd *cmnd) > > +{ > > + return blk_rq_pos(cmnd->request) >> > > + (ilog2(cmnd->device->sector_size) - 9); > > +} > > Please use sectors_to_logical() from drivers/scsi/sd.h instead of open-coding > that function. OK, I will. > > +static inline unsigned int ufshpb_get_len(struct scsi_cmnd *cmnd) > > +{ > > + return blk_rq_sectors(cmnd->request) >> > > + (ilog2(cmnd->device->sector_size) - 9); > > +} > > Same comment here. OK > > +/* routine : READ10 -> HPB_READ */ > > Please expand this comment. OK Thanks, Daejun