From: David Laight <david.laight.linux@gmail.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-gpio@vger.kernel.org, Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH] gpio: realtek-otto: use unsigned long
Date: Wed, 17 Dec 2025 22:52:47 +0000 [thread overview]
Message-ID: <20251217225247.5873449e@pumpkin> (raw)
In-Reply-To: <20251217202331.9449-1-rosenp@gmail.com>
On Wed, 17 Dec 2025 12:23:31 -0800
Rosen Penev <rosenp@gmail.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@gmail.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);
next prev parent reply other threads:[~2025-12-17 22:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 20:23 [PATCH] gpio: realtek-otto: use unsigned long Rosen Penev
2025-12-17 22:52 ` David Laight [this message]
2025-12-17 22:55 ` Rosen Penev
2025-12-18 15:10 ` Bartosz Golaszewski
2025-12-18 15:30 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251217225247.5873449e@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rosenp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).