Linux RTC
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	 Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	 rtc-linux@googlegroups.com,  Jason Cooper <jason@lakedaemon.net>,
	 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	 linux-arm-kernel@lists.infradead.org,
	 Shaker Daibes <shaker@marvell.com>
Subject: [rtc-linux] Re: [PATCH 1/3] rtc: armada38x: improve RTC errata implementation
Date: Fri, 09 Dec 2016 17:19:07 +0100	[thread overview]
Message-ID: <8760mtf538.fsf@free-electrons.com> (raw)
In-Reply-To: <20161208172923.GQ26852@lunn.ch> (Andrew Lunn's message of "Thu, 8 Dec 2016 18:29:23 +0100")

Hi Andrew,
=20
 On jeu., d=C3=A9c. 08 2016, Andrew Lunn <andrew@lunn.ch> wrote:

>> +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 =3D 0, index_max =3D 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

--=20
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
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.

  reply	other threads:[~2016-12-09 16:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 17:10 [rtc-linux] [PATCH 0/3] rtc: armada38x: Few improvement and cleanup Gregory CLEMENT
2016-12-08 17:10 ` [rtc-linux] [PATCH 1/3] rtc: armada38x: improve RTC errata implementation Gregory CLEMENT
2016-12-08 17:29   ` [rtc-linux] " Andrew Lunn
2016-12-09 16:19     ` Gregory CLEMENT [this message]
2016-12-09 16:33       ` Andrew Lunn
2016-12-08 17:37   ` Russell King - ARM Linux
2016-12-09 16:37     ` Gregory CLEMENT
2016-12-08 17:10 ` [rtc-linux] [PATCH 2/3] rtc: armada38x: Convert to time64_t Gregory CLEMENT
2016-12-08 18:08   ` [rtc-linux] " Russell King - ARM Linux
2016-12-08 17:10 ` [rtc-linux] [PATCH 3/3] rtc: armada38x: Prepare for being use on 64 bits Gregory CLEMENT
2016-12-08 18:09   ` [rtc-linux] " Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760mtf538.fsf@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=andrew@lunn.ch \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=shaker@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox