Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp514104pxx; Wed, 28 Oct 2020 10:03:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHbaIuVL/OAQiuWc+ch6sVjiPRt8XYVNkW2I0Rdz8QysIYhEwl2DcW/rmiMesm+l+6B0yd X-Received: by 2002:a50:fc0c:: with SMTP id i12mr8510219edr.373.1603904597218; Wed, 28 Oct 2020 10:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603904597; cv=none; d=google.com; s=arc-20160816; b=xKSJRcs7aqdfQePUG4GUqoRplYEQAtP662nxkMSAEyL95ZLcj0Wn87HKyFPjvfD9Xi lVpXE4hgw7plecdyucWv6yfFe34gPKjIT+pbCdrOzuj0B4lus0ptfVmDuNqSMH+jBNXi ZJJz0YRY5pTRyQgIyqLQRLGY3kP2V0BAV4Csm02SnYO0I2tb4y3MlAQ8rkxzeDdvJYEz na7uNGpyrbC1AmuK/xKmztJKplj7+tiu9XQjN7RIZQgwP3UhmIEzVJu0QK6l7O7k4Ybk L55q2Z9end4rRxL4rJWc0rHH85YuBKUrEsnpM8Z2Znwk2bTdzg+i032XJetBt3Iw8svR kTaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aXbwBoztN3qHOJjmaL/D5HpiW+w6O1Rb53W07BY+2uM=; b=j8F9IVoVATJL/H7w1WeCQTELskG5aJSnJgsOZaA862Zf5qDTU/bEByezpmFopzqgSD lQ0Wzcz3r9MucfHWsTB9bmcLs3NSw4V6OTqz8YSWD0K+tE2KpFaHygovUNDhkZ4UiLfV ZmGP9lldkdQYYbAaqfzkm4NMWLNSaMkldRgbXuOZjOXdqwtDW6fCaQRg5SQyuUWt3u5w km//0Bo2xJlHScDyazWppV/nln9PvO4vpQo82TTWw0P2IUSu9+DvpgXNROTdpV21d5K2 aqgFwdoYKEiIK5WNRB155ar7+n6Br3j1MMglQdtw7MyE5g5SZf60nrcamhjZqHC6bjRS suiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KCCWbb2Q; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs17si4061011ejb.543.2020.10.28.10.02.34; Wed, 28 Oct 2020 10:03:17 -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=pass header.i=@kernel.org header.s=default header.b=KCCWbb2Q; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1819365AbgJ0R3r (ORCPT + 99 others); Tue, 27 Oct 2020 13:29:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:41950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762351AbgJ0OmT (ORCPT ); Tue, 27 Oct 2020 10:42:19 -0400 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 ED17C207BB; Tue, 27 Oct 2020 14:42:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809739; bh=BHTx4gmv9FC4LZ7qW6B6Sv/WDNEepcUADy5PQP4DjDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KCCWbb2Q3QUL2TTEdxRC+psQ7VG9+3h/pXyQTAVS+mJ7nrCoYgyMUjRDk88Q9+jiW i5iT8v6KjIqSw2DMT+Pr4x5j0Yg2oin1KXsMGA0Y6/NlaUtdPVn19nA5p3gaJz7AFk tJIHwyxsgmx58WNd8IX1+b/kFVrDM95s9IAcFvuo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Roger Quadros , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 5.4 302/408] memory: omap-gpmc: Fix build error without CONFIG_OF Date: Tue, 27 Oct 2020 14:54:00 +0100 Message-Id: <20201027135509.039049820@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing [ Upstream commit 13d029ee51da365aa9c859db0c7395129252bde8 ] If CONFIG_OF is n, gcc fails: drivers/memory/omap-gpmc.o: In function `gpmc_omap_onenand_set_timings': omap-gpmc.c:(.text+0x2a88): undefined reference to `gpmc_read_settings_dt' Add gpmc_read_settings_dt() helper function, which zero the gpmc_settings so the caller doesn't proceed with random/invalid settings. Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") Signed-off-by: YueHaibing Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20200827125316.20780-1-yuehaibing@huawei.com Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- drivers/memory/omap-gpmc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index b5055577843a2..27bc417029e11 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2274,6 +2274,10 @@ static void gpmc_probe_dt_children(struct platform_device *pdev) } } #else +void gpmc_read_settings_dt(struct device_node *np, struct gpmc_settings *p) +{ + memset(p, 0, sizeof(*p)); +} static int gpmc_probe_dt(struct platform_device *pdev) { return 0; -- 2.25.1