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]
Message-Id: <201211071416.08012.arnd@arndb.de>
Date:	Wed, 7 Nov 2012 14:16:07 +0000
From:	Arnd Bergmann <arnd@...db.de>
To:	Vineet Gupta <Vineet.Gupta1@...opsys.com>
Cc:	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	tglx@...utronix.de
Subject: Re: [RFC PATCH v1 25/31] ARC: [plat-arcfpga] Hooking up platform to ARC UART

On Wednesday 07 November 2012, Vineet Gupta wrote:
> +static struct platform_device arc_uart##n##_dev = {    \
> +       .name = "arc-uart",                             \
> +       .id = n,                                        \
> +       .num_resources = ARRAY_SIZE(arc_uart##n##_res), \
> +       .resource = arc_uart##n##_res,                  \
> +       .dev = {                                        \
> +               .platform_data = &arc_uart_info,        \
> +       },                                              \
> +}
> +
> +ARC_UART_DEV(0);
> +#if CONFIG_SERIAL_ARC_NR_PORTS > 1
> +ARC_UART_DEV(1);
> +#endif
> +
> +static struct platform_device *fpga_early_devs[] __initdata = {
> +#if defined(CONFIG_SERIAL_ARC_CONSOLE)
> +       &arc_uart0_dev,
> +#endif
> +};

statically defining platform devices like this is considered very
bad style, especially since it prevents you from doing proper
boot-time configuration. Please get the available devices from
the boot loader. Normally this is done using a flattened device
tree blob that gets passed, unless you can probe the hardware
directly.

	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