On Mon, Oct 26, 2020 at 4:22 PM Bart Van Assche <bvanassche@xxxxxxx> wrote: > > The #ifndef __CHECKER__ / #endif that I added in 2015 in the above code > (commit 8d16366b5f23) was added because at that time I didn't see a > better solution. I think there are only a couple of callers, and all of them just have a constant "device_locked" argument. It should be easy to make the (I think single) use that _didn't_ lock the device just do the locking, and then all of them have "device_locked = 1", and then that argument can be removed and the whole conditional be replaced by a lockdep assert. Exactly like y9ou did in 8ae178760b23 ("scsi: qla2xxx: Simplify the functions for dumping firmware") in other words. But I didn't really look _that_ much into it, this is just from a simple "grep" thing and maybe I missed something. I just did the minimal "don't do invalid C" thing. Linus