Message ID | 20181109165644.30534-6-tudor.ambarus@microchip.com |
---|---|
State | Accepted |
Delegated to: | Boris Brezillon |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VUASV3dl"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="eUofgXGw"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="2OfgM9Mx"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42s5vV0LgDz9sBk for <incoming@patchwork.ozlabs.org>; Sat, 10 Nov 2018 03:58:29 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v0CnucGv8sd83hSWuRtMZF9ViFpYQvAUX2JaGhNx8Mo=; b=VUASV3dln4q8Gx JNR+edjRHDiZIC0OcEXjln6EXbHp4ZQ8/jxdSx8y4W4l0c37v41364hEF0cezLKmLalsK1koQaBBh 0qUnE8kC80sy8/I4bOZgOBfuxNwR+WwEjEmkZ70Wom0dThBhT79bCyCa31pXeH/nj0VhdFuI64Z5v 9945+ht6VxgDD9GWaI55la+dbuYw/8O/9PWjNbm3GhoHi75LbLWI48NNMhwgtM5/V8AJ9eAtaLVK+ y96HFPqMXzCf2OjJTylcmUSe8v/QlyDiGsM1G3TDNZMce+TyBt7ejPG2yNC/9aEieoJLHzy2VNhiW +waIbREtzhtb0mwDiGAw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLA6u-00065J-22; Fri, 09 Nov 2018 16:58:20 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLA68-0005EA-3B for linux-mtd@bombadil.infradead.org; Fri, 09 Nov 2018 16:57:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dWoIzdf/V0PCx7GmXHQNqZHzIeZ24+ifLTuyiRgkZ1E=; b=eUofgXGwaxgWQ9HMy9cO3+MgIp MQ2/PyvbTc1lunsk7yHBh3Iso3LYxORYVAtu9Tp2VuvXpuNMupzdBVxpFLupRuKaq6grvaZur1VpG xt3BFoRLOgm8EQJ8pluTFBO9wsAR0kVedlAvoB7kRPAerswqVGFMFNBiqoUsBEdrLx923Gxo6nx4z 2sEkUeSh8XGRaTvAf4S74NvwBnEYTqw7tr13mFK2Kdl5WEfAM3U6CrIZudsLRzgs6NgFq/GQfrqIz 7mlcO3yjib60E95V2zWeyerJL3eocl3n3AGNvT86AV8WrlcetDxAX13GConEI8tr+tEIKh8EjO9Ql suf56dxQ==; Received: from esa6.microchip.iphmx.com ([216.71.154.253]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLA5m-0001Qp-1b for linux-mtd@lists.infradead.org; Fri, 09 Nov 2018 16:57:29 +0000 X-IronPort-AV: E=Sophos;i="5.54,483,1534834800"; d="scan'208";a="20177811" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Nov 2018 09:57:00 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.108) with Microsoft SMTP Server (TLS) id 14.3.352.0; Fri, 9 Nov 2018 09:57:00 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dWoIzdf/V0PCx7GmXHQNqZHzIeZ24+ifLTuyiRgkZ1E=; b=2OfgM9Mx0IpdUbanqYgWfZL3vN3h9eckyMSmFfUGOyNZq6gafKqrsk3JUpJqdITSQlVTZmgSL7mfa6YXQizdLNuqmStwJL2329o7GOhMVOyhK+KUXrecdDyfTdaZyvyqTzjiRf+ASv3rRn+KGwncUyojbt7X+C7DG7BWtHyHbek= Received: from BN6PR11MB1842.namprd11.prod.outlook.com (10.175.99.146) by BN6PR11MB1251.namprd11.prod.outlook.com (10.173.32.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Fri, 9 Nov 2018 16:56:56 +0000 Received: from BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::11b7:21db:803a:7cfa]) by BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::11b7:21db:803a:7cfa%5]) with mapi id 15.20.1294.034; Fri, 9 Nov 2018 16:56:56 +0000 From: <Tudor.Ambarus@microchip.com> To: <boris.brezillon@bootlin.com>, <marek.vasut@gmail.com>, <dwmw2@infradead.org>, <computersforpeace@gmail.com>, <richard@nod.at> Subject: [PATCH v2 5/5] mtd: spi-nor: remove unneeded smpt zeroization Thread-Topic: [PATCH v2 5/5] mtd: spi-nor: remove unneeded smpt zeroization Thread-Index: AQHUeE05/IawJabFxUqWI1XY3JgXlg== Date: Fri, 9 Nov 2018 16:56:56 +0000 Message-ID: <20181109165644.30534-6-tudor.ambarus@microchip.com> References: <20181109165644.30534-1-tudor.ambarus@microchip.com> In-Reply-To: <20181109165644.30534-1-tudor.ambarus@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR07CA0231.eurprd07.prod.outlook.com (2603:10a6:802:58::34) To BN6PR11MB1842.namprd11.prod.outlook.com (2603:10b6:404:103::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tudor.Ambarus@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BN6PR11MB1251; 6:BruUd5OG57tRe/u8saIhfgDnD4dbG4V5jbq3DopU7uiqNUN3+n4h6mzGh+RF9RBiaBGfEVBC3rqU6X1GVtjXc4ml11fsw91ocWyFGBLJ7xQcmS/au/BoinH/DEV3YkdPGisiov3kDvXpfkbC+qRnGVvxCUZdZU7fIf1CEnbljMOomg0/13hkQOHuVs4GW23y0LlFuRCJI9/qeh9s3aJtWFklbqXJsuSQ00IZO5pF53mMAZAz4NNRXOZFjcyDzUmStkcOsPd0vVgWQ06dBE3QSTbxkkGHO/A/seyuD30+qbmSR116/tDi/uFauH61KQoKmAz+kMmU7cG45A2Q/i6De26gykS/zY41JbzI2I3LRTGJxu7+HC5JFMmVuW+CJ80qXD4f+EP4w+SmHeL+UEZBuhSpNxpwzCruMK5VaubW4capAHhxZ5cRn47D1nsin5OLYjYP+GuKwFH+Bi86qXeMbw==; 5:0DA/hRp/Lp64MlLUt6VqpKgSN9nre8fK+rWeIXmyY4nJxVdglGgn2o5jzHFlW+Qcu8d14Ic/Vej5kxlMWIRBuwjv3wUQz4fDdlJ4i3Y4LyqnEOKWNCtUgrSmeHB9qSN8fJahaJWV1BVXMfUHj276FhecDuy5FDwr5go1E2tThcs=; 7:50w72s2Ak3Zv2bDIgt362ljCMLlMHsq28qwUWB5bKiPCkSZld64a/jFZfj/N+1mAJ9FPK1cPisUEr1+JuQLuZe+MPuJLl4rDyn90Ev+PZuOA2LdjTPEypYYiyUxiwkNacBLh+VSWt+8ayzb3ZfLosw== x-ms-office365-filtering-correlation-id: dab54c45-66f1-43dc-8de0-08d646645b60 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BN6PR11MB1251; x-ms-traffictypediagnostic: BN6PR11MB1251: x-microsoft-antispam-prvs: <BN6PR11MB125188B5971D1B37ABB0A3C3F0C60@BN6PR11MB1251.namprd11.prod.outlook.com> x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:BN6PR11MB1251; BCL:0; PCL:0; RULEID:; SRVR:BN6PR11MB1251; x-forefront-prvs: 08512C5403 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39860400002)(136003)(396003)(199004)(189003)(2906002)(14454004)(2616005)(106356001)(6512007)(105586002)(6436002)(72206003)(476003)(3846002)(68736007)(36756003)(6116002)(446003)(110136005)(486006)(1076002)(2900100001)(2201001)(11346002)(6486002)(86362001)(54906003)(316002)(2501003)(102836004)(39060400002)(97736004)(386003)(4326008)(186003)(76176011)(52116002)(66066001)(99286004)(6506007)(107886003)(305945005)(81156014)(53936002)(25786009)(26005)(81166006)(8936002)(8676002)(7736002)(256004)(14444005)(71190400001)(5660300001)(478600001)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR11MB1251; H:BN6PR11MB1842.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 2H67/utkln6/f+J/c6ucyeuL0hEAgeub1+8TiOgpWuGsEPSjvXc2CcDesPzSJXCkoNXWtiOxTqRWdZxx0pqNvAD3vzEU3WmJgHlLbDB4sWsrojDm1KyFZ3Ic1KBPLuBZisj5Gx2+M108LRJ/IskohVAz9IL8lxwEDrRC49HpQ+hm5luizIiuLaePUKBFJHGNnlcOSzgzhO/4eOlosFakq9d9PRhK9jeDDUhI2Lw+s3wciX0zwN4uIqiOxYZXV+gJ6oD8vE59aurXEvF3THChWn2p7sduijRPKU+336z2NNZ72BshCD5Oqh95QXz+Y5WfvPkUFkxLylcPac0DEGDRyBi5vjFVBK6ilIekUIuLYys= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: dab54c45-66f1-43dc-8de0-08d646645b60 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2018 16:56:56.6859 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1251 X-OriginatorOrg: microchip.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181109_165725_799917_8750E96B X-CRM114-Status: GOOD ( 13.47 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [216.71.154.253 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Cc: yogeshnarayan.gaur@nxp.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Tudor.Ambarus@microchip.com, cyrille.pitchen@wedev4u.fr Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
mtd: spi-nor: fixes found when debugging smpt
|
expand
|
On Fri, 2018-11-09 at 16:56:56 UTC, wrote: > The entire smpt array is initialized with data read from sfdp, > there is no need to init it with zeroes before. > > Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Applied to http://git.infradead.org/linux-mtd.git spi-nor/next, thanks. Boris
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 458ca8321999..f9c657867e5a 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -3044,7 +3044,7 @@ static int spi_nor_parse_smpt(struct spi_nor *nor, /* Read the Sector Map Parameter Table. */ len = smpt_header->length * sizeof(*smpt); - smpt = kzalloc(len, GFP_KERNEL); + smpt = kmalloc(len, GFP_KERNEL); if (!smpt) return -ENOMEM;
The entire smpt array is initialized with data read from sfdp, there is no need to init it with zeroes before. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> --- drivers/mtd/spi-nor/spi-nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)