Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp3007440ybg; Sat, 6 Jun 2020 08:01:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9N5hYJnXkQ9CGiFPlkQ7rrivhY6+67Of4WRBDe00MDGyKyekS3iXuIeWvwFE64MJTyVVp X-Received: by 2002:a05:6402:a42:: with SMTP id bt2mr6964757edb.42.1591455695683; Sat, 06 Jun 2020 08:01:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1591455695; cv=pass; d=google.com; s=arc-20160816; b=KJDvIwZfN+CdXYQdajaivNNenY8kb2TH2rsl9WjbSjHz1VGPVkDU0ENoltBsDcbHPP odbJr5bpSVUwxpbZhH01o+9f7DT54gKqBaCiSnCLTgtgPMqEa1XSWvYTfTsGCyppZQc8 MqXBfU0bNRIqL3PQLmIY9Krl95wlEQOXdeZs7kAmBJPeKzIubvUV0ZNyB5W0SXBRS+55 3SKXnNiOjucqg4YfFi7n+QqmVEIlyBw48sPhCE+B1o7ljWhii6sk0OYfFiEuO/vIlhgb Nj3KFYfLayE4VyaiW/UkMBOR6vGeqcy97BJV7HMjFBphXhtfvfUaLTEGPlIhpYevGFeY vNIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:ironport-sdr:dkim-signature; bh=A8b8ngUoeclBWwg/9bWjzwsc7BTAvMEYnOSBjaZy1LE=; b=S5KY1NjU+osVFsT394JVg2+SWHTd/3eoFmlcO+OjOm6ayTvosq/uXyMcnSRYRYQj69 M9IaJWEnkbQh/pnjejqgKQ4RT634WCGYRVos+X9E6d1j37LCJGJ/GLYY4NYswVQ05g6y FMIujm6BQLDThT0q9Qa3fPMB6F1uR1ZUMSihhapQvIgFKoAKnTeQy7NJsDLSdi7OHK3U 7UavH9xZQJvZ0LE0SUZsXUiQRJPMjV/je58cYvatv4DZxSskiWdb1vYuZrmoSepkVRXN M9Wny8VDLtdvZh/0+rglapBrfcmess8oyShrsT6YrZ7Gr6Ha4McAhMlc/dsM2c42K2cW eNkw== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=OxKUOwWl; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=feR3mr45; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gf16si5421456ejb.490.2020.06.06.08.00.58; Sat, 06 Jun 2020 08:01:35 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=OxKUOwWl; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=feR3mr45; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728714AbgFFO6Q (ORCPT + 99 others); Sat, 6 Jun 2020 10:58:16 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:26304 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbgFFO6P (ORCPT ); Sat, 6 Jun 2020 10:58:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1591455494; x=1622991494; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=A8b8ngUoeclBWwg/9bWjzwsc7BTAvMEYnOSBjaZy1LE=; b=OxKUOwWlz3bTs/ixuyCMcvIRS1pe4wrtMQ0+aqk3nHB0NRuel9X+SIIA ypiMHprKsAiPhPZs5ciTCxFQJCQl1V0n4jklcu+ILhG6Nh9JSTmPZotJI IrtDsAFBhKhBwxU8j8Jf/H3+DTYXM4PAMQjkb0L7Mo6sGodkcXUm2oLmv Kx7iAgTIfdHYSp0hxzLO6CbEmE+XvK0oInHyR4W0lrlx8btF1QlOEjj3M 6u0J+KsafaV57ayUuiv4SO5m232xCBNNS9/Ocfz/NygyAuQgkkLb+2Lww QkpK7yqx+qpGJP3raB/6evmHj5udWUPuIb3TJpADXiOJvVB0GJWwwCQX/ Q==; IronPort-SDR: lNoTUGO0TcLytdX8Id/VGHdCIsV/r6mQIfO2pyYBkivxGA5GYHyxJvPFZwmM3PsyZ0/2B86ap1 /RQZMWRlFw4fNGGeSjbhRJ5l1lYDEBXkc7FCjFgC1kJikkZxi9biid4EFUVynUwBXqoSYk8KlO isoFOcgd4eSOx/mNoLaEii647OhD4F5nK2H7kPsW7MsnzdtuSr9kx5SR5Ysf9awZPC54aSLluc 3BfvbzV6b3k0lzQYoZaXqv23u15e8vLyXgpaafhuVdPZPIWfuF0rgyQHbvoZqG+iHJsTVfXOVd sh8= X-IronPort-AV: E=Sophos;i="5.73,480,1583164800"; d="scan'208";a="139662669" Received: from mail-bn8nam12lp2170.outbound.protection.outlook.com (HELO NAM12-BN8-obe.outbound.protection.outlook.com) ([104.47.55.170]) by ob1.hgst.iphmx.com with ESMTP; 06 Jun 2020 22:58:12 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NqXBi0PfUVYNurUydxeyuSJHXDAq5Km1FyDE0cqUmEtwbH/Mh6J4Fr/V3s791weOd5izLVVOqLtWNV2qPbby4adi6dO/i8PSqMgyqn70aVvEkzyzvPti2NUy0/It8xtktVHyKfsVj7Y44uPvv4mUisGR+sa5bZEW0Q5+Er4Vqh901R6WmIbU6QTHTfurTilJjPqN524JfXZasofguGAWTPz7qjRArwDod2IjUyIG05pI/dVwuFPZ1KdVEEBfRCsWbggjCsuoNEbjsy9gXSZrPeM5EMP/9vfV5duka1KSjxar8wqzQUzpY1ricJcTb139riiTUeNswe/u1EgvwDBe3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A8b8ngUoeclBWwg/9bWjzwsc7BTAvMEYnOSBjaZy1LE=; b=C83UWpwqFnXSfZccSOu9mbqzT/pXXPO4iVViYrEgFD3Xf4DmhRq8xGPCqUqdTc6EIplWbVUUSIPasVH/5MpdDV08ikMCd0S+860PHkUwmjkQWx4MTL2qKzmuaCXMl5/sJn59D2IWzz0OdZxC0w+Ae8cM208ihBTKli837dyBdLXt+cDO8ZQIEXCYfwgfQgQvnjgW6yywBLvy7Gd9lSnNEnbAqzFzw5T+5kbFaHcIUDVKe+xfwJEnPbZilqnhnMr4ji+j56yGA9LVuS9oO3M63Jcmi5KFd1nVSETC/WA1Mr3wOJppxDF78K+y3UtkkEa7NLX4u1pn5OJoO9jOp+Cf6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A8b8ngUoeclBWwg/9bWjzwsc7BTAvMEYnOSBjaZy1LE=; b=feR3mr45c9LIzn678jfHtcadKaSSP981LB0vqeBHSRJmT5hMN8TVFhPczuAfIagwVOb/iVCuvBpX32E6XzZ+ZRwi0bcuT6DrZY3nTCvchV0um4HtruLQwrZtZ9uc3Dp7oPkNFqn0OZLm6JOHqPPkUvr1NXP9nN9fEBYJQZgG2ag= Received: from SN6PR04MB4640.namprd04.prod.outlook.com (2603:10b6:805:a4::19) by SN6PR04MB4992.namprd04.prod.outlook.com (2603:10b6:805:92::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.19; Sat, 6 Jun 2020 14:58:09 +0000 Received: from SN6PR04MB4640.namprd04.prod.outlook.com ([fe80::9cbe:995f:c25f:d288]) by SN6PR04MB4640.namprd04.prod.outlook.com ([fe80::9cbe:995f:c25f:d288%6]) with mapi id 15.20.3066.019; Sat, 6 Jun 2020 14:58:09 +0000 From: Avri Altman To: "daejun7.park@samsung.com" , ALIM AKHTAR , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "bvanassche@acm.org" , "tomas.winkler@intel.com" 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 Subject: RE: [RFC PATCH 3/5] scsi: ufs: Introduce HPB module Thread-Topic: [RFC PATCH 3/5] scsi: ufs: Introduce HPB module Thread-Index: AQHWOtxXhjJ5JD6j7UapdYSyFhANFKjLg3wg Date: Sat, 6 Jun 2020 14:58:08 +0000 Message-ID: References: <336371513.41591320902369.JavaMail.epsvc@epcpadp1> <963815509.21591320301642.JavaMail.epsvc@epcpadp1> <231786897.01591320001492.JavaMail.epsvc@epcpadp1> <231786897.01591322101492.JavaMail.epsvc@epcpadp1> In-Reply-To: <231786897.01591322101492.JavaMail.epsvc@epcpadp1> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: samsung.com; dkim=none (message not signed) header.d=none;samsung.com; dmarc=none action=none header.from=wdc.com; x-originating-ip: [77.138.4.172] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9e93b82f-2446-418b-08c0-08d80a2a06dd x-ms-traffictypediagnostic: SN6PR04MB4992: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:1169; x-forefront-prvs: 04267075BD x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vmTiZt5nPgOSnmXD6yR7nyn4DnCmxVscPOHNkdVyzQY+FCP7W9rJMF8OBZMZc2PmMg8NEo1W3oF7PbkTemiLtw7cCTFKV4IYc7S2OVySxXu3xwVCxzn7ZfMM7GruPEONtUqtOjqL7K/bKkgKYlbqP3hXgm2P0cEzTrxYrEoQwLeTLKbdSTZ/uBJzlp7WjhjTJM8S9cpsVfVBbYE9uu0UTMSFK5m5TL1fr/cE3GJgOhikvk0IW4Ng0FII0RulLRtHOfTaYM1Cebj8Hrn7+tnq5WmGvFrRpGJhu6Uj5PTgtHB925p0MvbhafjnNHKeNEtYJNZUskyNENBH9MBzG3pYxNjbWiRFKLhwUSWLhn9kpfoUdrjvHj84m51sIph2XXo1 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR04MB4640.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(396003)(136003)(346002)(376002)(366004)(39860400002)(7416002)(26005)(7696005)(186003)(2906002)(55016002)(9686003)(8676002)(8936002)(4326008)(66476007)(66446008)(54906003)(86362001)(6506007)(316002)(33656002)(5660300002)(66556008)(71200400001)(110136005)(66946007)(478600001)(76116006)(52536014)(83380400001)(64756008)(921003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: y/dusewsWp2sl5la99k4J+TYReFgseXNA1L5u5LxkLQzhj7BwgOHFGwB1iPEWfg+azS+vYMVgsJZvtLu6JWtn3KLK2B/YDooi/aS5E4Xije1TmcIcmnfDZkFwKs5VwOYDPm2+k66gh08BsaaOxodyD/jni33tvdjFsAb8/pgw7WYIoPkqN9krmQf0ds+5GhholpOO6yYl240YcHSXrOMOSr7H89ytAk+khB1kq2TVD72/CfsvqAZ+K6QjFM3nAHGQzC2QUbSYWEXkpN8ppuR2LZYj5hX9+KCKUl/GrXE+6v6yK8pX3NfLQ/zelaLceDwAparMyXStyyvM24E23zifmHJI5jpzAnKm5wtykAubiSBK0EXLw9fSOEXVEubUGmASsk/u2GbMbmUAtmXLCGi7PXZG14ZCpFEB0t6dEOzaXpRYGxrrpdMIVysIQzLXeWs3OO3gPOXtigeJrntLIgJX7mUT42ovgw73xJjxZIWmzg= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e93b82f-2446-418b-08c0-08d80a2a06dd X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2020 14:58:09.0110 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vEjI748viM34rc3dFX13xWBnFLYZ3xVQVd10wq6WK4YPyXv4/1nJhI6UVoPYaMsXRZFEBFHPYycomtW0c4+Biw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB4992 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing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yZWdpb24gYWxpZ25lZC4NClNvIGZvciBhbnkgcmVnaW9uIGJ1dCB0aGUgbGFz dCBpdHMgaHBiLT5zcmduc19wZXJfcmduLCBhbmQgZm9yIHRoZSBsYXN0IG9uZSBpdHM6DQoJSWYg KHJnbl9pZHggPT0gaHBiLT5yZ25zX3Blcl9sdSAtIDEpDQoJCXNyZ25fY250ID0gKChocGItPnNy Z25zX3Blcl9sdSAtIDEpICUgaHBiLT5zcmduc19wZXJfcmduKSArIDE7DQoNCj4gKw0KPiArICAg ICAgICAgICAgICAgcmV0ID0gdWZzaHBiX2FsbG9jX3N1YnJlZ2lvbl90YmwoaHBiLCByZ24sIHNy Z25fY250KTsNCj4gKyAgICAgICAgICAgICAgIGlmIChyZXQpDQo+ICsgICAgICAgICAgICAgICAg ICAgICAgIGdvdG8gcmVsZWFzZV9zcmduX3RhYmxlOw0KPiArICAgICAgICAgICAgICAgdWZzaHBi X2luaXRfc3VicmVnaW9uX3RibChocGIsIHJnbik7DQo+ICsNCj4gKyAgICAgICAgICAgICAgIHJn bi0+cmduX3N0YXRlID0gSFBCX1JHTl9JTkFDVElWRTsNCj4gKyAgICAgICAgICAgICAgIH0NCj4g KyAgICAgICB9DQo+ICsNCj4gKyAgICAgICBpZiAodG90YWxfc3Jnbl9jbnQgIT0gMCkgew0KQW5k IHlvdSB3b24ndCBiZSBuZWVkaW5nIHRoaXMgYW55bW9yZQ0KDQo+ICsgICAgICAgICAgICAgICBk ZXZfZXJyKGhiYS0+ZGV2LCAidWZzaHBiKCVkKSBlcnJvciB0b3RhbF9zdWJyZWdpb25fY291bnQg JWQiLA0KPiArICAgICAgICAgICAgICAgICAgICAgICBocGItPmx1biwgdG90YWxfc3Jnbl9jbnQp Ow0KPiArICAgICAgICAgICAgICAgZ290byByZWxlYXNlX3NyZ25fdGFibGU7DQo+ICsgICAgICAg fQ0KPiArDQo+ICsgICAgICAgcmV0dXJuIDA7DQo+ICtyZWxlYXNlX3NyZ25fdGFibGU6DQo+ICsg ICAgICAgZm9yIChpID0gMDsgaSA8IHJnbl9pZHg7IGkrKykgew0KPiArICAgICAgICAgICAgICAg cmduID0gcmduX3RhYmxlICsgaTsNCj4gKyAgICAgICAgICAgICAgIGlmIChyZ24tPnNyZ25fdGJs KQ0KPiArICAgICAgICAgICAgICAgICAgICAgICBrdmZyZWUocmduLT5zcmduX3RibCk7DQo+ICsg ICAgICAgfQ0KPiArICAgICAgIGt2ZnJlZShyZ25fdGFibGUpOw0KPiArICAgICAgIHJldHVybiBy ZXQ7DQo+ICt9DQo+ICsNCj4gK3N0YXRpYyB2b2lkIHVmc2hwYl9kZXN0cm95X3N1YnJlZ2lvbl90 Ymwoc3RydWN0IHVmc2hwYl9sdSAqaHBiLA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHN0cnVjdCB1ZnNocGJfcmVnaW9uICpyZ24pDQo+ICt7DQo+ICsgICAgICAg aW50IHNyZ25faWR4Ow0KPiArDQo+ICsgICAgICAgZm9yIChzcmduX2lkeCA9IDA7IHNyZ25faWR4 IDwgcmduLT5zcmduX2NudDsgc3Jnbl9pZHgrKykgew0KPiArICAgICAgICAgICAgICAgc3RydWN0 IHVmc2hwYl9zdWJyZWdpb24gKnNyZ247DQo+ICsNCj4gKyAgICAgICAgICAgICAgIHNyZ24gPSBy Z24tPnNyZ25fdGJsICsgc3Jnbl9pZHg7DQo+ICsgICAgICAgICAgICAgICBzcmduLT5zcmduX3N0 YXRlID0gSFBCX1NSR05fVU5VU0VEOw0KPiArICAgICAgIH0NCj4gK30NCj4gKw0KPiArc3RhdGlj IHZvaWQgdWZzaHBiX2Rlc3Ryb3lfcmVnaW9uX3RibChzdHJ1Y3QgdWZzaHBiX2x1ICpocGIpDQo+ ICt7DQo+ICsgICAgICAgaW50IHJnbl9pZHg7DQo+ICsNCj4gKyAgICAgICBmb3IgKHJnbl9pZHgg PSAwOyByZ25faWR4IDwgaHBiLT5yZ25zX3Blcl9sdTsgcmduX2lkeCs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AgICAgfQ0KPiArDQo+ICsgICAgICAgLyoNCj4gKyAgICAgICAgKiBHZXQgdGhlIG51bWJlciBv ZiB1c2VyIGxvZ2ljYWwgdW5pdCB0byBjaGVjayB3aGV0aGVyIGFsbA0KPiArICAgICAgICAqIHNj c2lfZGV2aWNlIGZpbmlzaCBpbml0aWFsaXphdGlvbg0KPiArICAgICAgICAqLw0KPiArICAgICAg IGhwYl9kZXZfaW5mby0+bnVtX2x1ID0gZGVzY19idWZbREVWSUNFX0RFU0NfUEFSQU1fTlVNX0xV XTsNCldoYXQgYWJvdXQgdGhlIG90aGVyIGhwYiBmaWVsZHMgaW4gdGhlIGRldmljZSBkZXNjcmlw dG9yOg0KREVWSUNFX0RFU0NfUEFSQU1fSFBCX1ZFUiBhbmQgREVWSUNFX0RFU0NfUEFSQU1fSFBC X0NPTlRST0wgPw0KDQo+ICsNCj4gKyAgICAgICByZXQgPSB1ZnNocGJfcmVhZF9kZXNjKGhiYSwg UVVFUllfREVTQ19JRE5fR0VPTUVUUlksIDAsDQo+IFNFTEVDVE9SLA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgZGVzY19idWYsIGhiYS0+ZGVzY19zaXplLmdlb21fZGVzYyk7DQo+ ICsgICAgICAgaWYgKHJldCkgew0KPiArICAgICAgICAgICAgICAgZGV2X2VycihoYmEtPmRldiwg IiVzOiBpZG46ICVkIHF1ZXJ5IHJlcXVlc3QgZmFpbGVkXG4iLA0KPiArICAgICAgICAgICAgICAg ICAgICAgICBfX2Z1bmNfXywgUVVFUllfREVTQ19JRE5fREVWSUNFKTsNCj4gKyAgICAgICAgICAg ICAgIHJldHVybiByZXQ7DQo+ICsgICAgICAgfQ0KPiArDQo+ICsgICAgICAgcmV0ID0gdWZzaHBi X2dldF9nZW9faW5mbyhoYmEsIGRlc2NfYnVmLCBocGJfZGV2X2luZm8pOw0KPiArICAgICAgIGlm IChyZXQpDQo+ICsgICAgICAgICAgICAgICByZXR1cm4gcmV0Ow0KPiArD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