How about making spin_lock_irqsave actually take a pointer to flags?
(Which would be the logical choice if it were a function and not a
macro...) That would flag up all violations ("without cast to different
pointer" or so) while usually not breaking compilation.
Of course, irq_flags_t is probably the best long-term solution if one
wants to hide a struct. (Even then perhaps, use a pointer instead?)
-