All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH] Removing nested functions, part one of lots
Date: Thu, 03 Jan 2013 20:32:50 +0100	[thread overview]
Message-ID: <50E5DCE2.6000608@gmail.com> (raw)
In-Reply-To: <20130101144204.GZ21216@riva.dynamic.greenend.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]

On 01.01.2013 15:42, Colin Watson wrote:

> I have a number of patches mostly ready to go, but I'd prefer to make
> sure that this general approach is agreed before preparing and sending
> more than one of them.  I'd like to work one *_iterate function at a
> time (except where multiple iterators are entangled in a stack such that
> we need to change several at once, as is the case in parts of the
> disk/filesystem stacks), as that's roughly the minimum sensible unit and
> it makes it reasonably easy to grep for missing changes.

There is also another approach of using iterators of the kind:

struct pci_iterator;
void pci_init (struct pci_iterator *pci);
int pci_iter (struct pci_iterator *pci);
#define FOR_PCI_DEVICE(x) for (pci_init (&x); pci_iter (&x);)

I have done it for PCI but seem to have bzr problem:
bzr: ERROR: Revision {phcoder@gmail.com-20110421142803-h6jncda1j0lf8msf}
not present in
"Graph(StackedParentsProvider(bzrlib.repository._LazyListJoin(([CachingParentsProvider(CallableToParentsProviderAdapter(<bound
method CHKInventoryRepository._get_parent_map_no_fallbacks of
CHKInventoryRepository('file:///home/phcoder/grub2/bzr/.bzr/repository/')>))],
[]))))".

Admittingly for disk/filesystems it's not viable and even for PCI it was
somewhat messy but may be viable in some cases like where we already
switch to FOR_* macros.

> 
> Please review.
> 
> Thanks,
> 
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel



-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  parent reply	other threads:[~2013-01-03 19:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-01 14:42 [PATCH] Removing nested functions, part one of lots Colin Watson
2013-01-01 18:31 ` Seth Goldberg
2013-01-01 19:28   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-01 21:14   ` Colin Watson
2013-01-01 21:21     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-01 21:37 ` Andrey Borzenkov
2013-01-01 22:24   ` richardvoigt
2013-01-02  0:07     ` Colin Watson
2013-01-02  0:05   ` Colin Watson
2013-01-02  2:02     ` Colin Watson
2013-01-03 17:21       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-01-03 19:32 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-01-09 20:58 ` Vladimir 'φ-coder/phcoder' Serbinenko

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=50E5DCE2.6000608@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.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 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.