From patchwork Mon Jun 13 20:41:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102229 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1726438qgf; Mon, 13 Jun 2016 13:40:36 -0700 (PDT) X-Received: by 10.107.138.201 with SMTP id c70mr25073004ioj.148.1465850436485; Mon, 13 Jun 2016 13:40:36 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x188si33977958pfx.172.2016.06.13.13.40.36; Mon, 13 Jun 2016 13:40:36 -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 S1423212AbcFMUkY (ORCPT + 30 others); Mon, 13 Jun 2016 16:40:24 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:64993 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161183AbcFMUkU (ORCPT ); Mon, 13 Jun 2016 16:40:20 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0Mb8iR-1arzf931p5-00KgC0; Mon, 13 Jun 2016 22:40:08 +0200 From: Arnd Bergmann To: Daniel Lezcano , Thomas Gleixner Cc: Arnd Bergmann , Vineet Gupta , Noam Camus , linux-kernel@vger.kernel.org Subject: [PATCH] clocksource: nps: fix nps_timer_init return value Date: Mon, 13 Jun 2016 22:41:19 +0200 Message-Id: <1465850493-3533419-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:K3460s9lQAWKxUq1whV0USKDMkFsDrOeg+emgTbRq1XaIUeZkyH vEgE7Lz//1X0qUNy0JfUydGiN118tjDk+yNaspzE1NJFMZHLqDo1gKVVdel7RyaBsAMb3TO ++8n+XIkvSHxN7RI1/oular+ASOYRX4JrMfrsuM2CWwaAwMLNZMTEscnTZL6IgwZlqYop+U Uq0BJAjEhxRBmHCjbWbxA== X-UI-Out-Filterresults: notjunk:1; V01:K0:mHF5zUI8oeY=:Q7qhyl+v5jSlXHEAGs0htK Aru2ZkXF51ojkQb90tUBmPZfKi3j8MuIVBHmPYXePzmfZoOTA9Yp/3cqpqzDidYjNn9oIcK74 BNR+Sn13ZaR88/wGtXRrJFf5rk7KzYWPPsLbHg1Dc7F19LRsJnCGR0qmYfXLEGGXLakzy8yiL /xH+Mp5/5/bzLWn0bvbBtqJtVgCeY8T6fL4pImP2TucWUUR+/NMP1Kpj8+YmDXWJDRY3A9Ko8 KpHPwcfPaotOZEfXJqah2MFBqTYqOAz4AgDfinyATNJlquwgwTgsEIWBJjMzsq7IZShK5TUvc HX5xE4u2rhEfQfVOqbnUAvU5e4UB0NNaFHthBJDDlxJs/3nWNtDsCinnaq7ptKl9Cptm8jDfO ouWoqpN/rCmiRVajBf3Kx4fen6dkT7LoRgZEdqMpOqtXdQ8eyTkNRotB3r0aj5dpnnIg5oKxv 5qZee8+rySOwkaFkjUZ9QpZK79dBPiNLvxv0w9IgRzQDMATjmPwuPWIvk69CnrMY9h15/rkCG +V0qp02bGnrEB0VzLXu06vy2Cew4QmdUim5Sb92qNlNyl8ekzSiltyK3DEIOzRjUirZ6WSk5R WOG8TevRRS+zGFbF9O4wUljE2mRnGt0dRWMQwQMHRnE/WuOfWdzOzOWb/6KsWx63Srxw9CXWq IX+Fri6LeHDD1vdTeC14yXHXJndXgn9knyFxQVIPkMwhN10vhitxJ9wYjX9wXL3fpdM4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The CLOCKSOURCE_OF_DECLARE macro ensures that the type of the init function matches the caller. In case of the new timer-nps driver, it doesn't match, so we get a warning: ../drivers/clocksource/timer-nps.c:97:208: error: comparison of distinct pointer types lacks a cast [-Werror] CLOCKSOURCE_OF_DECLARE(ezchip_nps400_clksrc, ezchip,nps400-timer, This changes the return type to match what the caller expects. Signed-off-by: Arnd Bergmann --- drivers/clocksource/timer-nps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.7.0 diff --git a/drivers/clocksource/timer-nps.c b/drivers/clocksource/timer-nps.c index d46108920b2c..ae34718f5ab2 100644 --- a/drivers/clocksource/timer-nps.c +++ b/drivers/clocksource/timer-nps.c @@ -81,17 +81,19 @@ static void __init nps_setup_clocksource(struct device_node *node, } } -static void __init nps_timer_init(struct device_node *node) +static int __init nps_timer_init(struct device_node *node) { struct clk *clk; clk = of_clk_get(node, 0); if (IS_ERR(clk)) { pr_err("Can't get timer clock.\n"); - return; + return PTR_ERR(clk); } nps_setup_clocksource(node, clk); + + return 0; } CLOCKSOURCE_OF_DECLARE(ezchip_nps400_clksrc, "ezchip,nps400-timer",