Re: [PATCH 1/3] s390/vfio_ccw: Add __must_hold() attribute to vfio_ccw_sch_quiesce()
Matthew Rosato <[email protected]>
| Newsgroups | org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
On 8/6/26 11:38 AM, Heiko Carstens wrote: > Add __must_hold() attribute to vfio_ccw_sch_quiesce() in order to let > clang's context analysis know that sch->lock must be held on function > entry. This can also be easily verified when inspecting the function. > > Without this annotation this leads to a valid warning when context > analysis is enabled: > > drivers/s390/cio/vfio_ccw_drv.c:55:9: warning: > expecting spinlock 'sch->lock' to be held at start of each loop [-Wthread-safety-analysis] > 55 | ret = cio_cancel_halt_clear(sch, &iretry); > | ^ > > Signed-off-by: Heiko Carstens <[email protected]> Reviewed-by: Matthew Rosato <[email protected]>