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]
Date:	Mon, 9 Mar 2015 18:55:03 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Joe Perches <joe@...ches.com>
Cc:	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux-Arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH v6 06/16] h8300: CPU depend helpers

On Mon, Mar 9, 2015 at 5:21 PM, Joe Perches <joe@...ches.com> wrote:
>>  arch/h8300/kernel/cpu/h83069/setup.c   | 202 ++++++++++++++++++++++++++
> []
>> diff --git a/arch/h8300/kernel/cpu/h83069/setup.c b/arch/h8300/kernel/cpu/h83069/setup.c
> []
>> +static struct resource sci0_resources[] = {
>> +     DEFINE_RES_MEM(0xffffb0, 8),
>> +     DEFINE_RES_IRQ(52),
>> +     DEFINE_RES_IRQ(53),
>> +     DEFINE_RES_IRQ(54),
>> +     DEFINE_RES_IRQ(55),
>> +}
>
> Perhaps most all of these might be const?
>
>> +static struct plat_sci_port sci0_platform_data = {
> []
>> +static struct resource sci1_resources[] = {
> []
>> +static struct plat_sci_port sci1_platform_data = {
> []
>> +static struct platform_device sci0_device = {
> []
>> +static struct platform_device sci1_device = {
> []
>> +static struct h8300_timer8_config tm8_unit0_platform_data = {
> []
>> +static struct resource tm8_unit0_resources[] = {
> []
>> +static struct platform_device timer8_unit0_device = {
> []
>> +static struct h8300_timer8_config tm8_unit1_platform_data = {
> []

Unfortunately not. device.platform_data and platform_device.resource are
not const pointers.

They can only be const (and __initdata) when the platform devices are
created using platform_device_register_resndata(), as that one copies the
data.

May still be a good idea to use that instead of static platform devices, though,
especially for multi-platform kernels (because the __initdata data is reclaimed
later).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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