Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp514984img; Tue, 26 Feb 2019 04:10:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IaVdICnG8cLGyaeuDCXZdZlPJAyEXCwKMm6kDlaf8+MoOPAYuCSyKp1qv+CyeU+Sbn5sYPD X-Received: by 2002:a63:ff1f:: with SMTP id k31mr1105065pgi.422.1551183032551; Tue, 26 Feb 2019 04:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551183032; cv=none; d=google.com; s=arc-20160816; b=gCNtt2Z3K1mJ/YPiuO8UcKJ2dZml63T2c4zIENlOcz4gu7RpnPXtsgBKyDLRnFBiPV +B8iHa61RE5J49T4Igj82WG/OXk7IiDXRFfJ4Q0TYL67EtNSg5lPwLVDeMbiF61eiWqQ IOSjEAyzU3excVb3m0MFnpD91wJ9wcnqTmCeVkMySKMFi7GiDP5DlhYzdKJW8lirUYWn 5aTdhZM2stjl0hdlNrxN0IoPjssr4OysSB4BKJh/A8ZR+ZDylI4BdEtE6PsHAInJQ7Qd aqCXYyMGJnLID8gY2xi1tsMk1lD7GqhvybqD1Vf2NO1AMr4C9v5Louvpw/yOToCLPuun ZWLw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=oZc1chqonr5OFHhPY+4ktv/rItkbHorQByl5DMoQXYk=; b=a4NqsiEn71LFxMAxtJHOW6cLoJLHui+vxoHlzDD2dT9YDRmPsFKFlpGiUfp1GH2cTr e9Wt6qWEcgBITMstB6h9/6Nwwcj3i60UGNfnJrb38GwjQDKm3TvURzXWlUhAaN8o/+rt iULIaatkn/OyMa7w0+2q657a9n9MkQ15QbUcV5XPIkRSyw2pG8nwDOKvY1GuxGuXHjjX h4kWyyj59L4EMsEwUX1ZuxVGmIMgT8MUSjIPCzQUE4jYP1rnfNNNbDenR2BFLQiZiUA4 09JRD+0W0J/t/QWJqk+ecJd/UM1CmLD2Mp/80rA9pXu5Ekd5Q37AIN2eS7hGw++6Iadb k04A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=jntSlpts; 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 c11si12124727pfn.233.2019.02.26.04.10.17; Tue, 26 Feb 2019 04:10:32 -0800 (PST) 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; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=jntSlpts; 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 S1728700AbfBZMJO (ORCPT + 99 others); Tue, 26 Feb 2019 07:09:14 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:34953 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727276AbfBZMJL (ORCPT ); Tue, 26 Feb 2019 07:09:11 -0500 Received: by mail-it1-f194.google.com with SMTP id 188so3689276itb.0 for ; Tue, 26 Feb 2019 04:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=oZc1chqonr5OFHhPY+4ktv/rItkbHorQByl5DMoQXYk=; b=jntSlptsuzdjhBIgeOHESJCA5eDSREADmyB3Wdr6i1TYBo2xfGZsUVeSvKIUKwguDF D259eXEv6aQL8KB2xo2SkkLKTkXfTfDB6yDPZrhWWheObDlD1ZKPcR58ZJsD7i0Oaugh ForT8c9GicMqc7Hm8yYeAkdxYCJhSVlXfdXPijBHvU1nB+uvRFPv0mNlIR0rADXSNpZE HqGNpl3nfI7M0I2gBLXrsJglSxI93f4OurERh5oQMEiIv/uWWT1K39n6RaH/auy57gNa E2LrL1ppjP4xJIfcLiR6CBsnXrvXJfzauo5rCTHIDdbupajm51fgBwxGWvwsFTf9Sgz8 zLxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=oZc1chqonr5OFHhPY+4ktv/rItkbHorQByl5DMoQXYk=; b=U3kCjwbwHaGpgsj4cODl1RtGNn5tUHmDsob0riTba19LATV4PLCcXafR3A9k7JWYoJ 0vDt1ptjEzsUUinEsseY6OLNAB4y6rB84fooFVYmTJZ8HdJiTxUp8KTeRIT7B2oObHKm rOIIe0P5UAuaNwrwTYadxMQH/vyPuFLyMyFg4rbxnYiHJpsIVvz6490W1eEvNWAORRJ5 QMu0qxrNItVyxORm97LToh7Qbz5B+45RPq3k6E9XiFxhth3okUCcSzCiWXe+FMGkrQD8 lTS98pN/a0FNyA2E7mPFxPm9eoCRpYJYTjQ/bjSPgF3je3AAKN1vyP1idt0rA6iXo+yz t9ow== X-Gm-Message-State: AHQUAub4geZk91Zo409VfNQ6Yg4Niq0Ls5/rlt3eL9FK4OIk9K1d85Lv gXMDyRgPnuW71kjdhAmCGelNLqBH+R7HvwmsA9kGHA== X-Received: by 2002:a02:c78d:: with SMTP id n13mr12224416jao.57.1551182950139; Tue, 26 Feb 2019 04:09:10 -0800 (PST) MIME-Version: 1.0 References: <20190204171757.32073-1-brgl@bgdev.pl> <20190204171757.32073-5-brgl@bgdev.pl> <0750392d-e298-b467-24c0-3c2779ead3f7@lechnology.com> In-Reply-To: <0750392d-e298-b467-24c0-3c2779ead3f7@lechnology.com> From: Bartosz Golaszewski Date: Tue, 26 Feb 2019 13:08:59 +0100 Message-ID: Subject: Re: [PATCH v2 04/12] ARM: davinci: WARN_ON() if clk_get() fails To: David Lechner Cc: Sekhar Nori , Kevin Hilman , Daniel Lezcano , Rob Herring , Mark Rutland , Thomas Gleixner , devicetree , Linux Kernel Mailing List , Linux ARM , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 5 lut 2019 o 03:18 David Lechner napisa=C5=82(a= ): > > On 2/4/19 11:17 AM, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Currently the timer code checks if the clock pointer passed to it is > > good (!IS_ERR(clk)). The new clocksource driver expects the clock to > > be functional and doesn't perform any checks so emit a warning if > > clk_get() fails. Apply this to all davinci platforms. > > > > Signed-off-by: Bartosz Golaszewski > > --- > > arch/arm/mach-davinci/da830.c | 4 ++++ > > arch/arm/mach-davinci/da850.c | 4 ++++ > > arch/arm/mach-davinci/dm355.c | 4 ++++ > > arch/arm/mach-davinci/dm365.c | 4 ++++ > > arch/arm/mach-davinci/dm644x.c | 4 ++++ > > arch/arm/mach-davinci/dm646x.c | 4 ++++ > > 6 files changed, 24 insertions(+) > > > > diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da83= 0.c > > index 2cc9fe4c3a91..9a4b749cbb6b 100644 > > --- a/arch/arm/mach-davinci/da830.c > > +++ b/arch/arm/mach-davinci/da830.c > > @@ -834,6 +834,10 @@ void __init da830_init_time(void) > > da830_pll_init(NULL, pll, NULL); > > > > clk =3D clk_get(NULL, "timer0"); > > + if (WARN_ON(IS_ERR(clk))) { > > + pr_err("Unable to get the timer clock\n"); > > Do we really need a warning _and_ an error? > That will give us the reason AND point us to the right place in the code. Bart > > + return; > > + } > > > > davinci_timer_init(clk); > > }