Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4999089imm; Tue, 12 Jun 2018 00:28:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK7GK30gmKwND+LT/ODVzLUlUVhGnUaUlStLTQck93Q++pkoZmeQHcr4f6VJEksG5w+Qzjn X-Received: by 2002:a63:b109:: with SMTP id r9-v6mr2215536pgf.102.1528788499515; Tue, 12 Jun 2018 00:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528788499; cv=none; d=google.com; s=arc-20160816; b=G0yonn5fm7dM/rA4YMAWaTDndQNB8zQHrI+9YnR/+P/8V65gdas3wGEbqsY7/DPE9k IdCSpvseMX9dN22j1UhheEt2O1iBrl4d8MSEJ+XJhS0bS/RIfmnz6toD5DIPzlt6dqg/ EgNbTOleybAtbRJ2oPu2HZdOBbkadndNQiSwNRYIj+wjL/atoTWYFJQjsJ4BEDS6Pxh9 S/GoGZ4fTaS4UIfSLb5Gb0Z/CWJJSm8xvryzde6sSY5+KlS59/dVpC0VHnart+PanmLX KlIPM07xBuIYenH8eWn1WD02nPtxHuU37F8r0WnZ+h+kK4ka3E6hopBdVr40DBTeuW5H lReA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from:arc-authentication-results; bh=lHZeUHEicLAo8Z6zQb0G6UE3PEqV+Ok8vAJsxewYzNA=; b=Tfgtaoi7Sa4bfaIi5ROEL7VLjCGj+Dd9oh4cdrjgzA7DtInXU6h4K3dlWfs7xcrPjL tVKt0mIEeVTcR37KTcbx36bS8Ocg4Nrjy6D4iy5mGsX/Hh+v6yggLwKwjgnSikY3QQ4V uja7gAJFTU9Rgjwp+BoBhTmPfn2vR034GWmRbTAaHt5CKReNqJxBmKSG381wKv1jAFP+ 5iZzvK89U1oTb0TUCAqKMuECrLmzGlz1HRM8fgCiOhWe5pI8wK5GGx2rKhny0S+opGkU w+5Up75QQ5rRQ0ki8hHPoO2WuLKQIrbAT0wKg3ZwSHDFPs3Ofsw1tVzla8jG7epcZY0h Y0BA== 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 187-v6si159234pgi.254.2018.06.12.00.28.05; Tue, 12 Jun 2018 00:28:19 -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 S933243AbeFLH1a (ORCPT + 99 others); Tue, 12 Jun 2018 03:27:30 -0400 Received: from icp-osb-irony-out3.external.iinet.net.au ([203.59.1.153]:28267 "EHLO icp-osb-irony-out3.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932944AbeFLH13 (ORCPT ); Tue, 12 Jun 2018 03:27:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2DQAAAXdR9b/zSOqnwNTxoBAQEBAQIBA?= =?us-ascii?q?QEBCAEBAQGFTIN3lTABAQEBAQEGgQUpllOEdwKDBDgUAQIBAQEBAQEChj4BAQE?= =?us-ascii?q?DIxVBEAsNCwICJgICVwYBDAYCAQGDHoF0qW1tghwag2ABhEyBaIELiEmBB4EPJ?= =?us-ascii?q?IJoh3OCVQKZAwgBjm+IGIUdkw2BczMaCCgIgn6QGQFHXZAxAQE?= X-IPAS-Result: =?us-ascii?q?A2DQAAAXdR9b/zSOqnwNTxoBAQEBAQIBAQEBCAEBAQGFTIN?= =?us-ascii?q?3lTABAQEBAQEGgQUpllOEdwKDBDgUAQIBAQEBAQEChj4BAQEDIxVBEAsNCwICJ?= =?us-ascii?q?gICVwYBDAYCAQGDHoF0qW1tghwag2ABhEyBaIELiEmBB4EPJIJoh3OCVQKZAwg?= =?us-ascii?q?Bjm+IGIUdkw2BczMaCCgIgn6QGQFHXZAxAQE?= X-IronPort-AV: E=Sophos;i="5.51,213,1526313600"; d="scan'208";a="87014098" Received: from unknown (HELO [192.168.0.106]) ([124.170.142.52]) by icp-osb-irony-out3.iinet.net.au with ESMTP; 12 Jun 2018 15:26:24 +0800 From: Greg Ungerer Subject: Re: [PATCH 1/3] m68k: coldfire: Normalize clk API To: Geert Uytterhoeven , 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 References: <1528706663-20670-1-git-send-email-geert@linux-m68k.org> <1528706663-20670-2-git-send-email-geert@linux-m68k.org> Message-ID: <944b08ba-a882-e6cd-42fa-9251bce1d7b1@linux-m68k.org> Date: Tue, 12 Jun 2018 17:26:22 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1528706663-20670-2-git-send-email-geert@linux-m68k.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On 11/06/18 18:44, Geert Uytterhoeven wrote: > 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 I am fine with this for ColdFire, so Acked-by: Greg Ungerer Are you going to take this/these via your m68k git tree? Regards Greg > --- > 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); > + > /***************************************************************************/ >