Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp403398ybg; Thu, 19 Mar 2020 01:50:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuYO8E2oXl23mZDJtwQMz2KzITJS8Vk/k5jdVxLHIos93IMXEVQ9ngGOOtDxSbqDeUUpm8Q X-Received: by 2002:aca:be08:: with SMTP id o8mr1423994oif.101.1584607830455; Thu, 19 Mar 2020 01:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584607830; cv=none; d=google.com; s=arc-20160816; b=GApnnQEkMxNX9j255G2Mj6FjrYzsAA5jkTL4Y+F6ee61lv6GJFGtvpLrOTSx10o+uw Y35ghAj697SLRPpuWWG0fqLuNaZvrTN4nZtGcpf6z4avc2aE/NnpLvW5z8HHocmPnbJE Sfc1/JJ4c/NTHeSsSQBhUaWLNwj5+3iwr+EMT8khgD5pNffKoAQLF0ykkzu6EVVOerll INkkQfpwHz2kU945x9KtOo6WH2pyyDI7XLJuItj5PUCG3QAvRqGJCiYLRa2xfEiL49mI 5UjeoMUo1BiFm4TrdyZMnZZb2zn3PRu7BC5wN7HdCT/XcUfuAF8ja6OR9pvZbevP21Xm 4+9w== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=I346XFA1ryQi4lEG48kUBHrYnnfLOstwuxcBNZJLfFo=; b=Wx7ElRWHJiyBkuzgL59IH/5xJ2bndI7xuz1EhQXAJrFWvEbjyVQdnEcJ34zslIm0/P ZuIbKjBQIOIheVgnslqrMxeQiBYOYa6t42AsKZtB070wWhGNPSE8T5qZKGiDQW+sNiFp 1XAGyD5Y55h4uV67FhQgu1RVtWyev9AxvX4NL6/wxJUzCgNFMuUF2FfqADhA+SY11eLy JqhiSsbOyE6LCtVvbJSkYRs9jhmWLEe8KODWfwIktVDOIizNwkrt1ub0ECfwm7pdUmpF ttDjoc/RqV+IFwBdgCL4nH4uuzJyFKUBCRno4qVfN3IDm3QLBG2BpNZPxLFhjA/m3CiO 0uVw== 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 u10si727856oib.91.2020.03.19.01.50.18; Thu, 19 Mar 2020 01:50:30 -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 S1727395AbgCSIs5 (ORCPT + 99 others); Thu, 19 Mar 2020 04:48:57 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:59783 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727050AbgCSIsB (ORCPT ); Thu, 19 Mar 2020 04:48:01 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jEqqJ-000334-Vo; Thu, 19 Mar 2020 09:47:56 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id CFB871C229F; Thu, 19 Mar 2020 09:47:52 +0100 (CET) Date: Thu, 19 Mar 2020 08:47:52 -0000 From: "tip-bot2 for Matheus Castello" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/owl: Improve owl_timer_init fail messages Cc: Matheus Castello , Daniel Lezcano , x86 , LKML In-Reply-To: <20200219004810.411190-1-matheus@castello.eng.br> References: <20200219004810.411190-1-matheus@castello.eng.br> MIME-Version: 1.0 Message-ID: <158460767257.28353.6675261030088110845.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: ad1ded9d2e3d1eb452ff58d325aadf237e187bd9 Gitweb: https://git.kernel.org/tip/ad1ded9d2e3d1eb452ff58d325aadf237e187bd9 Author: Matheus Castello AuthorDate: Tue, 18 Feb 2020 21:48:10 -03:00 Committer: Daniel Lezcano CommitterDate: Thu, 27 Feb 2020 09:42:00 +01:00 clocksource/drivers/owl: Improve owl_timer_init fail messages Check the return from clocksource_mmio_init, add messages in case of an error and in case of not having a defined clock property. Signed-off-by: Matheus Castello Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200219004810.411190-1-matheus@castello.eng.br --- drivers/clocksource/timer-owl.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-owl.c b/drivers/clocksource/timer-owl.c index 900fe73..ac97420 100644 --- a/drivers/clocksource/timer-owl.c +++ b/drivers/clocksource/timer-owl.c @@ -135,8 +135,11 @@ static int __init owl_timer_init(struct device_node *node) } clk = of_clk_get(node, 0); - if (IS_ERR(clk)) - return PTR_ERR(clk); + if (IS_ERR(clk)) { + ret = PTR_ERR(clk); + pr_err("Failed to get clock for clocksource (%d)\n", ret); + return ret; + } rate = clk_get_rate(clk); @@ -144,8 +147,12 @@ static int __init owl_timer_init(struct device_node *node) owl_timer_set_enabled(owl_clksrc_base, true); sched_clock_register(owl_timer_sched_read, 32, rate); - clocksource_mmio_init(owl_clksrc_base + OWL_Tx_VAL, node->name, - rate, 200, 32, clocksource_mmio_readl_up); + ret = clocksource_mmio_init(owl_clksrc_base + OWL_Tx_VAL, node->name, + rate, 200, 32, clocksource_mmio_readl_up); + if (ret) { + pr_err("Failed to register clocksource (%d)\n", ret); + return ret; + } owl_timer_reset(owl_clkevt_base);