From patchwork Mon Jan 11 14:06:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12010761 Return-Path: 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 66514C433E0 for ; Mon, 11 Jan 2021 14:08:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A3422242A for ; Mon, 11 Jan 2021 14:08:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A3422242A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=1Qn3HJxJ9KtwPnjakCc3QoV4fA8N1WgCQ1l47aqG49s=; b=oBUhyHcoLNxVTuA5QUEPwPVA8M 8RCKt+G1qEiW7HS2Owpc2hvFx5QS3ew3WS0ksf7oV+Qoqn7YYl2Sx9AJoZGtaC89EVwepEZbkwoD2 mnaQd9uC6Lvh6daKNSqrIu70XgM2tmX2MqTQbK2TVAzcTtrSLGbZIKkRzHXxaKgouF2gks6/fpw1o PL7lafZMQDM4kCGknaCfz/kr9XMWGskSQlfGIh/e4Od/N2lg7CjGtS1RJdQ8u1lv6rFUqg59TCaai ONRBPrSVeDfy3LyB0chCgJVxnEbjj9+bAjhLxnRNYjAU+2ah8awclbN50G355K9d5mYgvSIcXTEbB vl8pv8gA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kyxqE-00082E-N0; Mon, 11 Jan 2021 14:06:42 +0000 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kyxqC-00080J-05 for linux-arm-kernel@lists.infradead.org; Mon, 11 Jan 2021 14:06:41 +0000 Received: from ramsan.of.borg ([84.195.186.194]) by michel.telenet-ops.be with bizsmtp id FS6b2400P4C55Sk06S6bvm; Mon, 11 Jan 2021 15:06:35 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kyxq7-002qiS-1V; Mon, 11 Jan 2021 15:06:35 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1kyxq6-001lyv-IQ; Mon, 11 Jan 2021 15:06:34 +0100 From: Geert Uytterhoeven To: Arnd Bergmann , Linus Walleij Subject: [PATCH] pinctrl: renesas: checker: Restrict checks to Renesas platforms Date: Mon, 11 Jan 2021 15:06:33 +0100 Message-Id: <20210111140633.422726-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_090640_167189_567D8D74 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When DEBUG is defined (e.g. if CONFIG_DEBUG_PINCTRL=y), the Renesas pin control driver runs sanity checks against the pin control tables. This may cause lots of output on the console, and can be annoying in ARM multi-platform kernels. Fix this by only running the checks when running on SuperH, or on a DT platform supported by the Renesas pin controller driver. Suggested-by: Arnd Bergmann Signed-off-by: Geert Uytterhoeven Reviewed-by: Arnd Bergmann --- To be queued in renesas-pinctrl-for-v5.12. drivers/pinctrl/renesas/core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c index b9f80833f532e7b7..56cb8e1d8384b39c 100644 --- a/drivers/pinctrl/renesas/core.c +++ b/drivers/pinctrl/renesas/core.c @@ -1146,6 +1146,11 @@ static void __init sh_pfc_check_driver(const struct platform_driver *pdrv) { unsigned int i; +#ifndef CONFIG_SUPERH + if (!of_find_matching_node(NULL, pdrv->driver.of_match_table)) + return; +#endif + sh_pfc_regs = kcalloc(SH_PFC_MAX_REGS, sizeof(*sh_pfc_regs), GFP_KERNEL); if (!sh_pfc_regs)