All of lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 1/2] nvme: remove spurious use of *_to_cpup helpers
Date: Wed, 19 Aug 2015 10:16:04 +0200	[thread overview]
Message-ID: <20150819081604.GA18215@lst.de> (raw)
In-Reply-To: <55D370B2.9060006@fb.com>

On Tue, Aug 18, 2015@11:51:46AM -0600, Jens Axboe wrote:
> All those nvme equipped sparc and s390's? :-)

I'm pretty sure there are some power systems that have them.

> Joke aside, do we really have that 'load-reversed-endian' addition to the 
> endianness conversion API just because of two rather esoteric platforms? 
> Seems silly.

As mentioned before BE platforms don't need it, compilers have handled
it fine every since the invention of peephole optimization in the 60s.

The cpup helpers are more useful if you iterate over an array of
descriptors:

fs/nfs/blocklayout/dev.c:       b->type = be32_to_cpup(p++);
fs/nfs/blocklayout/dev.c:               b->simple.nr_sigs = be32_to_cpup(p++);
fs/nfs/blocklayout/dev.c:                       b->simple.sigs[i].sig_len = be32_to_cpup(p++);
fs/nfs/blocklayout/dev.c:               b->slice.volume = be32_to_cpup(p++);
fs/nfs/blocklayout/dev.c:               b->concat.volumes_count = be32_to_cpup(p++);
fs/nfs/blocklayout/dev.c:                       b->concat.volumes[i] = be32_to_cpup(p++);
fs/nfs/blocklayout/dev.c:               b->stripe.volumes_count = be32_to_cpup(p++);
fs/nfs/blocklayout/dev.c:                       b->stripe.volumes[i] = be32_to_cpup(p++);

XDR decoding is full of them for example.

  reply	other threads:[~2015-08-19  8:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17 19:09 two minor nvme endianess patches Christoph Hellwig
2015-08-17 19:09 ` [PATCH 1/2] nvme: remove spurious use of *_to_cpup helpers Christoph Hellwig
2015-08-17 20:12   ` Matthew Wilcox
2015-08-18  5:51     ` Christoph Hellwig
2015-08-18 17:51     ` Jens Axboe
2015-08-19  8:16       ` Christoph Hellwig [this message]
2015-08-17 19:09 ` [PATCH 2/2] nvme.h: add missing endianess annotations 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=20150819081604.GA18215@lst.de \
    --to=hch@lst.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.