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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150721100151.GC2853@piout.net>
Date:	Tue, 21 Jul 2015 12:01:51 +0200
From:	Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To:	S Twiss <stwiss.opensource@...semi.com>
Cc:	Alessandro Zummo <a.zummo@...ertech.it>,
	DEVICETREE <devicetree@...r.kernel.org>,
	LINUXINPUT <linux-input@...r.kernel.org>,
	LINUXKERNEL <linux-kernel@...r.kernel.org>,
	RTCLINUX <rtc-linux@...glegroups.com>,
	David Dajun Chen <david.chen@...semi.com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Lee Jones <lee.jones@...aro.org>,
	Mark Rutland <mark.rutland@....com>,
	Pawel Moll <pawel.moll@....com>,
	Rob Herring <robh+dt@...nel.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Support Opensource <support.opensource@...semi.com>
Subject: Re: [PATCH V2 3/3] rtc: da9063: Add DA9062 RTC capability to DA9063
 RTC driver

Hi Steve,

it looks mostly good, a few more comments:

On 21/07/2015 at 10:43:10 +0100, S Twiss wrote :
> -	if (val & (DA9063_E_ALARM))
> +	if (val & (config->rtc_event_alarm_mask))
unneeded parenthesis here

> +	if (of_device_is_compatible(pdev->dev.of_node, "dlg,da9063-rtc")) {
> +		struct da9063 *chip = dev_get_drvdata(pdev->dev.parent);
> +
> +		if (chip->variant_code == PMIC_DA9063_AD)
> +			rtc->config = &da9063_ad_regs;
> +	} else
> +		rtc->config = match->data;

Both arms of the if should use braces.

Also, what happens if it is a da9063, BB variant? I guess rtc->config
will not be set.

maybe you should write:

rtc->config = match->data;
if (of_device_is_compatible(pdev->dev.of_node, "dlg,da9063-rtc")) {
     struct da9063 *chip = dev_get_drvdata(pdev->dev.parent);

     if (chip->variant_code == PMIC_DA9063_AD)
         rtc->config = &da9063_ad_regs;
}


> @@ -348,5 +515,5 @@ module_platform_driver(da9063_rtc_driver);
>  
>  MODULE_AUTHOR("S Twiss <stwiss.opensource@...semi.com>");
>  MODULE_DESCRIPTION("Real time clock device driver for Dialog DA9063");
> -MODULE_LICENSE("GPL v2");
> +MODULE_LICENSE("GPL");

This should be part of the license change.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
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