Re: [RFC PATCH v1 11/13] rtc: bd70528: Initial support for ROHM bd70528 RTC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 22, 2019 at 06:48:21AM -0800, Guenter Roeck wrote:
> On 1/22/19 1:47 AM, Matti Vaittinen wrote:
> > +
> > +static int bd70528_set_rtc_based_timers(struct bd70528 *bd70528, int new_state,
> > +							int *old_state)
> 
> Passed parameter is an int, not int *. I'd be quite surprised if this compiles
> without warning.
> 
> > +static int bd70528_re_enable_rtc_based_timers(struct bd70528 *bd70528,
> > +							int old_state)
// snip
> > +	return bd70528_set_rtc_based_timers(bd70528, old_state, NULL);

and

> > +static int bd70528_disable_rtc_based_timers(struct bd70528 *bd70528,
> > +							int *old_state)
// snip
> > +	return bd70528_set_rtc_based_timers(bd70528, 0, old_state);

I'm not quite sure I understand what you mean by that. Second parameter is int,
third one is is int *.

> > +static int bd70528_re_enable_rtc_based_timers(struct bd70528 *bd70528,
> > +							int old_state)
> > +{
> > +	if (bd70528->rtc_timer_lock)
> > +		mutex_unlock(bd70528->rtc_timer_lock);
> > +
> Unlock before calling bd70528_set_rtc_based_timers is odd, especially since it
> is called after locking below.
> 

Yet another brainfart. Thanks for pointing this out! Will be fixed as
well.

Br,
	Matti Vaittinen

-- 
Matti Vaittinen
ROHM Semiconductors

~~~ "I don't think so," said Rene Descartes.  Just then, he vanished ~~~



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux