Message ID | 20201109125024.281306237@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=upl/=EP=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24610C4741F for <stable@archiver.kernel.org>; Mon, 9 Nov 2020 13:14:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB74A20867 for <stable@archiver.kernel.org>; Mon, 9 Nov 2020 13:14:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927668; bh=B/iMVp32s8YTZGPyk6xONGm3ZofyojNioae1DddPIXM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XCpOBQWfA1OqW2jgnePM+189DoyNthWmQ//TFPomm0qm6r86886FEY2lJie9T66QV P2dTBL0sOTj1ngPwWnxMHL1Uz/VOkIwiQQBz82G6T7TJ0HEcHMfiL37DRJIhlgkrSh cidyxJkkQCqEGbK8Q08XZi7V8h3W9UZ5GA3fjDWo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733140AbgKINO2 (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 9 Nov 2020 08:14:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:40708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733129AbgKINOZ (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 9 Nov 2020 08:14:25 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 92783208FE; Mon, 9 Nov 2020 13:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927665; bh=B/iMVp32s8YTZGPyk6xONGm3ZofyojNioae1DddPIXM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hWw1qNftbge0ZkgkNAlvhJ9V7+LWgyAIZBfR5XivOMoMy/ahSH0FY4718Rw+yjpYl QT6rfll3/2i1h89cHVI7cAgOdVbavuM6BDXeIzUnoOe8Z59r5J0RVSGRLucFs2yJmv op4R1uomfOdLXFpK9b173c/H0ri1cQlPT3E7fJME= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>, Alexander Sverdlin <alexander.sverdlin@nokia.com>, Vignesh Raghavendra <vigneshr@ti.com>, Baurzhan Ismagulov <ibr@radix50.net>, Tudor Ambarus <tudor.ambarus@microchip.com> Subject: [PATCH 5.4 35/85] mtd: spi-nor: Dont copy self-pointing struct around Date: Mon, 9 Nov 2020 13:55:32 +0100 Message-Id: <20201109125024.281306237@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125022.614792961@linuxfoundation.org> References: <20201109125022.614792961@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -4444,11 +4444,10 @@ static void spi_nor_sfdp_init_params(str memcpy(&sfdp_params, &nor->params, sizeof(sfdp_params)); - if (spi_nor_parse_sfdp(nor, &sfdp_params)) { + if (spi_nor_parse_sfdp(nor, &nor->params)) { + memcpy(&nor->params, &sfdp_params, sizeof(nor->params)); nor->addr_width = 0; nor->flags &= ~SNOR_F_4B_OPCODES; - } else { - memcpy(&nor->params, &sfdp_params, sizeof(nor->params)); } }