Thread (2 messages) 2 messages, 2 authors, 2016-12-09
STALE3482d

[PATCH 1/3] rtc: armada38x: improve RTC errata implementation

From: Gregory CLEMENT <hidden>
Date: 2016-12-09 16:19:07
Also in: linux-rtc

Hi Andrew,
 
 On jeu., d?c. 08 2016, Andrew Lunn [off-list ref] wrote:
quoted
+struct str_value_to_freq {
+	unsigned long value;
+	u8 freq;
+} __packed;
+
+static unsigned long read_rtc_register_wa(struct armada38x_rtc *rtc, u8 rtc_reg)
+{
+	unsigned long value_array[SAMPLE_NR], i, j, value;
+	unsigned long max = 0, index_max = SAMPLE_NR - 1;
+	struct str_value_to_freq value_to_freq[SAMPLE_NR];
Hi Gregory

This appears to be putting over 900 bytes on the stack. Is there any
Actually the structure being packed it is 500 bytes.
danger of overflowing the stack? Would it be safer to make these
arrays part of armada38x_rtc?
We could do this if you fear a stack overflow.

Gregory
       Andrew
-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help