lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 16 Apr 2011 10:38:48 -0700
From:	Joe Perches <joe@...ches.com>
To:	Ashish Jangam <Ashish.Jangam@...tcummins.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	David Dajun Chen <Dajun.Chen@...semi.com>,
	Paul Gortmaker <p_gortmaker@...oo.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCHv1 3/11] RTC: RTC module of DA9052 PMIC driver

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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ