Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1370667 > unrolled thread

Re: [PATCH 6/6] iommu/arm-smmu: Make use of phandle iterators in device-tree parsing

Started byJoerg Roedel <jroedel@suse.de>
First post2016-04-04 16:30 +0200
Last post2016-04-04 16:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 6/6] iommu/arm-smmu: Make use of phandle iterators in  device-tree parsing Joerg Roedel <jroedel@suse.de> - 2016-04-04 16:30 +0200

#1370667 — Re: [PATCH 6/6] iommu/arm-smmu: Make use of phandle iterators in device-tree parsing

FromJoerg Roedel <jroedel@suse.de>
Date2016-04-04 16:30 +0200
SubjectRe: [PATCH 6/6] iommu/arm-smmu: Make use of phandle iterators in device-tree parsing
Message-ID<rkdFU-4hl-19@gated-at.bofh.it>
Hi Will,

On Tue, Mar 29, 2016 at 06:22:16PM +0100, Will Deacon wrote:
> > +
> > +	if (i == 0)
> > +		goto out_put_masters;
> 
> I'm confused by this hunk. If i == 0, then we shouldn't have registered
> any masters and therefore out_put_masters won't have anything to do.

The idea was that there is nothing more to do in the function when it
didn't find any masters and so it can safely skip the rest of the
function.

But the original code doesn't do this either, so it certainly doesn't
belong into this patch. I remove it for the next post.

> In fact, I'm not completely clear on how the of_node refcounting interacts
> with your iterators. Does the iterator put the node after you call the
> "next" function, or does it increment each thing exactly once?

The iterator will put the current node at the following _next call, so
when you want to use each node, you need your own reference.

It works like the pci_dev iterators, so if you break out of the loop you
have to manually put the last node it returned.


	Joerg

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web