The proposed API change serves to avoid the worse-than-butt-ugly:
foo = regs->bar;
which on the evidence of the current kernel source is in fact a real problem.
One could imagine a pointer-type-modifier in C that says "this
pointer can't be dereferenced, but pointer arithmetic is OK, and any
derived pointers inherit the property", with syntax similar to
volatile, or some kind of C++ dereference overloading, but absent
that, a correct API offsets the marginal burden of having to cast in
order to treat non-pointers as pointers.
As Abramo points out, if you can't abide the above cast, you can
create a relatively trivial macro to hide the dirty work.
-- /Jonathan Lundell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/