mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Alexey Klimov <alexey.klimov@linaro.org>
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
Subject: Re: [PATCH v2 2/3] clocksource: mtk_timer: fix pr_warn() messages in mtk_timer_init
Date: Sun, 18 Oct 2015 17:23:24 -0700	[thread overview]
Message-ID: <1445214204.31899.36.camel@perches.com> (raw)
In-Reply-To: <1445213365-24530-2-git-send-email-alexey.klimov@linaro.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...



  reply	other threads:[~2015-10-19  0:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19  0:09 [PATCH v2 1/3] clocksource: mtk_timer: add pr_fmt define Alexey Klimov
2015-10-19  0:09 ` [PATCH v2 2/3] clocksource: mtk_timer: fix pr_warn() messages in mtk_timer_init Alexey Klimov
2015-10-19  0:23   ` Joe Perches [this message]
2015-10-19  0:09 ` [PATCH v2 3/3] clocksource: mtk_timer: fix memleak in mtk_timer_init() Alexey Klimov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445214204.31899.36.camel@perches.com \
    --to=joe@perches.com \
    --cc=alexey.klimov@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=klimov.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=yingjoe.chen@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®