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: <20140305235138.GD18529@joshc.qualcomm.com>
Date:	Wed, 5 Mar 2014 17:51:38 -0600
From:	Josh Cartwright <joshc@...eaurora.org>
To:	Stephen Boyd <sboyd@...eaurora.org>
Cc:	Josh Cartwright <joshc@...eaurora.org>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	linux-arm-msm@...r.kernel.org, rtc-linux@...glegroups.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] rtc: pm8xxx: fixup checkpatch/style issues

On Wed, Mar 05, 2014 at 01:02:29PM -0800, Stephen Boyd wrote:
> On 03/05/14 11:29, Josh Cartwright wrote:
> > Before performing additional cleanups to this driver, do the easy
> > cleanups first.
> >
> > Signed-off-by: Josh Cartwright <joshc@...eaurora.org>
> 
> Reviewed-by: Stephen Boyd <sboyd@...eaurora.org>

Thanks for the reviews.

> > @@ -253,7 +253,7 @@ static int pm8xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
> >  
> >  	ctrl_reg = rtc_dd->ctrl_reg;
> >  	ctrl_reg = alarm->enabled ? (ctrl_reg | PM8xxx_RTC_ALARM_ENABLE) :
> > -					(ctrl_reg & ~PM8xxx_RTC_ALARM_ENABLE);
> > +				    (ctrl_reg & ~PM8xxx_RTC_ALARM_ENABLE);
> >  
> >  	rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base, 1);
> >  	if (rc < 0) {
> 
> This could be better style with more lines:
> 
> if (alarm->enabled)
>     ctrl_reg |= PM8xxx_RTC_ALARM_ENABLE;
> else
>     ctrl_reg &= ~PM8xxx_RTC_ALARM_ENABLE;

Agreed, I'll clean this up in a v2.

I might go back and see just how much can be cleanup up to use the
regmap_update_bits() API as well.

Thanks,
  Josh

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
--
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