Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDC81C433EF for ; Thu, 23 Dec 2021 12:42:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348277AbhLWMmr (ORCPT ); Thu, 23 Dec 2021 07:42:47 -0500 Received: from esa.microchip.iphmx.com ([68.232.154.123]:16569 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233015AbhLWMmq (ORCPT ); Thu, 23 Dec 2021 07:42:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1640263365; x=1671799365; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=CnkJqZNVjeyp+BTIqhDny/cSYfZJ2DWn/0JpXuN0gcU=; b=ksZyD3dDfSjM6W636VW/Ac4ff3Lykkue6BCfwwYCqF9tJXM50UN4Cbm5 B4lL5pi0Rqih0IwhXczew+9Lnd7/QCuZ597WeP/4M9j5y+laSO124jvA3 Q9jcXLAjReZW3KBQ5r7AT71K1jZUCm7jzOgvMNnUbDiR+iRxos4CCpPT+ g8Zr2Mipu42WgucVvwRjcoQTJFKU9qWavxuwiGAd1oiN/nhs9IBgFk188 88RCLF3hEx/Gif7M0PoPlZ9s4Me4v5q0wvzE7AT1ghibVQilOus1WS6bo KNd1Ui2JK3D9a3DeoGZIRS8DH0o+7bz0KjInec1AtTLPGijDt1GqkfyBt w==; IronPort-SDR: 41JYEg6JjqfwrLJNM85ohYvRIvF0eQNRBtmjiP97PW6b9u8MFtJinh9AKsZDTswTuNcAtJEK85 CGsfRFneR1jVHOfkFX4Dbow04XrRfzJ6YpUIGWqo0dAEcyQwX3SrjJ27HKKwAUbKfTVXLoz0Ht 9xUzEXCX7kRy887UEbI917JtFEBAOmBQh9xEzAeAvJr9JYUFBDYvlgdt/hum9KMK9wS6pAhVsn 6E0W7tTkOKyr0hP3sLZ7Lj7MMeoE1JGGKfv7X0jBGVj57GAdWrvkdzz8bKnSufZEjL1qYgbROq nD08Ul1FZpUIzznry7Bb4zxS X-IronPort-AV: E=Sophos;i="5.88,229,1635231600"; d="scan'208";a="140708543" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 23 Dec 2021 05:42:45 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 23 Dec 2021 05:42:45 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17 via Frontend Transport; Thu, 23 Dec 2021 05:42:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QezJAttiA6pgGtuBNPPubSFid3viL9YWmJBB0Tl6IksY5aj4HgqEL3PHuqlXDUoLMc9dIWlBTHqYdTD4XOICp8XvQnmAZf1Uu/Uvb3w+k4iiStmeu+oByIuxpjuLhQUnpHBA2b7tlkogPS0Ssq0fH5vrqjxG9H8cAodbXdUHaGQbe/YACQIb6/76jw5IQxkqzipbeK2hfpaH5vrUVCrgfDo/N2HMOKauObdLxgwDqKPZNi0Zodv7uiFgkZR83YXdw28XcCboA/Oy1M07SMxODVhtGuo+Dti8dpHgTM/k077bgPeAE4JOoUbow3i8uuvq+ouhyFg7vkbphckzpMHLPA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CnkJqZNVjeyp+BTIqhDny/cSYfZJ2DWn/0JpXuN0gcU=; b=Y/YGNwDMIlNq/yCJnPERcfm/pD213ygYt9/bqVzIkPdyCaFrFQN90hOWySgnfGj9ozPWor8pqG1B9exKLoHxNNvkBSyUhVKyh+BizemjwhMnnpUBoAGWzewvZ+3wEcz6GVW4rFllhRbNzqDDN+ZbSt31o8zSMzNX9kXHy0hUxpDiemV1QTsBPhwklEg4Z48SSmkE/vQuQucLWJy5mcxGaWY8mhqraV0YXpW6ap0VgyuHEIlFDPpugo2EIsXBC+x19r65FKAD95m3UnY0tlfaEjsDQxB0S9GWex/Ol1pHNxVpNouD35zNIY/9WgoF3eGM5LololOYl40kk2zgKhWGbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CnkJqZNVjeyp+BTIqhDny/cSYfZJ2DWn/0JpXuN0gcU=; b=hU+h5/yHCyCihoRfiJdEcPQuT4vuZ+Yz7D75Nbqn5KdsEtMcfkzcdl+u/VTrdsuP3/J7Lc34kc91rIPePBGxO0pNgJIX55YiXFeeyJUZDby0OBdnY5pkCOXjjb4lt9pP89xNK/c6BtLT23j5cGFZFswluT816mKf57ECOIGD2h4= Received: from SA2PR11MB4874.namprd11.prod.outlook.com (2603:10b6:806:f9::23) by SA0PR11MB4623.namprd11.prod.outlook.com (2603:10b6:806:95::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4823.19; Thu, 23 Dec 2021 12:42:30 +0000 Received: from SA2PR11MB4874.namprd11.prod.outlook.com ([fe80::5c96:23c3:4407:d3b1]) by SA2PR11MB4874.namprd11.prod.outlook.com ([fe80::5c96:23c3:4407:d3b1%9]) with mapi id 15.20.4801.024; Thu, 23 Dec 2021 12:42:30 +0000 From: To: , , , , , , , , Subject: Re: [PATCH v2 5/6] mtd: spi-nor: core: avoid odd length/address reads on 8D-8D-8D mode Thread-Topic: [PATCH v2 5/6] mtd: spi-nor: core: avoid odd length/address reads on 8D-8D-8D mode Thread-Index: AQHX9/qMFRZUiMjnQEWnEwx8WAKUuQ== Date: Thu, 23 Dec 2021 12:42:30 +0000 Message-ID: <86f5c01f-6901-1995-d8ad-a1e6580f5e5e@microchip.com> References: <20210531181757.19458-1-p.yadav@ti.com> <20210531181757.19458-6-p.yadav@ti.com> In-Reply-To: <20210531181757.19458-6-p.yadav@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 82fcc1ef-8ee4-45cf-5f18-08d9c611aefc x-ms-traffictypediagnostic: SA0PR11MB4623:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jYIaMMMPCdIAYoxXzWnKdDDibSB/T894nEsGXGY4CzVwnPYhysl7R5q5Ta79k6q4rI8MANa5A/E0bjpIFrlZ703UDELxzdf1mEgQtOT2fWVHBGviHGoJS2HVEfiDhLpu+9RinL4GBmeXCxTykeOdzVHIE3+QPWPFprdVfZ5TJ1ktzbHlwAytG4ymtFBLomrpJz20kjFwlT3ZDzRp3w/Bp5b8vWAc0r+LW2pD46mtkLkMPYcmidJee9tZmqTszBR2Phiimz8h8YZXnHHZdZWU385LyO2wze7IEDp0YGtXYb5KVzxZ4f4P10KUxCFRvMgycFyzGuC9xqJr4gAaI+SNMpk0xkBNI3nDm5X1G6kVmkAB4ObReE6Aiznj8PLHp8e+HCrDlfoy/PyAFQ4N88Mnkc+fhcgBgk6O04HOWz00yXZ090VvRqFQIPzjEOB1KLXzFc83rjLuJQmTMtcuQuosKgXfKJhT4CYQ24FzcgSJ4m6XHZXauuW5DVWjSBlvQV/Hyn4LubfhHcwMp3OuSkfC020sDfsSZ+cXty03hPu0Gn7jobjI9YZyTJnzkq1nqV5Nn4dVbW4BJ6FNQ03CCCmipg4Sqtd20olI9lVagOT63fcaFJquaTs3SyULbBRvfIVhgtO1Dz9PGxcN2xYJCPx23Dd8ZbmVSaGwMYhBnHnA2Hq8ziEyczU2YFkQOuxktId6UtywXsY72NLpESlaz0oJ2IW/fRX9VqqW2OVn7SAjlxk2TRpdTpHnja/aEiJmM0yfeJhjEXXjCgOEycVOgpSqZg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA2PR11MB4874.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(508600001)(31696002)(6512007)(6506007)(5660300002)(76116006)(66556008)(26005)(71200400001)(31686004)(66476007)(53546011)(64756008)(8676002)(186003)(2906002)(66946007)(8936002)(6486002)(110136005)(2616005)(86362001)(316002)(122000001)(38100700002)(66446008)(38070700005)(91956017)(83380400001)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?UVQrRWlVWTlqZEZnaFZUYTY0VXBFVitReWo1c214YWYvY200bnQ2a01GUVE2?= =?utf-8?B?cmI0OHN5UTVRejBFRWdMOH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Yx?= =?utf-8?B?NmRwYU5KWFRnMkUrTW4xSmVxR0hEMDhuaFFFMVJFR0wvZWhkV21ZTmJRcWs4?= =?utf-8?B?OHlIY05vT3BWNUF6SlY2NTRIdFp4NGZiK2p2YXdZQkJYZlRTelFvbEtCcFl5?= =?utf-8?B?L3JZUE9kVjZ0c0RCNHZvbTVQTEJLUEdHWm14UjVXT3hVWmRlV1FDck4rNzV5?= =?utf-8?B?TU1Qck9wUW44UDN0VUErR1Z6U3hiOTMwSXI3MklaNk9CM0tUUC8yd1FrUTNM?= =?utf-8?B?ZGRSUU9rNkVYbFJEaHY4K0Fadk1NdjE4bytNUDRJaXdrcHRpWTdPY2orWTAx?= =?utf-8?B?M3EwS1VybHJBRWdqcDJuTlpFSkdld0ppOHBqOXUzNUMyOTlUby9PMWNGNm1U?= =?utf-8?B?S09EaVVxVnlUc3MycWo0aEJnN0JBPT0=?= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR11MB4874.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82fcc1ef-8ee4-45cf-5f18-08d9c611aefc X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2021 12:42:30.0880 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2oG8Hosf9jQmuFM4vIQudYNCvxFWBBJwVmKQB/wCK8AMTceokN0wXhGbBI7cC5FHy1PKbzBr+YSnyfWP7ia/JdBvNw6/+wbKx2I4sblQlsE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4623 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gNS8zMS8yMSA5OjE3I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