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: 7432441 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2CF8E9F37F for ; Mon, 19 Oct 2015 00:10:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B2F820664 for ; Mon, 19 Oct 2015 00:10:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5AC7920662 for ; Mon, 19 Oct 2015 00:10:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zny1u-00024T-52; Mon, 19 Oct 2015 00:10:22 +0000 Received: from mail-lb0-f174.google.com ([209.85.217.174]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zny1r-0000qr-B1 for linux-mediatek@lists.infradead.org; Mon, 19 Oct 2015 00:10:20 +0000 Received: by lbbpp2 with SMTP id pp2so102109337lbb.0 for ; Sun, 18 Oct 2015 17:09:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=f2DeQsHuURpVgS2ZQFw89zpqnnKoCLfYM8O9YJMZH9k=; b=ZtikPRot6VpcOdc6iWI4esf2RnlWfnaMc9LEcQ7QlkmFdIuWSkSvwiv4tJe22Y66Td cJn1ese/JvYdFibs2FQU6BoGlLZyv0lmFkZMlylnVlhqghkuaV51KVy01aAUDCVHC8HH h4ZBFRGQNzrGB2lLr4zSwmwE0qHu4jJ1tvkvNOy7NwQrgE97h9+K7Es5BYnTjStxhZ84 53l0+fE75rIOIYqcKDWaf89RpH2wG4CyJV+N7EMLCYRPEGLIznWsT1zzthXyH8BgQkT5 fizG+bg7QIU+8GyD5+Gs0zqQEzLyYLhaQ+ryTR1Uf+Fktp41WdvufJRKnTqvX6PPjYPM C5/w== X-Gm-Message-State: ALoCoQm2dpGXsLqKIRnKAjQoPiAVi2CLMvf+Jb/nxipgLlQNByEBlVwRxexLFJZXPtrltMr3Ue/s 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151018_171019_570682_C29C41A3 X-CRM114-Status: GOOD ( 10.23 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: klimov.linux@gmail.com, linux-mediatek@lists.infradead.org, joe@perches.com, yingjoe.chen@mediatek.com, tglx@linutronix.de, Alexey Klimov MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }