From: <Kelvin.Cao@microchip.com>
To: <hch@infradead.org>
Cc: <dmaengine@vger.kernel.org>, <vkoul@kernel.org>,
<George.Ge@microchip.com>, <linux-kernel@vger.kernel.org>,
<logang@deltatee.com>, <tglx@linutronix.de>,
<christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH v4 1/1] dmaengine: switchtec-dma: Introduce Switchtec DMA engine PCI driver
Date: Tue, 16 May 2023 05:20:36 +0000 [thread overview]
Message-ID: <ad8da5472b9e62dc4ca695c9cb58d2c735ce1594.camel@microchip.com> (raw)
In-Reply-To: <ZGMOCBAVvAxMa/lb@infradead.org>
On Mon, 2023-05-15 at 22:00 -0700, Christoph Hellwig wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> On Mon, May 15, 2023 at 06:18:07PM +0000,
> Kelvin.Cao@microchip.com wrote:
> > > I find this rather confusing, especially as some code literally
> > > switches on the op to fill in either set.
> >
> > It's a hardware interface, and not possible to change it at the
> > point.
> > I guess I can make it look slightly better by grouping the related
> > names together:
> >
> > union {
> > struct {
> > __le32 saddr_lo;
> > __le32 saddr_hi;
> > };
> > struct {
> > __le32 widata_lo;
> > __le32 widata_hi;
> > };
> > };
>
> The hardware interface is simply:
>
> __le32 field_lo;
> __le32 field_hi;
>
> hardware documentation might decide to give those fields two
> different
> names just to confuse you :)
>
> I think everyone else would be served better by:
>
> __le32 addr_lo; /* SADDR_LO/WIADDR_LO */
> __le32 addr_hi; /* SADDR_HI/WIADDR_HI */
>
It's simple and clean, thanks!
Kelvin
prev parent reply other threads:[~2023-05-16 5:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-23 21:37 [PATCH v4 0/1] Switchtec Switch DMA Engine Driver Kelvin Cao
2023-04-23 21:37 ` [PATCH v4 1/1] dmaengine: switchtec-dma: Introduce Switchtec DMA engine PCI driver Kelvin Cao
2023-04-24 1:36 ` kernel test robot
2023-05-03 6:31 ` Christoph Hellwig
2023-05-05 0:31 ` Kelvin.Cao
2023-05-15 15:13 ` Christoph Hellwig
2023-05-15 18:18 ` Kelvin.Cao
2023-05-16 5:00 ` Christoph Hellwig
2023-05-16 5:20 ` Kelvin.Cao [this message]
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=ad8da5472b9e62dc4ca695c9cb58d2c735ce1594.camel@microchip.com \
--to=kelvin.cao@microchip.com \
--cc=George.Ge@microchip.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dmaengine@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=tglx@linutronix.de \
--cc=vkoul@kernel.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®