Re: [PATCH v2 2/3] ata: pata_falcon: add data_swab option to byte-swap disk data

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

 



On Fri, 18 Aug 2023, Geert Uytterhoeven wrote:

> On Fri, Aug 18, 2023 at 9:43 AM Finn Thain <fthain@xxxxxxxxxxxxxx> wrote:
> > On Fri, 18 Aug 2023, Michael Schmitz wrote:

> > > --- a/drivers/ata/pata_falcon.c
> > > +++ b/drivers/ata/pata_falcon.c
> > > @@ -199,6 +205,8 @@ static int __init pata_falcon_init_one(struct platform_device *pdev)
> > >       ap->ioaddr.altstatus_addr       = ctl_base + io_offset;
> > >       ap->ioaddr.ctl_addr             = ctl_base + io_offset;
> > >
> > > +     ap->private_data = (void *)(uintptr_t)(pata_falcon_swap_mask >> (2 * pdev->id));
> > > +
> >
> > My compiler doesn't need that extra type cast in there...
> 
> Because it's a 32-bit compiler ;-)
> With a 64-bit compiler, you would get
> 
>     warning: cast to pointer from integer of different size
> [-Wint-to-pointer-cast]
> 
> Alternatively, you can change pata_falcon_swap_mask from int to long.
> 

I see. Thanks for clarifying that for me.

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux