[RFC] staging:dgap: sparse errors/warnings
dan.carpenter at oracle.com
Thu Mar 27 23:52:30 UTC 2014
On Thu, Mar 27, 2014 at 09:22:36AM -0400, Mark Hounschell wrote:
> checkpatch now gives 0 warnings or errors on both dgap.c and dgap.h
> so I'm now looking at sparse errors/warnings. There are many and I'm
> not really clear as to the best way to address them. This is my first
> exposure to sparse. A quick internet search reveals that using "__iomem"
> in some way is the proper fix for most of what I see?
Looks fine. You understand the point, right? __iomem is hardware
addresses. Kernel memory, hardware memory and user memory are mapped in
different places. You can't dereference an iomem pointer or even a user
pointer. They have special functions so you can write to them. A
common source of bugs is forgetting which is which.
The sparse annotations are compiled out while __CHECKER__ isn't defined.
More information about the devel