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: <20251217225247.5873449e@pumpkin>
Date: Wed, 17 Dec 2025 22:52:47 +0000
From: David Laight <david.laight.linux@...il.com>
To: Rosen Penev <rosenp@...il.com>
Cc: linux-gpio@...r.kernel.org, Linus Walleij <linusw@...nel.org>, Bartosz
 Golaszewski <brgl@...nel.org>, linux-kernel@...r.kernel.org (open list)
Subject: Re: [PATCH] gpio: realtek-otto: use unsigned long

On Wed, 17 Dec 2025 12:23:31 -0800
Rosen Penev <rosenp@...il.com> wrote:

> Fixes compilation on 64-bit platforms as pointers need a larger type.

Not a good description...

> 
> Change device_get_match_data to of variant. The data is obtained through
> OF anyway.
> 
> Signed-off-by: Rosen Penev <rosenp@...il.com>
> ---
>  drivers/gpio/gpio-realtek-otto.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-realtek-otto.c b/drivers/gpio/gpio-realtek-otto.c
> index e6694d5d1696..e9c89b191989 100644
> --- a/drivers/gpio/gpio-realtek-otto.c
> +++ b/drivers/gpio/gpio-realtek-otto.c
> @@ -360,7 +360,7 @@ static int realtek_gpio_probe(struct platform_device *pdev)
>  	struct gpio_generic_chip_config config;
>  	struct device *dev = &pdev->dev;
>  	unsigned long gen_gc_flags;
> -	unsigned int dev_flags;
> +	unsigned long dev_flags;

You don't need to change the type of the variable, just the cast.

	David

>  	struct gpio_irq_chip *girq;
>  	struct realtek_gpio_ctrl *ctrl;
>  	struct resource *res;
> @@ -372,7 +372,7 @@ static int realtek_gpio_probe(struct platform_device *pdev)
>  	if (!ctrl)
>  		return -ENOMEM;
>  
> -	dev_flags = (unsigned int) device_get_match_data(dev);
> +	dev_flags = (unsigned long) of_device_get_match_data(dev);
>  
>  	ngpios = REALTEK_GPIO_MAX;
>  	of_property_read_u32(dev->of_node, "ngpios", &ngpios);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ