Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2362506imm; Mon, 24 Sep 2018 03:06:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV60NP5IJF4p5N9q6gCucThPD8TzSuFDqehbsv9WAX85DeMk68oOAiAV5Zg/B5JlcXvHY6J2K X-Received: by 2002:a17:902:bb0d:: with SMTP id l13-v6mr6355502pls.71.1537783603738; Mon, 24 Sep 2018 03:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537783603; cv=none; d=google.com; s=arc-20160816; b=VLm2v3ftY5wqi662RshSXntH1vH3AoHX2ZAwEbgCjgLwoiciMl88QUnyT4XnlebY2D 7M0QUkXfCeBUIQ2RWeGStdpUln9YZRhI7hCaOiEFpqLA10HLSyCom1AlNw4sKMyHQg/e hxg+dCwEXMQzmpsLYNfgFEcFHDBeVoV7QPNWxbD6Sb4mlCDoncTrOlN25C2hPzVoPudw efjyZGHZpgYWIAQ/wmI4M05ScqDK+M93pHCkO1NkKEKmpqpt1FuneibH4QQPTXPsroqG idTfxkKJ/19sSGXvrCawogwM2u+2aSb6n1hoauZAqfnEanLndMzNMUQmtij47HP4JCID EvXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=soxvEiVE5HvJCKVLakFmnmdponf0A8D8KkJ6uBjPfkI=; b=HfJNOJY7gJg8RlXCdiimxlo/zRM5Y5ktWt8Qi3sgkUBbsh6PVJD5C0lk/Ym1Pv/5NU UPZfljqVtpFItZ9bg84/UR1JSBXHrNIcaVQEmwveyh9hjPbJCv+bZL+FXQ96FoMY4Q30 bTMIdqTc2haM23X6pv6YiQFEWPXLN5AfTQiCYiW+YsD3DzCmQyYXpwtQkpHBNTzdEADe lVy1z3YzTXAvxgOG2RCOJxC5m5w6cd/TXDvMYmeqQbeAJYSVTGYpHK0WJa02LJtBkeI/ qIuYzo6wlNrhcNKex8hi+HE2UCyC4PGn15g38K5gWYfYObXkesr/Mfz659GanEmGYSsE 6Aiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b="k0/dtmq0"; 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=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16-v6si34523279pfe.267.2018.09.24.03.06.28; Mon, 24 Sep 2018 03:06:43 -0700 (PDT) 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=@synopsys.com header.s=mail header.b="k0/dtmq0"; 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=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728304AbeIXP5L (ORCPT + 99 others); Mon, 24 Sep 2018 11:57:11 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:55286 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725982AbeIXP5L (ORCPT ); Mon, 24 Sep 2018 11:57:11 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 0C06010C1CB6; Mon, 24 Sep 2018 02:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537782956; bh=soxvEiVE5HvJCKVLakFmnmdponf0A8D8KkJ6uBjPfkI=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=k0/dtmq03AKci2Wj8mFqRG5tHNb1/cpBwnpjI5paN8v13fLQAra4MZkl5joTE7Q+N SIkIY8iZ/mKciCPjPOvpwypeAbFkaXrCI/nRVO84kJM0V9SbHW1eyE3zOAkMX92M1K WTxVkB8Aq0L4DW0i4caWv+CoVXLaolRdkbaSvuiw1lsL6gc0mkX3y90UdptrfTxRQX 9BIiiPSIPOtVRMNOH4JrGde1Um+8GdWAAt7qsIwoZepT4SNw9AO8Hx0cPLcZlwwi63 xRRHttO8YIGAqk/Zcb1hWpReduxNpoNSXfDleHCW1ld1j5W115aQ0MO/GVcTEU21v6 wRaWYm9+iWyXg== Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2-vip.internal.synopsys.com [10.12.239.238]) by mailhost.synopsys.com (Postfix) with ESMTP id 54AF359F7; Mon, 24 Sep 2018 02:55:53 -0700 (PDT) Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 24 Sep 2018 02:55:53 -0700 Received: from DE02WEMBXB.internal.synopsys.com ([fe80::95ce:118a:8321:a099]) by DE02WEHTCB.internal.synopsys.com ([::1]) with mapi id 14.03.0361.001; Mon, 24 Sep 2018 11:55:50 +0200 From: Eugeniy Paltsev To: "marek.vasut@gmail.com" , "linux-mtd@lists.infradead.org" CC: "linux-kernel@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" , Alexey Brodkin , "boris.brezillon@bootlin.com" , Vineet Gupta , "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "richard@nod.at" Subject: Re: [PATCH v2 1/2] mtd: spi-nor: Add support of sst26wf* flash ICs protection ops Thread-Topic: [PATCH v2 1/2] mtd: spi-nor: Add support of sst26wf* flash ICs protection ops Thread-Index: AQHUSPvw4k08wRlUn0WQl9maiAd/H6T/JggA Date: Mon, 24 Sep 2018 09:55:49 +0000 Message-ID: <1537782946.4902.6.camel@synopsys.com> References: <20180910114628.19156-1-Eugeniy.Paltsev@synopsys.com> <20180910114628.19156-2-Eugeniy.Paltsev@synopsys.com> In-Reply-To: <20180910114628.19156-2-Eugeniy.Paltsev@synopsys.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.121.3.38] Content-Type: text/plain; charset="utf-8" Content-ID: <9B14D78872C8004AA1D3FB8D9737BA19@internal.synopsys.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgTWFyZWssDQoNCk1heWJlIHlvdSBoYXZlIGFueSBjb21tZW50cyBvciByZW1hcmtzIGFib3V0 IHRoaXMgcGF0Y2g/IEFuZCBpZiB5b3UgZG9uJ3QgY291bGQgeW91IHBsZWFzZSBhcHBseSBpdC4N ClRoYW5rcyENCg0KT24gTW9uLCAyMDE4LTA5LTEwIGF0IDE0OjQ2ICswMzAwLCBFdWdlbml5IFBh bHRzZXYgd3JvdGU6DQo+IHNzdDI2d2YgZmxhc2ggc2VyaWVzIGJsb2NrIHByb3RlY3Rpb24gaW1w bGVtZW50YXRpb24gZGlmZmVycw0KPiBmcm9tIG90aGVyIFNTVCBzZXJpZXMsIHNvIGFkZCBzcGVj aWZpYyBpbXBsZW1lbnRhdGlvbg0KPiBmbGFzaF9sb2NrL2ZsYXNoX3VubG9jay9mbGFzaF9pc19s b2NrZWQgZnVuY3Rpb25zIGZvciBzc3QyNndmDQo+IGZsYXNoIElDcy4NCj4gDQo+IE5PVEU6DQo+ IHRoaXMgcGF0Y2ggaXMgYmFzaWNhbGx5IGZvbGxvd2luZyBtaW5lIHUtYm9vdCBjb21taXQgcG9y dDoNCj4gaHR0cDovL2dpdC5kZW54LmRlLz9wPXUtYm9vdC5naXQ7YT1jb21taXRkaWZmO2g9M2Q0 ZmVkODdh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