From patchwork Mon Oct 19 00:09:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 55216 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f71.google.com (mail-lf0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 8E60122FFA for ; Mon, 19 Oct 2015 00:12:07 +0000 (UTC) Received: by lfaz124 with SMTP id z124sf33824018lfa.0 for ; Sun, 18 Oct 2015 17:12:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=n+Bw6V155ueLA2DDXoDvAw5/X0/en2bRo8W3lgVP0NU=; b=kmEqZoIvwybg7QUCA2qSchJTvr4mMy7Lij8ktg5qI/9rfFXF+WCjKHvAJ887SU52i6 krKn1p/hLsNOicxLmLN858as0ypjlLh3XO5iv5sluTavj6e0YbMFR8VXZOczuKVCyARQ x/TpX9BRcZMdJUjQ73C/+nQ794O8oeJazjsJAiWBPtmcjj/HMOspqDycBRMSA9CZdpBC wC9us5TLKNHO1cuqK0cADZnQ+tv5Na/X9wbUJbXuSzlHdyQ4FsgGjXvyXR3aCedA2ptM woAe1dtQOSxv9IK+5/lC7Ljr+KoNgB5VmlxCK/o7Iar0BYIxTiKdaboJcPXfVX9vycV0 Yznw== X-Gm-Message-State: ALoCoQm5G2GmxSbAONgE04RwMCNzuikum4YP1iEndul+o314pYv7rYwD/DmcqJV5gRyLvRy8yko5 X-Received: by 10.112.132.10 with SMTP id oq10mr6153078lbb.1.1445213526118; Sun, 18 Oct 2015 17:12:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.39.6 with SMTP id n6ls459512lfn.36.gmail; Sun, 18 Oct 2015 17:12:05 -0700 (PDT) X-Received: by 10.112.132.7 with SMTP id oq7mr13321885lbb.32.1445213525768; Sun, 18 Oct 2015 17:12:05 -0700 (PDT) Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id zv6si20893374lbb.62.2015.10.18.17.12.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Oct 2015 17:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lfaz124 with SMTP id z124so99049834lfa.1 for ; Sun, 18 Oct 2015 17:12:05 -0700 (PDT) X-Received: by 10.25.145.132 with SMTP id t126mr8606048lfd.88.1445213525568; Sun, 18 Oct 2015 17:12:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1167302lbq; Sun, 18 Oct 2015 17:12:04 -0700 (PDT) X-Received: by 10.66.255.66 with SMTP id ao2mr30949693pad.55.1445213524592; Sun, 18 Oct 2015 17:12:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pw1si48274271pbb.1.2015.10.18.17.12.04; Sun, 18 Oct 2015 17:12:04 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752566AbbJSAK6 (ORCPT + 28 others); Sun, 18 Oct 2015 20:10:58 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:36757 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752010AbbJSAJz (ORCPT ); Sun, 18 Oct 2015 20:09:55 -0400 Received: by lbcao8 with SMTP id ao8so129828715lbc.3 for ; Sun, 18 Oct 2015 17:09:53 -0700 (PDT) X-Received: by 10.112.72.40 with SMTP id a8mr807966lbv.55.1445213393827; Sun, 18 Oct 2015 17:09:53 -0700 (PDT) Received: from localhost.localdomain ([188.123.252.216]) by smtp.gmail.com with ESMTPSA id t188sm4878359lfe.33.2015.10.18.17.09.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Oct 2015 17:09:53 -0700 (PDT) From: Alexey Klimov To: daniel.lezcano@linaro.org, matthias.bgg@gmail.com, linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org, yingjoe.chen@mediatek.com, tglx@linutronix.de, klimov.linux@gmail.com, joe@perches.com, Alexey Klimov Subject: [PATCH v2 2/3] clocksource: mtk_timer: fix pr_warn() messages in mtk_timer_init Date: Mon, 19 Oct 2015 03:09:24 +0300 Message-Id: <1445213365-24530-2-git-send-email-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445213365-24530-1-git-send-email-alexey.klimov@linaro.org> References: <1445213365-24530-1-git-send-email-alexey.klimov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alexey.klimov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 1) Change pr_warn()s to pr_err()s. These messages are actually errors and not warnings. 2) Add missing \n. 3) Error message for kzalloc() failure is removed per suggestion by Joe Perches. There is generic stack_dump() for allocation issues. Signed-off-by: Alexey Klimov --- drivers/clocksource/mtk_timer.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c index ca5ea9e..ac92ca2 100644 --- a/drivers/clocksource/mtk_timer.c +++ b/drivers/clocksource/mtk_timer.c @@ -184,7 +184,6 @@ static void __init mtk_timer_init(struct device_node *node) evt = kzalloc(sizeof(*evt), GFP_KERNEL); if (!evt) { - pr_warn("Can't allocate mtk clock event driver struct"); return; } @@ -200,24 +199,24 @@ static void __init mtk_timer_init(struct device_node *node) evt->gpt_base = of_io_request_and_map(node, 0, "mtk-timer"); if (IS_ERR(evt->gpt_base)) { - pr_warn("Can't get resource\n"); + pr_err("Can't get resource\n"); return; } evt->dev.irq = irq_of_parse_and_map(node, 0); if (evt->dev.irq <= 0) { - pr_warn("Can't parse IRQ"); + pr_err("Can't parse IRQ\n"); goto err_mem; } clk = of_clk_get(node, 0); if (IS_ERR(clk)) { - pr_warn("Can't get timer clock"); + pr_err("Can't get timer clock\n"); goto err_irq; } if (clk_prepare_enable(clk)) { - pr_warn("Can't prepare clock"); + pr_err("Can't prepare clock\n"); goto err_clk_put; } rate = clk_get_rate(clk); @@ -226,7 +225,7 @@ static void __init mtk_timer_init(struct device_node *node) if (request_irq(evt->dev.irq, mtk_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL, "mtk_timer", evt)) { - pr_warn("failed to setup irq %d\n", evt->dev.irq); + pr_err("failed to setup irq %d\n", evt->dev.irq); goto err_clk_disable; }