Re: [PATCH v3 03/10] serial: 8250: dw: Change the quirks type to unsigned int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Miquel,

On Tue, Mar 29, 2022 at 5:24 PM Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:
> Unsigned int is better than unsigned long as its size does not change
> between setups and we don't really need this variable to be more than a
> few bits wide for now.
>
> Suggested-by: Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -376,7 +376,7 @@ static bool dw8250_idma_filter(struct dma_chan *chan, void *param)
>  static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
>  {
>         struct device_node *np = p->dev->of_node;
> -       unsigned long quirks = (unsigned long)device_get_match_data(p->dev);
> +       unsigned int quirks = (unsigned int)device_get_match_data(p->dev);

"(uintptr_t)" (or "(unsigned long)" ;-), else you'll get a "cast from
pointer to integer of different size" warning on 64-bit builds.

>
>         if (np) {
>                 int id;

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux