Re: [PATCH 02/34] sparc32: fix remaining sparse warnings in iommu.c + io-unit.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 07, 2014 at 12:42:20AM -0400, David Miller wrote:
> From: Sam Ravnborg <sam@xxxxxxxxxxxx>
> 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

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux