public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: willy@infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: alternative to xa_for_each?
Date: Wed, 1 Jul 2020 07:02:39 +0100	[thread overview]
Message-ID: <20200701060239.GA27121@infradead.org> (raw)

Hi Matthew,

I'm just reviewing a patch adding an xarray user, and I'm wondering
if we could just replace xa_for_each with a loop on
xa_find_after with a magic index to start from the beginning?  That
would always seem like more readable code than the magic looping macro.

And while we're at it:  is there an idiomatic way to get the entry with
the highest index?

             reply	other threads:[~2020-07-01  6:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  6:02 Christoph Hellwig [this message]
2020-07-01 14:37 ` alternative to xa_for_each? Matthew Wilcox

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=20200701060239.GA27121@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.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