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: Thu, 07 Mar 2024 17:30:10 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-spi@...r.kernel.org
Cc: "Daniel Mack" <daniel@...que.org>,
 "Haojian Zhuang" <haojian.zhuang@...il.com>,
 "Robert Jarzmik" <robert.jarzmik@...e.fr>,
 "Russell King" <linux@...linux.org.uk>, "Mark Brown" <broonie@...nel.org>
Subject: Re: [PATCH v1 1/2] spi: pxa2xx: Kill pxa2xx_set_spi_info()

On Thu, Mar 7, 2024, at 17:07, Andy Shevchenko wrote:
> There is the only one user of the pxa2xx_set_spi_info(). Unexport it
> and inline to the actual user.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

I have no idea why you care about this, but it's a nice cleanup,
so I'm happy to see this get merged through the spi tree if
that helps. Let me know if I should take it through the soc
tree instead.

> -/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1 */

This comment might still be useful.

> @@ -592,7 +595,15 @@ static void __init spitz_spi_init(void)
> 
>  	gpiod_add_lookup_table(&spitz_ads7846_gpio_table);
>  	gpiod_add_lookup_table(&spitz_spi_gpio_table);
> -	pxa2xx_set_spi_info(2, &spitz_spi_info);
> +
> +	pd = platform_device_alloc("pxa2xx-spi", id);
> +	if (pd == NULL) {
> +		pr_err("pxa2xx-spi: failed to allocate device id %d\n", id);
> +	} else {
> +		pd->dev.platform_data = info;
> +		platform_device_add(pd);
> +	}
> +
>  	spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));

I think the normal interface these days would be
platform_device_register_data(), which does it all in one step.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ