On 10/26/20 3:56 PM, Linus Torvalds wrote: > On Mon, Oct 26, 2020 at 1:48 PM Luc Van Oostenryck > <luc.vanoostenryck@xxxxxxxxx> wrote: >> >> On Mon, Oct 26, 2020 at 10:41:36AM -0700, Linus Torvalds wrote: >>> But can you point to the actual 5.10-rc1 problem? I haven't seen the >>> report, and afaik gcc will complain about this too ("label at end of >>> compound statement") so I'm surprised sparse hits it.. >> >> Well, I was surprised it wasn't caught and was ready to send a patch >> but it can only happen when using sparse, see below, quite ironic: >> drivers/scsi/qla2xxx/qla_tmpl.c:1052. >> 1050 } >> 1051 >> 1052 bailout: >> 1053 #ifndef __CHECKER__ >> 1054 if (!hardware_locked) >> 1055 spin_unlock_irqrestore(&vha->hw->hardware_lock, flags); >> 1056 #endif >> 1057 } > > Yeah, that "don't sparse this" pattern has been problematic before. > > I removed it. > > Bart, Arun - see commit 4525c8781ec0 ("scsi: qla2xxx: remove incorrect > sparse #ifdef"). Hi Linus, Thank you for having Cc-ed me. I agree that it's better to make the kernel code compliant with the C standard than to make sparse accept non-standard code. 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. BTW, personally I'm neither enthusiast about #ifndef __CHECKER__ / #endif nor about if (expression) <locking statement>. Bart.