linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: Finn Thain <fthain@linux-m68k.org>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Jens Axboe <axboe@kernel.dk>,
	linux-ide@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pata_falcon: Add missing __iomem annotations
Date: Thu, 25 Nov 2021 08:33:30 +0100	[thread overview]
Message-ID: <CAMuHMdXfFtn9b_2d5BQdzeyMH_puKJ8tzQeLu-Cw4dxfovcb5w@mail.gmail.com> (raw)
In-Reply-To: <CAOmrzkJhXvN0gOU8fc5jNu3Q9LnT4dgCGdrznYbCbGXxq0dJpQ@mail.gmail.com>

Hi Michael,

On Wed, Nov 24, 2021 at 9:50 PM Michael Schmitz <schmitzmic@gmail.com> wrote:
> On Wed, Nov 24, 2021 at 8:51 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > --- a/drivers/ata/pata_falcon.c
> > > +++ b/drivers/ata/pata_falcon.c
> > > @@ -55,14 +55,14 @@ static unsigned int pata_falcon_data_xfer(struct ata_queued_cmd *qc,
> > >         /* Transfer multiple of 2 bytes */
> > >         if (rw == READ) {
> > >                 if (swap)
> > > -                       raw_insw_swapw((u16 *)data_addr, (u16 *)buf, words);
> > > +                       raw_insw_swapw((u16 __iomem *)data_addr, (u16 *)buf, words);
> > >                 else
> > > -                       raw_insw((u16 *)data_addr, (u16 *)buf, words);
> > > +                       raw_insw((u16 __iomem *)data_addr, (u16 *)buf, words);
> > >         } else {
> > >                 if (swap)
> > > -                       raw_outsw_swapw((u16 *)data_addr, (u16 *)buf, words);
> > > +                       raw_outsw_swapw((u16 __iomem *)data_addr, (u16 *)buf, words);
> > >                 else
> > > -                       raw_outsw((u16 *)data_addr, (u16 *)buf, words);
> > > +                       raw_outsw((u16 __iomem *)data_addr, (u16 *)buf, words);
> >
> > Can't you just drop the casts? data_addr is an __iomem void *.
>
> It's not u16 though, and the raw_ IO functions require that. But we
> could cast data_addr as __iomem u16 * (compile tested).

The raw_ IO functions do not require that: you can pass a void *
to a function that expects a different pointer type.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

  reply	other threads:[~2021-11-25  7:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24  4:25 [PATCH] pata_falcon: Add missing __iomem annotations Finn Thain
2021-11-24  4:52 ` Michael Schmitz
2021-11-25  1:09   ` Finn Thain
2021-11-24  7:51 ` Geert Uytterhoeven
2021-11-24 20:50   ` Michael Schmitz
2021-11-25  7:33     ` Geert Uytterhoeven [this message]
2021-11-25  1:06   ` Finn Thain
2021-11-25  7:39     ` Geert Uytterhoeven
2021-11-25 22:36       ` Finn Thain

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=CAMuHMdXfFtn9b_2d5BQdzeyMH_puKJ8tzQeLu-Cw4dxfovcb5w@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=axboe@kernel.dk \
    --cc=b.zolnierkie@samsung.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=fthain@linux-m68k.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schmitzmic@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).