Re: FOR COMMENT: void __iomem * and similar casts are Bad News

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

 



On Wednesday 03 September 2008, Russell King - ARM Linux wrote:
> On Wed, Sep 03, 2008 at 03:05:59PM -0700, David Brownell wrote:
> > According to Mr. Grep, there are at least 10 ARMs that work
> > like that [__arch_ioremap] in mainline.  Maybe Russell can
> > recommend one of them as a preferred model.
> 
> As I've been trying to say, I see this as a separate issue for the near
> future.  At the moment, I'm trying to concentrate on one aspect only.

OK ... if you think that's a "near future" thing, great!  I think
most bad usage in this area came from:

	- Intentional "performance hacks", achieving what can
	  better be done with an arch_ioremap and fixed mappings;

	- Recently introduced goofage;

	- Accidents/misunderstandings.

Those latter two will become much less common when GCC starts to
report errors which previously required a separate "sparse" run.


> That is, getting OMAP to the point that we're using the compiler to
> warn us when we do something silly, like passing a virtual address
> to a function which takes a physical address, and fixing the places
> which are currently wrong.

Yeah.  I did a pass like that over a lot of OMAP1 drivers a few years
back (before OMAP2/OMAP3); "sparse" was a big help.  If we're now ready
to have GCC tell us that stuff, that's a lot better.

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux