From: Christoph Hellwig <hch@infradead.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Bjorn Helgaas <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Bjorn Helgaas <helgaas@kernel.org>
Subject: Re: [PATCH v2] PCI/VPD: Use unaligned access helpers in pci_vpd_read
Date: Wed, 12 May 2021 18:35:38 +0100 [thread overview]
Message-ID: <YJwR6ssFDkuUiklx@infradead.org> (raw)
In-Reply-To: <fa73ec3d-55d5-b430-39fc-fab7938b18bd@gmail.com>
On Wed, May 12, 2021 at 09:56:31AM +0200, Heiner Kallweit wrote:
> Which version is easier to read may be a question of personal taste.
> Using the unaligned access helper in pci_vpd_read() was asked for by
> Bjorn to complement a use of get_unaligned_le32() in pci_vpd_write().
> So I leave it up to him. Functionally it's the same anyway.
get_unaligned_le32 and friends are really nice helpers, but only when
they fit the use case. In this case the existing code is a fairly easy
to follow loop, while the "new" version is a mess by all counts.
prev parent reply other threads:[~2021-05-12 18:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 22:29 [PATCH v2] PCI/VPD: Use unaligned access helpers in pci_vpd_read Heiner Kallweit
2021-05-10 6:36 ` Christoph Hellwig
2021-05-10 7:09 ` Heiner Kallweit
2021-05-12 7:21 ` Christoph Hellwig
2021-05-12 7:56 ` Heiner Kallweit
2021-05-12 17:35 ` Christoph Hellwig [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=YJwR6ssFDkuUiklx@infradead.org \
--to=hch@infradead.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=linux-pci@vger.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