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:	Tue, 21 Dec 2010 13:05:06 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Alexey Charkov <alchark@...il.com>,
	Ryan Mallon <ryan@...ewatersys.com>,
	Eric Miao <eric.y.miao@...il.com>,
	linux-kernel@...r.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@...gutronix.de>,
	vt8500-wm8505-linux-kernel@...glegroups.com,
	"Russell King - ARM Linux" <linux@....linux.org.uk>,
	Albin Tonnerre <albin.tonnerre@...e-electrons.com>
Subject: Re: [PATCH 1/6 v9] ARM: Add basic architecture support for VIA/WonderMedia 85xx SoC's

On Tuesday 21 December 2010 11:00:43 Alexey Charkov wrote:
> #define WMT_IRQ_RES(__irq) \
> {\
>         .flags = IORESOURCE_IRQ,\
>         .start = __irq,\
>         .end = __irq,\
> }
> 
> void __init wmt_set_resources(void)
> {
>      resources_lcdc[0] = WMT_MMIO_RES(wmt_current_regs->lcdc, SZ_1K);
>      resources_lcdc[1] = WMT_IRQ_RES(wmt_current_irqs->lcdc);
> ...
> }
> 
> Then there will be no half-empty initializations scattered around
> separate from the other assignments (which is probably the worst thing
> in current configuration).

If you use platform_device_add_resources() to add the resource
at a later point, or platform_device_register_simple, you don't
even need to statically allocate the resource structure, which may
also make this simpler because you can keep all the data structures
local to the function filling them out.

	Arnd
--
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