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]
Message-ID: <6810623.bmce33g2Ev@diego>
Date:	Wed, 27 Aug 2014 20:52:19 +0200
From:	Heiko Stübner <heiko@...ech.de>
To:	Chris Zhong <zyw@...k-chips.com>
Cc:	robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	sameo@...ux.intel.com, lee.jones@...aro.org, lgirdwood@...il.com,
	broonie@...nel.org, a.zummo@...ertech.it, mturquette@...aro.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	rtc-linux@...glegroups.com, grant.likely@...aro.org,
	hl@...k-chips.com, huangtao@...k-chips.com, cf@...k-chips.com,
	zhangqing@...k-chips.com, xxx@...k-chips.com,
	dianders@...omium.org, olof@...om.net, sonnyrao@...omium.org,
	dtor@...omium.org, javier.martinez@...labora.co.uk,
	kever.yang@...k-chips.com
Subject: Re: [PATCH v6 3/5] RTC: RK808: add RTC driver for RK808

Hi Chris,

Am Dienstag, 26. August 2014, 22:14:56 schrieb Chris Zhong:
> Adding RTC driver for supporting RTC device present inside RK808 PMIC.
> 
> Signed-off-by: Chris Zhong <zyw@...k-chips.com>
> Signed-off-by: Zhang Qing <zhangqing@...k-chips.com>
> 
> ---
> 
> Changes in v6:
> Adviced by doug
> - move RTC_READSEL setting into probe
> 
> Changes in v5:
> - fixed a bug about set_time failed
> 
> Changes in v4:
> - use &client->dev replace rk808->dev
> 
> Changes in v3: None
> Changes in v2:
> Adviced by javier.martinez
> - Add a separate clock driver, rather than in RTC driver
> 
>  drivers/rtc/Kconfig     |   10 ++
>  drivers/rtc/Makefile    |    1 +
>  drivers/rtc/rtc-rk808.c |  412
> +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 423
> insertions(+)
>  create mode 100644 drivers/rtc/rtc-rk808.c
> 

[...]

> diff --git a/drivers/rtc/rtc-rk808.c b/drivers/rtc/rtc-rk808.c
> new file mode 100644
> index 0000000..00cd997
> --- /dev/null
> +++ b/drivers/rtc/rtc-rk808.c

[...]

> +/*
> + * We will just handle setting the frequency and make use the framework for
> + * reading the periodic interupts.
> + *
> + * @freq: Current periodic IRQ freq:
> + * bit 0: every second
> + * bit 1: every minute
> + * bit 2: every hour
> + * bit 3: every day
> + */
> +static irqreturn_t rk808_alarm_irq(int irq, void *data)
> +{
> +	struct rk808_rtc *rk808_rtc = data;
> +	struct rk808 *rk808 = rk808_rtc->rk808;
> +	struct i2c_client *client = rk808->i2c;
> +	uint32_t rtc_ctl;
> +	int ret;
> +
> +	ret = regmap_write(rk808->regmap, RK808_RTC_STATUS_REG,
> +			   RTC_STATUS_MASK);
> +	if (ret) {
> +		dev_err(&client->dev,
> +			"%s:Failed to update RTC status: %d\n", __func__, ret);
> +		return ret;
> +	}
> +
> +	rtc_update_irq(rk808_rtc->rtc, 1, RTC_IRQF | RTC_AF);
> +	dev_dbg(&client->dev,
> +		 "%s:irq=%d,rtc_ctl=0x%x\n", __func__, irq, rtc_ctl);

what is rtc_ctl? It seems to be unused and its use in the dev_dbg produces:

drivers/rtc/rtc-rk808.c: In function 'rk808_alarm_irq':
drivers/rtc/rtc-rk808.c:258:2: warning: 'rtc_ctl' may be used uninitialized in this function [-Wuninitialized]


Heiko
--
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