From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752440AbbJSAXa (ORCPT ); Sun, 18 Oct 2015 20:23:30 -0400 Received: from smtprelay0175.hostedemail.com ([216.40.44.175]:33643 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752001AbbJSAX2 (ORCPT ); Sun, 18 Oct 2015 20:23:28 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:968:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2828:2899:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:4321:5007:6119:7652:7903:10004:10400:10848:11026:11658:11914:12043:12296:12517:12519:12555:12740:13069:13095:13255:13311:13357:21080:21212,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: cake84_1dff34c779501 X-Filterd-Recvd-Size: 1876 Message-ID: <1445214204.31899.36.camel@perches.com> Subject: Re: [PATCH v2 2/3] clocksource: mtk_timer: fix pr_warn() messages in mtk_timer_init From: Joe Perches To: Alexey Klimov Cc: daniel.lezcano@linaro.org, matthias.bgg@gmail.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, yingjoe.chen@mediatek.com, tglx@linutronix.de, klimov.linux@gmail.com Date: Sun, 18 Oct 2015 17:23:24 -0700 In-Reply-To: <1445213365-24530-2-git-send-email-alexey.klimov@linaro.org> References: <1445213365-24530-1-git-send-email-alexey.klimov@linaro.org> <1445213365-24530-2-git-send-email-alexey.klimov@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2015-10-19 at 03:09 +0300, Alexey Klimov wrote: > 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. Some of the braces around single statements could also be removed. > diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c > index ca5ea9e..ac92ca2 100644 > @@ -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; > } could be written: evt = kzalloc(sizeof(*evt), GFP_KERNEL); if (!evt) return; etc...