From: Christoph Hellwig <hch@lst.de>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH 2/2] sparc/iommu: fix ->map_sg return value
Date: Wed, 19 Dec 2018 16:30:12 +0000 [thread overview]
Message-ID: <20181219163012.GA25383@lst.de> (raw)
In-Reply-To: <20181216095755.10503-3-hch@lst.de>
On Wed, Dec 19, 2018 at 05:28:25PM +0100, Sam Ravnborg wrote:
> > + struct scatterlist *sg;
> > + int j, n;
> Nit - in the other use of for_each_sg() you used "i" as the variable named.
> It confused me a little to see "j".
I think this was a copy and paste from the one function where i was
already taken. I can remove it here.
> sg-lenght and sg->offsett are both unsigned int.
> So n should looking at this piece of code be unsigned int.
> But then iommu_get_one() takes an int as argument.
> So the real issue seems to be that iommu_get_one() should
> have npages be an unsigned int. And your code is fine.
>
> If you had named n for npages it would have been a little more readable.
Well, n isn't really new here but from the existing code. I see
plenty of potential for the usual cleanups in that code..
next prev parent reply other threads:[~2018-12-19 16:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-16 9:57 [PATCH 2/2] sparc/iommu: fix ->map_sg return value Christoph Hellwig
2018-12-19 16:28 ` Sam Ravnborg
2018-12-19 16:30 ` Christoph Hellwig [this message]
2018-12-19 17:01 ` Sam Ravnborg
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=20181219163012.GA25383@lst.de \
--to=hch@lst.de \
--cc=sparclinux@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 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.