public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ashish Jangam <Ashish.Jangam@kpitcummins.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	David Dajun Chen <Dajun.Chen@diasemi.com>,
	Paul Gortmaker <p_gortmaker@yahoo.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCHv1 3/11] RTC: RTC module of DA9052 PMIC driver
Date: Sat, 16 Apr 2011 10:38:48 -0700	[thread overview]
Message-ID: <1302975528.27935.12.camel@Joe-Laptop> (raw)
In-Reply-To: <E2CAE7F7B064EA49B5CE7EE9A4BB167D151B6777D5@KCINPUNHJCMS01.kpit.com>

On Thu, 2011-04-14 at 16:32 +0530, Ashish Jangam wrote:
> RTC Driver for Dialog Semiconductor DA9052 PMICs.

Just some comments on messaging.

Because you have __func__ defined in rtc_err, you don't
need to repeat it in the message format.

> diff -Naur linux-2.6.38.2/drivers/rtc/rtc-da9052.c wrk_linux-2.6.38.2/drivers/rtc/rtc-da9052.c
[]
> +#define rtc_err(da9052, fmt, ...) \
> +		dev_err(da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
[]
> +static int da9052_rtc_enable_alarm(struct da9052 *da9052, bool enable)
> +{
[]
> +			rtc_err(da9052, "da9052_rtc_enable_alarm write error %d\n",
> +					ret);

			rtc_err(da9052, "write error: %d\n", ret);

> +static irqreturn_t da9052_rtc_irq(int irq, void *data)
> +{
[]
> +	ret = da9052_reg_read(rtc->da9052, DA9052_ALARM_MI_REG);
> +	if (ret < 0) {
> +		rtc_err(rtc->da9052, "da9052_rtc_notifier read error %d\n",
> +					ret);

Error message doesn't make sense to me.  Maybe:
		rtc_err(rtc->da9052, "read error: %d\n", ret);

[]
> +static int da9052_rtc_read_time
> +			(struct device *dev, struct rtc_time *rtc_tm)
> +{
[]
> +	ret = rtc_valid_tm(rtc_tm);
> +	if (ret != 0) {
> +		rtc_err(rtc->da9052, "da9052_rtc_read_time valid time failed %d\n",
> +					ret);

		rtc_err(rtc->da9052, "rtc_valid_tm failed: %d\n", ret);

> +static int __devinit da9052_rtc_probe(struct platform_device *pdev)
> +{
[]
> +	ret = request_threaded_irq(rtc->da9052->irq_base + rtc->irq,
> +				NULL, da9052_rtc_irq,
> +				IRQF_TRIGGER_LOW | IRQF_ONESHOT,
> +				"ALM", rtc);
> +	if (ret != 0) {
> +		rtc_err(rtc->da9052, "DA9052 RTC failed irq registration: %d\n",
> +					ret);

		rtc_err(rtc->da9052, "irq registration failed: %d\n", ret);



  reply	other threads:[~2011-04-16 17:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14 11:02 [PATCHv1 3/11] RTC: RTC module of DA9052 PMIC driver Ashish Jangam
2011-04-16 17:38 ` Joe Perches [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-04-06 13:17 Ashish Jangam
2011-04-12 23:37 ` Andrew Morton
2011-04-13  0:02   ` Joe Perches
2011-04-14 11:39   ` Ashish Jangam

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=1302975528.27935.12.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=Ashish.Jangam@kpitcummins.com \
    --cc=Dajun.Chen@diasemi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p_gortmaker@yahoo.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