diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2026-08-06 17:53:02 +0200 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2026-08-11 16:41:21 +0200 |
| commit | 707b802e5c910708ebf52ded0e41db1a2de5a601 (patch) | |
| tree | 95bd13b15b531c24d77c3860ac0f9301edd500b1 /drivers/s390 | |
| parent | 0de29a313ccc84b8d7ddd906aeda53b510e17cb2 (diff) | |
| download | linux-next-707b802e5c910708ebf52ded0e41db1a2de5a601.tar.gz linux-next-707b802e5c910708ebf52ded0e41db1a2de5a601.zip | |
s390/con3215: Add __must_hold() attribute to raw3215_make_room()
Add __must_hold() attribute to raw3215_make_room() in order to let
clang's context analysis know that "get_ccwdev_lock(raw->cdev)" 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/char/con3215.c:485:9: warning:
expecting spinlock 'raw->cdev->ccwlock' to be held at start of each loop [-Wthread-safety-analysis]
485 | while (RAW3215_BUFFER_SIZE - raw->count < length) {
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
| -rw-r--r-- | drivers/s390/char/con3215.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 46265f4fbfd8..57fefa8986d6 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -481,6 +481,7 @@ static unsigned int raw3215_drop(struct raw3215_info *raw) */ static unsigned int raw3215_make_room(struct raw3215_info *raw, unsigned int length, bool drop) + __must_hold(get_ccwdev_lock(raw->cdev)) { while (RAW3215_BUFFER_SIZE - raw->count < length) { if (drop) |
