Thread (2 messages) 2 messages, 2 authors, 2016-12-21
DORMANTno replies

[rtc-linux] Re: [PATCH v2] rtc: armada38x: Followed the new recommendation for errata implementation

From: Alexandre Belloni <hidden>
Date: 2016-12-21 09:44:49
Also in: linux-arm-kernel

Possibly related (same subject, not in this thread)

On 21/12/2016 at 10:02:54 +0100, Gregory CLEMENT wrote :
Hi Alexandre,
=20
 On mer., d=C3=A9c. 21 2016, Alexandre Belloni <alexandre.belloni@free-el=
ectrons.com> wrote:
=20
=20
I agree with all your remark expect one, see below:
[...]
quoted
quoted
 	rtc_update_irq(rtc->rtc_dev, 1, event);
=20
 	return IRQ_HANDLED;
@@ -221,6 +282,11 @@ static __init int armada38x_rtc_probe(struct plat=
form_device *pdev)
quoted
quoted
 	if (!rtc)
 		return -ENOMEM;
=20
+	rtc->val_to_freq =3D devm_kcalloc(&pdev->dev, SAMPLE_NR,
+				sizeof(struct value_to_freq), GFP_KERNEL);
+	if (!rtc->val_to_freq)
+		return -ENOMEM;
+
The whole struct armada38x_rtc is already allocated just before. Maybe
you can put the whole array inside the structure instead of doing a new
allocation.
=20
Actually it was done on purpose. Indeed the same RTC IP is used in the
Armada 3700 (a patch is coming soon), and for this IP this issue was
fixed and we do not need to store 100 read. That's why I want to
allocate the array only if needed.
=20
Fair enough


--=20
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

--=20
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---=20
You received this message because you are subscribed to the Google Groups "=
rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help