From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE175C76190 for ; Mon, 22 Jul 2019 13:18:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B363821901 for ; Mon, 22 Jul 2019 13:18:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XFxBiXbb"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="JupiVnuD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B363821901 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H5onO6pP0o2wdAPGFEZSmHtAD5NPqgS7zuT/p6Dx61g=; b=XFxBiXbbGmpFRm TiGnhDqpH8ukgN0ClZSsy7yNfodTUzX3KffSE4+7RnqbBMt0qgPp97koDDttV7Lm6oTH1ElQ4IFPa esUpuVmLM7xebKg41QrJV6mzKcJ/lIMs+UJu1csVCHMHEXRZ1vT32f1TEZbVbzNT1AZhCHxzHlM6S LSxV4kzFJY1k9ZDRBtdTO4un0OeNJtIfeekBwA6YfRMUQ+yBvsOliWnDr+YJg/ckdzuogbQOfKPAk 7LGee1EgTSByAU0jdU7pq+qtX6liUkBe6k33lIcG5PT46/3fepuWn1+NwKo2DEHlKa7Z478johpvx j794kSLIUfdNGseOp6kg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hpYCp-0004yv-0R; Mon, 22 Jul 2019 13:18:19 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hpYCS-0004dL-29 for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2019 13:17:58 +0000 Received: by mail-wr1-x442.google.com with SMTP id p17so39354416wrf.11 for ; Mon, 22 Jul 2019 06:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hwJfFyhhvRsina5sbst5ytafYocQofbOLZV0dXVMw8Y=; b=JupiVnuDy2n2aPCZgFJmLG37jMrOtH0zvxXZZQu8FgDcankNuQTwvQDYy0I5IzsJSA F8KruVAy701YL+AZHs5cwB0d/pqodtxmtqFzGF++S/CBkO48zLx4Xh2Oni/wMRatRfn9 jnm+eMPB+Jqtswlu7JHM+e/gIpjJULO0sTX+hGynCJsZDxeRY52bMDx5veq+Dt5nmjDE udir5IJWjd+ptyx7uXEBNNdp3CXvOASNAYE28jdL0A2UblFhIuyi/bRTLh9xXgOhrU/5 DQ9V2zBkS3YZhJrn7pmGDZOwBuU1hUGwr2fW5jQJA5ucCgRdjem/A/NVZyb1hJygiQEb Nu0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hwJfFyhhvRsina5sbst5ytafYocQofbOLZV0dXVMw8Y=; b=nwJwBGKdAWfKAxQm8eTVFrVr0b2A6063p3pPsrwvACaOEscaGJN9pq5mNAmBN45Goj ePYMoOkyd4FdfUR4QvOHZERNNe/bdOdEAzLvnrqJDJnODp86zlV0fJzxYdjByL6n7r4P jcWPzaMAuBYMEyO1ZbtSSLViWGCpsAKdztdwRWrt5PhRebYGYcve8lf82OSx5vIols3F Qka2jW9/P7BX3nacZJwBdGOruhhSSUtWY5Vq7hCTPWksR+EBOB56bH6s5lwu9o33mQQg OR9MZaD9bLG9GChLHim9EiDKyswYx8EVJ4CPDp8pyhSsLMuDMvXSDDGrgo70GpPA5Nyk 4bnw== X-Gm-Message-State: APjAAAVPyx3XicQH5kV4m7mqfhTYmPhBO8zLZcNKKF0DPK0RVXQU57oR MYzCo96dgKA9FUF6Rscs8CM= X-Google-Smtp-Source: APXvYqzqJfinGvtWGLtZwmywOZm3G950NbAUa+GIqCAGlJY4Nyl0B4GPHLntvvYmvyc3AYD8ddwjBA== X-Received: by 2002:adf:f591:: with SMTP id f17mr60699781wro.119.1563801473928; Mon, 22 Jul 2019 06:17:53 -0700 (PDT) Received: from localhost.localdomain (amontpellier-652-1-281-69.w109-210.abo.wanadoo.fr. [109.210.96.69]) by smtp.gmail.com with ESMTPSA id z6sm34156657wrw.2.2019.07.22.06.17.52 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 06:17:53 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman Subject: [RESEND PATCH 02/10] ARM: davinci: WARN_ON() if clk_get() fails Date: Mon, 22 Jul 2019 15:17:40 +0200 Message-Id: <20190722131748.30319-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190722131748.30319-1-brgl@bgdev.pl> References: <20190722131748.30319-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190722_061756_303388_5CA51C53 X-CRM114-Status: GOOD ( 10.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, David Lechner Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: David Lechner --- 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/da830.c index e6b8ffd934a1..220e99438ae0 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c @@ -751,6 +751,10 @@ void __init da830_init_time(void) da830_pll_init(NULL, pll, NULL); clk = clk_get(NULL, "timer0"); + if (WARN_ON(IS_ERR(clk))) { + pr_err("Unable to get the timer clock\n"); + return; + } davinci_timer_init(clk); } diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 77bc64d6e39b..dcf3536c46bc 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -681,6 +681,10 @@ void __init da850_init_time(void) da850_pll0_init(NULL, pll0, cfgchip); clk = clk_get(NULL, "timer0"); + if (WARN_ON(IS_ERR(clk))) { + pr_err("Unable to get the timer clock\n"); + return; + } davinci_timer_init(clk); } diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index c6073326be2e..a38a3648345b 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -743,6 +743,10 @@ void __init dm355_init_time(void) dm355_psc_init(NULL, psc); clk = clk_get(NULL, "timer0"); + if (WARN_ON(IS_ERR(clk))) { + pr_err("Unable to get the timer clock\n"); + return; + } davinci_timer_init(clk); } diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 2f9ae6431bf5..8062412be70f 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c @@ -784,6 +784,10 @@ void __init dm365_init_time(void) dm365_psc_init(NULL, psc); clk = clk_get(NULL, "timer0"); + if (WARN_ON(IS_ERR(clk))) { + pr_err("Unable to get the timer clock\n"); + return; + } davinci_timer_init(clk); } diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 1b9e9a6192ef..7a6b5a48cae5 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c @@ -679,6 +679,10 @@ void __init dm644x_init_time(void) dm644x_psc_init(NULL, psc); clk = clk_get(NULL, "timer0"); + if (WARN_ON(IS_ERR(clk))) { + pr_err("Unable to get the timer clock\n"); + return; + } davinci_timer_init(clk); } diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 62ca952fe161..97fe533726e9 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c @@ -663,6 +663,10 @@ void __init dm646x_init_time(unsigned long ref_clk_rate, dm646x_psc_init(NULL, psc); clk = clk_get(NULL, "timer0"); + if (WARN_ON(IS_ERR(clk))) { + pr_err("Unable to get the timer clock\n"); + return; + } davinci_timer_init(clk); } -- 2.21.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel