Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp726709pxb; Tue, 2 Feb 2021 16:51:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+mDF6I421b7iZ+SIPBlYDjpek66fTHuIf7zeTEQsHLycKuJS2b13d0kmSYfqfwzorRo0n X-Received: by 2002:a17:906:2e0c:: with SMTP id n12mr638175eji.312.1612313465853; Tue, 02 Feb 2021 16:51:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612313465; cv=none; d=google.com; s=arc-20160816; b=u1SmOaSNhmZUz3WWn4rtEEknls/AIyYUnTODdEL+wfGRQmYpc3ooU6MHBLZ3vEa8fb wu3/76T8qCl6KRacsztXSC3wFejmXhGLQjgZKaU0BNday1gBMe1Muzse1/B9NHwaZiZ3 lqKVkybttNz4WavmSuZr/5uFi/pzkN1hzN+X4gtUga2til2ZMZddSY4mMWeG9ILoYCkQ o2PG4+KZb368/QcUE9Z0Brl8xmOWIFxYKG8W0XYFe6JrxAYQl52Lzb7rWE4FPR+ykzyG 7z5k6J40MvynHtpgeM0zh4NFRtRLKHuvbMoERTgdjbMXgdCe0Am8mk9trRqu/+3SDhz0 ROzQ== 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=1Hx2ZwsxJ2E+aylbcttUZHoEn1uBeWgPm9uTMDKxdXk=; b=KO/+s9HyVgL4dMCEfhACXMvffMNlyT8qmiHXrqMyYM/mqfvGXy+HTuJN1tHYblM2r0 2/4EST8Uwgc/CCkPqlw0UKzAsWWEzMh8LYNAmy5F0JVbLHYbIdyqlpjaHRIG149pErG1 wBcmlU/RMONKOir10Onlu8sWVC50vnWOrB7KRfbKJGM6HIiiPu/NF9MpirbH1ltn1NBj n+O3N/QZH/xja7MYmkxnR9NoRd16UDPtcfKtOY2e1nDLwSDct/qLE95q+MUHhhCroAaD DEOzckHPhHMlzUxjoU/ypCdQ11Nw/KRcnwuA0RWq4n3jRDeQLI0NtkU+vHfIi2a7Ufqz aE6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BIe8orqS; 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=pass (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 r25si296788edc.514.2021.02.02.16.50.41; Tue, 02 Feb 2021 16:51:05 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=BIe8orqS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240360AbhBBUED (ORCPT + 99 others); Tue, 2 Feb 2021 15:04:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:38204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232607AbhBBNpl (ORCPT ); Tue, 2 Feb 2021 08:45:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EA1BC64F7E; Tue, 2 Feb 2021 13:40:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273250; bh=IS+fyvq5SKTMi//gjqcWIQi0DaLbEO1LVjvdxdqY6sI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BIe8orqSQSAidCYp8kkNSF2Kaa58tJJsxm5SFMGBhyqYBB+L6ksC4Ppk25z37RJ1n ArFd3uB4q+vdHwy0SwnhsKZmUIRZm61I9jGqSLQ2A9aatdCeNcfNpelmpSaAMslf2u Nau3HFHanYkDsrwBEZkdFRAQpN1tUwzmCzRcLqeE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Sudeep Holla , Arnd Bergmann Subject: [PATCH 5.10 035/142] drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs Date: Tue, 2 Feb 2021 14:36:38 +0100 Message-Id: <20210202132959.155319864@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@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: Sudeep Holla commit caab13b4960416b9fee83169a758eb0f31e65109 upstream. Since at91_soc_init is called unconditionally from atmel_soc_device_init, we get the following warning on all non AT91 SoCs: " AT91: Could not find identification node" Fix the same by filtering with allowed AT91 SoC list. Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: stable@vger.kernel.org #4.12+ Signed-off-by: Sudeep Holla Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201211135846.1334322-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/soc/atmel/soc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/drivers/soc/atmel/soc.c +++ b/drivers/soc/atmel/soc.c @@ -265,8 +265,20 @@ struct soc_device * __init at91_soc_init return soc_dev; } +static const struct of_device_id at91_soc_allowed_list[] __initconst = { + { .compatible = "atmel,at91rm9200", }, + { .compatible = "atmel,at91sam9", }, + { .compatible = "atmel,sama5", }, + { .compatible = "atmel,samv7", } +}; + static int __init atmel_soc_device_init(void) { + struct device_node *np = of_find_node_by_path("/"); + + if (!of_match_node(at91_soc_allowed_list, np)) + return 0; + at91_soc_init(socs); return 0;