From: Sam Ravnborg <sam@ravnborg.org>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH 02/34] sparc32: fix remaining sparse warnings in iommu.c + io-unit.c
Date: Wed, 07 May 2014 05:20:44 +0000 [thread overview]
Message-ID: <20140507052044.GA17994@ravnborg.org> (raw)
In-Reply-To: <1399157559-19901-2-git-send-email-sam@ravnborg.org>
On Wed, May 07, 2014 at 12:42:20AM -0400, David Miller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Sun, 4 May 2014 00:52:07 +0200
>
> > + control = sbus_readl(&iommu->regs->control);
> > + impl = (control & IOMMU_CTRL_IMPL) >> 28;
> > + vers = (control & IOMMU_CTRL_VERS) >> 24;
> > + control &= ~(IOMMU_CTRL_RNGE);
> > + control |= (IOMMU_RNGE_256MB | IOMMU_CTRL_ENAB);
> > + sbus_writel(control, iommu->regs);
>
> The register address in the sbus_writel() is wrong, it should
> be "&iommu->regs->control" not "iommu->regs".
Very good spot.
This I should have found myself :-(
>
> Please audit your entire patch set of bugs of this nature, going from
> raw pointer derefs to I/O accessors is an extremely error prone
> transformation unless done with something automated like a semantic
> patching tool.
I will do so.
Sam
prev parent reply other threads:[~2014-05-07 5:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-03 22:52 [PATCH 02/34] sparc32: fix remaining sparse warnings in iommu.c + io-unit.c Sam Ravnborg
2014-05-07 4:42 ` David Miller
2014-05-07 5:20 ` Sam Ravnborg [this message]
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=20140507052044.GA17994@ravnborg.org \
--to=sam@ravnborg.org \
--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.