From: Finn Thain <fthain@telegraphics.com.au>
To: Christoph Hellwig <hch@infradead.org>
Cc: Ondrej Zary <linux@rainbow-software.org>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/3] g_NCR5380: Merge g_NCR5380 and g_NCR5380_mmio
Date: Mon, 26 Sep 2016 10:37:13 +1000 (AEST) [thread overview]
Message-ID: <alpine.LNX.2.00.1609261034480.13676@nippy.intranet> (raw)
In-Reply-To: <20160925235542.GD7312@infradead.org>
On Sun, 25 Sep 2016, Christoph Hellwig wrote:
> On Sun, Sep 25, 2016 at 09:39:20PM +0200, Ondrej Zary wrote:
>
> > #define NCR5380_read(reg) \
> > + ioread8(((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
> > + ((struct NCR5380_hostdata *)shost_priv(instance))->offset + \
> > + (reg))
> > #define NCR5380_write(reg, value) \
> > - outb(value, instance->io_port + (reg))
> > + iowrite8(value, ((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
> > + ((struct NCR5380_hostdata *)shost_priv(instance))->offset + \
> > + (reg))
>
> Can we make these #defines point to inline helper functions that avoid
> the casting magic, e.g. something like
>
> static inline void g_NCR5380_write(struct Scsi_Host *instance, u32 reg,
> u8 value)
> {
> struct NCR5380_hostdata *host = shost_priv(instance);
>
> iowrite8(value, host->iomem, host->offset + reg);
> }
>
> #define NCR5380_write(reg, value)
> g_NCR5380_write(instance, reg, value)
Let's not do that yet. I have a patch series that fixes the type casting
and related issues that I will post soon. I expect that Ondrej's patches
will be ready before mine are, so I'll rebase mine on this work before I
ask him to test my patches.
--
next prev parent reply other threads:[~2016-09-26 0:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-24 18:59 [PATCH 0/3] g_NCR5380: Modernization Ondrej Zary
2016-09-24 18:59 ` [PATCH 1/3] g_NCR5380: Remove deprecated __setup Ondrej Zary
2016-09-25 23:45 ` Christoph Hellwig
2016-09-26 0:46 ` Finn Thain
2016-09-24 18:59 ` [PATCH 2/3] g_NCR5380: Reduce overrides[] from array to struct Ondrej Zary
2016-09-25 23:46 ` Christoph Hellwig
2016-09-26 3:56 ` Finn Thain
2016-09-24 18:59 ` [PATCH 3/3] g_NCR5380: Stop using scsi_module.c Ondrej Zary
2016-09-25 23:50 ` Christoph Hellwig
2016-09-26 3:29 ` Finn Thain
2016-09-27 12:55 ` Ondrej Zary
2016-09-28 0:06 ` Finn Thain
2016-09-25 19:39 ` [PATCH 4/3] g_NCR5380: Merge g_NCR5380 and g_NCR5380_mmio Ondrej Zary
2016-09-25 23:55 ` Christoph Hellwig
2016-09-26 0:37 ` Finn Thain [this message]
2016-09-26 0:49 ` Christoph Hellwig
2016-09-28 0:49 ` 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=alpine.LNX.2.00.1609261034480.13676@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@rainbow-software.org \
/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
all inboxes | Powered by JetHome®