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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJcf3UzbRMx-hEab@smile.fi.intel.com>
Date: Sat, 9 Aug 2025 13:15:57 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Bartosz Golaszewski <brgl@...ev.pl>,
	Linus Walleij <linus.walleij@...aro.org>,
	linux-gpio@...r.kernel.org, Daniel Mack <daniel@...que.org>,
	Haojian Zhuang <haojian.zhuang@...il.com>,
	Robert Jarzmik <robert.jarzmik@...e.fr>,
	Russell King <linux@...linux.org.uk>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Arnd Bergmann <arnd@...db.de>, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org
Subject: Re: [PATCH 19/21] usb: udc: pxa: remove unused platform_data

On Fri, Aug 08, 2025 at 05:18:04PM +0200, Arnd Bergmann wrote:
> 
> None of the remaining boards put useful data into the platform_data
> structures, so effectively this only works with DT based probing.
> 
> Remove all code that references this data, to stop using the legacy
> gpiolib interfaces. The pxa27x version already supports gpio
> descriptors, while the pxa25x version now does it the same way.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
See a comment below.

...

>  static int pxa_udc_probe(struct platform_device *pdev)
>  {
>  	struct pxa_udc *udc = &memory;
> -	int retval = 0, gpio;
> -	struct pxa2xx_udc_mach_info *mach = dev_get_platdata(&pdev->dev);
> -
> -	if (mach) {
> -		gpio = mach->gpio_pullup;
> -		if (gpio_is_valid(gpio)) {
> -			retval = devm_gpio_request_one(&pdev->dev, gpio,
> -						       GPIOF_OUT_INIT_LOW,
> -						       "USB D+ pullup");
> -			if (retval)
> -				return retval;
> -			udc->gpiod = gpio_to_desc(mach->gpio_pullup);
> -
> -			if (mach->gpio_pullup_inverted ^ gpiod_is_active_low(udc->gpiod))
> -				gpiod_toggle_active_low(udc->gpiod);
> -		}
> -		udc->udc_command = mach->udc_command;
> -	} else {
> -		udc->gpiod = devm_gpiod_get(&pdev->dev, NULL, GPIOD_ASIS);
> -	}
> +	int retval = 0;
> +
> +	udc->gpiod = devm_gpiod_get(&pdev->dev, NULL, GPIOD_ASIS);

Missed error check, in particular it will ignore deferred probe case.

>  	udc->regs = devm_platform_ioremap_resource(pdev, 0);

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ