Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3796048imm; Mon, 11 Jun 2018 01:46:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLOTYBvKAwi5sxNqfs7L5//LJ3GSqGMvEDqeQgomYtKyrTF2nTpyuILN+eVZYePTkZI4VHA X-Received: by 2002:a63:8b44:: with SMTP id j65-v6mr14379264pge.203.1528706804917; Mon, 11 Jun 2018 01:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528706804; cv=none; d=google.com; s=arc-20160816; b=KPjXBaHc9ZfaAavh2wgy3KdmEQyOOFV82RptLqF6iEMvMGVtkGbYj0FarTKQcKwW1O reAAAkjRNyreXMFbKXWtz2jfA9vfECPzZ7oUdmtja5u5HJXY+PBef81zenP/FahQKRLe Njc4k1ihEFsLodSHOMoBcEt59EcwO7y7eayoc2q9OrEK5nxO3MwPOWtRUkkkJplVbAxI 8Whki06YMjrtWHXuQ39hYsfj71oUChdi5za1woN9PoXCaMvmnwx7ucd18wrqKC8Rdj6J DJPKMNF7f1IU7phKYo+1tk0eqn3VcCYYFjAc6PXCRTHeRKN5IW3Nqn3qK104uDsqhdWS 6m1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=5gZAHjglvWwQZm5mA3tlY1tC5RyolrcZeM+wYRAYp+k=; b=enfHB91Pvi9fcwOIjMdcDli61WMjSXTzS9kbYVe5HfBY7Oc7Q+tB8Hmiv5cnFIluQf jQe1n/sU2VjeOpQCwQ2ozaPDY/t/2Ye1u99wlKU4MaAUFAQiNy5E93wztmojtuUmdGkM 0ErtUJH02f1oxQdxEIu00yWMUzu6d7bn//IIiegxC/VxuQ7G1qFf1y/s9twxmz+JBT6c FqqziphNQLjB31Tz18rE+ZK2khl1GvEeUhLDKQysh9n9T7qxLBcPFuZbk0KVzqkC1e5E 2Lvy20ByhLnTc51sp5+rNWxD9AL1AwH0vromYhb8xtrGOqNgW8m8R4e4DyiJrwmozBBD 7kRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7-v6si64103373plo.303.2018.06.11.01.46.30; Mon, 11 Jun 2018 01:46:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932606AbeFKIoi (ORCPT + 99 others); Mon, 11 Jun 2018 04:44:38 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:46548 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754146AbeFKIoc (ORCPT ); Mon, 11 Jun 2018 04:44:32 -0400 Received: from ayla.of.borg ([84.194.111.163]) by laurent.telenet-ops.be with bizsmtp id xLkS1x00V3XaVaC01LkSsv; Mon, 11 Jun 2018 10:44:31 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1fSIR8-0006xN-FF; Mon, 11 Jun 2018 10:44:26 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1fSIR8-0005OE-E8; Mon, 11 Jun 2018 10:44:26 +0200 From: Geert Uytterhoeven To: Greg Ungerer , Ralf Baechle , James Hogan , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Corentin Labbe , "David S . Miller" Cc: Arnd Bergmann , linux-m68k@lists.linux-m68k.org, linux-mips@linux-mips.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/3] m68k: coldfire: Normalize clk API Date: Mon, 11 Jun 2018 10:44:21 +0200 Message-Id: <1528706663-20670-2-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528706663-20670-1-git-send-email-geert@linux-m68k.org> References: <1528706663-20670-1-git-send-email-geert@linux-m68k.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Coldfire still provides its own variant of the clk API rather than using the generic COMMON_CLK API. This generally works, but it causes some link errors with drivers using the clk_round_rate(), clk_set_rate(), clk_set_parent(), or clk_get_parent() functions when a platform lacks those interfaces. This adds empty stub implementations for each of them, and I don't even try to do something useful here but instead just print a WARN() message to make it obvious what is going on if they ever end up being called. The drivers that call these won't be used on these platforms (otherwise we'd get a link error today), so the added code is harmless bloat and will warn about accidental use. Based on commit bd7fefe1f06ca6cc ("ARM: w90x900: normalize clk API"). Signed-off-by: Geert Uytterhoeven --- arch/m68k/coldfire/clk.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/m68k/coldfire/clk.c b/arch/m68k/coldfire/clk.c index 849cd208e2ed99e6..7bc666e482ebe82f 100644 --- a/arch/m68k/coldfire/clk.c +++ b/arch/m68k/coldfire/clk.c @@ -129,4 +129,33 @@ unsigned long clk_get_rate(struct clk *clk) } EXPORT_SYMBOL(clk_get_rate); +/* dummy functions, should not be called */ +long clk_round_rate(struct clk *clk, unsigned long rate) +{ + WARN_ON(clk); + return 0; +} +EXPORT_SYMBOL(clk_round_rate); + +int clk_set_rate(struct clk *clk, unsigned long rate) +{ + WARN_ON(clk); + return 0; +} +EXPORT_SYMBOL(clk_set_rate); + +int clk_set_parent(struct clk *clk, struct clk *parent) +{ + WARN_ON(clk); + return 0; +} +EXPORT_SYMBOL(clk_set_parent); + +struct clk *clk_get_parent(struct clk *clk) +{ + WARN_ON(clk); + return NULL; +} +EXPORT_SYMBOL(clk_get_parent); + /***************************************************************************/ -- 2.7.4