Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: 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 09:56:31 +0200	[thread overview]
Message-ID: <fa73ec3d-55d5-b430-39fc-fab7938b18bd@gmail.com> (raw)
In-Reply-To: <YJuCD9WCpV+rViys@infradead.org>

On 12.05.2021 09:21, Christoph Hellwig wrote:
> On Mon, May 10, 2021 at 09:09:02AM +0200, Heiner Kallweit wrote:
>> len can have any value 1 .. 4. Also the proposal doesn't consider
>> the skip value.
> 
> So what about just keeping the code as-is then?  The existing version
> is much easier to read than the new one, has less branching and doesn't
> use an obscure API thast should not generally be used in driver code.
> 
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.

  reply	other threads:[~2021-05-12  7:56 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 [this message]
2021-05-12 17:35         ` Christoph Hellwig

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=fa73ec3d-55d5-b430-39fc-fab7938b18bd@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=hch@infradead.org \
    --cc=helgaas@kernel.org \
    --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