All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] dtoc: make generated platdata structs const
@ 2019-01-07 19:29 Simon Goldschmidt
  2019-01-10 12:56 ` Simon Glass
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Simon Goldschmidt @ 2019-01-07 19:29 UTC (permalink / raw)
  To: u-boot

The platdata initialization structs are currently generated into .rwdata.
Make sure the are put into .rodata by generating them as const.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
---

 tools/dtoc/dtb_platdata.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index 6cb1259446..ca580b45d4 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -461,7 +461,7 @@ class DtbPlatdata(object):
         """
         struct_name, _ = get_compat_name(node)
         var_name = conv_name_to_c(node.name)
-        self.buf('static struct %s%s %s%s = {\n' %
+        self.buf('static const struct %s%s %s%s = {\n' %
                  (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name))
         for pname, prop in node.props.items():
             if pname in PROP_IGNORE_LIST or pname[0] == '#':
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] dtoc: make generated platdata structs const
  2019-01-07 19:29 [U-Boot] [PATCH] dtoc: make generated platdata structs const Simon Goldschmidt
@ 2019-01-10 12:56 ` Simon Glass
  2019-01-16  2:43 ` [U-Boot] " Tom Rini
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2019-01-10 12:56 UTC (permalink / raw)
  To: u-boot

On Mon, 7 Jan 2019 at 12:29, Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
> The platdata initialization structs are currently generated into .rwdata.
> Make sure the are put into .rodata by generating them as const.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
>
>  tools/dtoc/dtb_platdata.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] dtoc: make generated platdata structs const
  2019-01-07 19:29 [U-Boot] [PATCH] dtoc: make generated platdata structs const Simon Goldschmidt
  2019-01-10 12:56 ` Simon Glass
@ 2019-01-16  2:43 ` Tom Rini
  2019-01-16 10:01 ` [U-Boot] [PATCH] " Philipp Tomsich
  2019-01-20 20:23 ` Simon Glass
  3 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2019-01-16  2:43 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 07, 2019 at 08:29:26PM +0100, Simon Goldschmidt wrote:

> The platdata initialization structs are currently generated into .rwdata.
> Make sure the are put into .rodata by generating them as const.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190115/5171d3d6/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] dtoc: make generated platdata structs const
  2019-01-07 19:29 [U-Boot] [PATCH] dtoc: make generated platdata structs const Simon Goldschmidt
  2019-01-10 12:56 ` Simon Glass
  2019-01-16  2:43 ` [U-Boot] " Tom Rini
@ 2019-01-16 10:01 ` Philipp Tomsich
  2019-01-20 20:23 ` Simon Glass
  3 siblings, 0 replies; 6+ messages in thread
From: Philipp Tomsich @ 2019-01-16 10:01 UTC (permalink / raw)
  To: u-boot



> On 07.01.2019, at 20:29, Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> wrote:
> 
> The platdata initialization structs are currently generated into .rwdata.
> Make sure the are put into .rodata by generating them as const.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] dtoc: make generated platdata structs const
  2019-01-07 19:29 [U-Boot] [PATCH] dtoc: make generated platdata structs const Simon Goldschmidt
                   ` (2 preceding siblings ...)
  2019-01-16 10:01 ` [U-Boot] [PATCH] " Philipp Tomsich
@ 2019-01-20 20:23 ` Simon Glass
  2019-01-21  9:02   ` Simon Goldschmidt
  3 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2019-01-20 20:23 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Tue, 8 Jan 2019 at 08:29, Simon Goldschmidt
<simon.k.r.goldschmidt@gmail.com> wrote:
>
> The platdata initialization structs are currently generated into .rwdata.
> Make sure the are put into .rodata by generating them as const.
>
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

Unfortunately this breaks the dtoc and binman tests (make qcheck). Can
you please take a look?

Regards,
Simon

> ---
>
>  tools/dtoc/dtb_platdata.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
> index 6cb1259446..ca580b45d4 100644
> --- a/tools/dtoc/dtb_platdata.py
> +++ b/tools/dtoc/dtb_platdata.py
> @@ -461,7 +461,7 @@ class DtbPlatdata(object):
>          """
>          struct_name, _ = get_compat_name(node)
>          var_name = conv_name_to_c(node.name)
> -        self.buf('static struct %s%s %s%s = {\n' %
> +        self.buf('static const struct %s%s %s%s = {\n' %
>                   (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name))
>          for pname, prop in node.props.items():
>              if pname in PROP_IGNORE_LIST or pname[0] == '#':
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] dtoc: make generated platdata structs const
  2019-01-20 20:23 ` Simon Glass
@ 2019-01-21  9:02   ` Simon Goldschmidt
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Goldschmidt @ 2019-01-21  9:02 UTC (permalink / raw)
  To: u-boot

Hi Simon,

Am 20.01.2019 um 21:23 schrieb Simon Glass:
> Hi Simon,
> 
> On Tue, 8 Jan 2019 at 08:29, Simon Goldschmidt
> <simon.k.r.goldschmidt@gmail.com> wrote:
>>
>> The platdata initialization structs are currently generated into .rwdata.
>> Make sure the are put into .rodata by generating them as const.
>>
>> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> 
> Unfortunately this breaks the dtoc and binman tests (make qcheck). Can
> you please take a look?

Yes, sorry, I wasn't aware of that.

I'll fix the dtoc tests, but I don't get binman test failures, so I 
don't know what I should fix there...

Regards,
Simon

> 
> Regards,
> Simon
> 
>> ---
>>
>>   tools/dtoc/dtb_platdata.py | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
>> index 6cb1259446..ca580b45d4 100644
>> --- a/tools/dtoc/dtb_platdata.py
>> +++ b/tools/dtoc/dtb_platdata.py
>> @@ -461,7 +461,7 @@ class DtbPlatdata(object):
>>           """
>>           struct_name, _ = get_compat_name(node)
>>           var_name = conv_name_to_c(node.name)
>> -        self.buf('static struct %s%s %s%s = {\n' %
>> +        self.buf('static const struct %s%s %s%s = {\n' %
>>                    (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name))
>>           for pname, prop in node.props.items():
>>               if pname in PROP_IGNORE_LIST or pname[0] == '#':
>> --
>> 2.17.1
>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-21  9:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 19:29 [U-Boot] [PATCH] dtoc: make generated platdata structs const Simon Goldschmidt
2019-01-10 12:56 ` Simon Glass
2019-01-16  2:43 ` [U-Boot] " Tom Rini
2019-01-16 10:01 ` [U-Boot] [PATCH] " Philipp Tomsich
2019-01-20 20:23 ` Simon Glass
2019-01-21  9:02   ` Simon Goldschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.