Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1423131ybk; Sat, 16 May 2020 10:52:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGtzZicvTGtXLmTE8uOzShfaaSPB93lq8tPRqzCBUunz6SjZ2URZ1jHnTxYvbKkS2+DHRa X-Received: by 2002:aa7:db4a:: with SMTP id n10mr7625514edt.11.1589651523425; Sat, 16 May 2020 10:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589651523; cv=none; d=google.com; s=arc-20160816; b=jd8QPsX+MQSGx6zjycM05drHYNmnhu2Q/qi7KpBUD2gG552hjrj1LTSogOUQQUgVi3 XDDLNQIjthFBsDNNyzIuS3JCMZPEbnPSoDKlUbLAf6+FintFlgmmpbi1c08YwN7mR9ql 3035LU6iXEzxlvq+aDbTDH0jzK6Zq8TckPpqouIsMwm0X8HVELUUOKXQEDdkkgHxn6gW goz9AL/wvLUD1ey2VbKH8Q8UVSWnmhCdmxhtgcuaQis+PkCsrORsoO4uVa4E1ULBumb4 k2IAH7hHq+l5MvnShaCYNBOskzZG84uqHQymbMW4c8JyFEKD14+hdN2io3MjOSIKJXdh 2UcQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PrNUpAGGHxvWrJzA/AaC7xbxGixXNbcXanDsGKKHfFM=; b=ntfZBIE16PHzR8aC1bcUOuHZc7KIv+taTdsnzccucWUROA2sUJfj6EPeUMx3gZOcmA IY6flYWYI7sIzQtQf/0JRMcavzKEWO2KgpL9RkZnHzwehmz3U/APAq6w/dF/pE3X5dd/ Z4LsZeUCV5KB57Mr/lbgMU1QitCk6rJHl2hdsn1SE9PwvjwK4buzwB4u5qj/WQzUttoG 9Rz8sr1xKf/c/z6fImd6fObLgkv4upZdOUmb+iyQOI/PtST32AaP1JZAYCWAKNISD4cS TuMmX6OzfsTr/nvgzm4CUf863JiRMw52OsVdHexZAlshco6qvOh+lPFrQSOScnqRanxQ 8r+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=IjfGKUQX; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 23si3378043ejn.282.2020.05.16.10.51.40; Sat, 16 May 2020 10:52:03 -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=@mediatek.com header.s=dk header.b=IjfGKUQX; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726537AbgEPRq3 (ORCPT + 99 others); Sat, 16 May 2020 13:46:29 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:20465 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726490AbgEPRq0 (ORCPT ); Sat, 16 May 2020 13:46:26 -0400 X-UUID: a7f7343379f74c3e86bb9beeacca60e2-20200517 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=PrNUpAGGHxvWrJzA/AaC7xbxGixXNbcXanDsGKKHfFM=; b=IjfGKUQXSP+hs4Xi8xxMpevxzVmOhiDxblwIim/iKyyUwcRe1OA8u9o64iUb+KCJT1RrK1EcWI1Rrrl+uAoplkcmowDGcArT6HxPEpHa3NhR1L8QCyjBBvEEq0jMgamOjFVDy7n6N/zGpu5zBe3Lo5wWlwbdIHCd87dCYGTZGlo=; X-UUID: a7f7343379f74c3e86bb9beeacca60e2-20200517 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 566988532; Sun, 17 May 2020 01:46:19 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 17 May 2020 01:46:14 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 17 May 2020 01:46:14 +0800 From: Stanley Chu To: , , , , , CC: , , , , , , , , , , , Stanley Chu Subject: [PATCH v3 3/5] scsi: ufs: Fix index of attributes query for WriteBooster feature Date: Sun, 17 May 2020 01:46:13 +0800 Message-ID: <20200516174615.15445-4-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200516174615.15445-1-stanley.chu@mediatek.com> References: <20200516174615.15445-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 6D1E189A851CC38BC9BAE1031F40D1F3B01FD5E2186E22E32CB3C8BCD5CED0662000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rm9yIFdyaXRlQm9vc3RlciBmZWF0dXJlIHJlbGF0ZWQgYXR0cmlidXRlcywgdGhlIGluZGV4IHVz ZWQgYnkNCnF1ZXJ5IHNoYWxsIGJlIExVTiBJRCBpZiBMVSBEZWRpY2F0ZWQgYnVmZmVyIG1vZGUg aXMg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