[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v2 08/10] Fix some bad coroutine_fn indirect calls and pointer assi
From: |
Alberto Faria |
Subject: |
[RFC v2 08/10] Fix some bad coroutine_fn indirect calls and pointer assignments |
Date: |
Fri, 29 Jul 2022 14:00:37 +0100 |
These problems were found by static-analyzer.py.
Not all occurrences of these problems were fixed.
Signed-off-by: Alberto Faria <afaria@redhat.com>
---
block/backup.c | 2 +-
include/block/block_int-common.h | 12 +++++-------
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index b2b649e305..6a9ad97a53 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -309,7 +309,7 @@ static void coroutine_fn backup_pause(Job *job)
}
}
-static void coroutine_fn backup_set_speed(BlockJob *job, int64_t speed)
+static void backup_set_speed(BlockJob *job, int64_t speed)
{
BackupBlockJob *s = container_of(job, BackupBlockJob, common);
diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
index 8947abab76..16c45d1262 100644
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h
@@ -731,13 +731,11 @@ struct BlockDriver {
void coroutine_fn (*bdrv_co_drain_end)(BlockDriverState *bs);
bool (*bdrv_supports_persistent_dirty_bitmap)(BlockDriverState *bs);
- bool (*bdrv_co_can_store_new_dirty_bitmap)(BlockDriverState *bs,
- const char *name,
- uint32_t granularity,
- Error **errp);
- int (*bdrv_co_remove_persistent_dirty_bitmap)(BlockDriverState *bs,
- const char *name,
- Error **errp);
+ bool coroutine_fn (*bdrv_co_can_store_new_dirty_bitmap)(
+ BlockDriverState *bs, const char *name, uint32_t granularity,
+ Error **errp);
+ int coroutine_fn (*bdrv_co_remove_persistent_dirty_bitmap)(
+ BlockDriverState *bs, const char *name, Error **errp);
};
static inline bool block_driver_can_compress(BlockDriver *drv)
--
2.37.1
- [RFC v2 00/10] Introduce an extensible static analyzer, Alberto Faria, 2022/07/29
- [RFC v2 01/10] Add an extensible static analyzer, Alberto Faria, 2022/07/29
- [RFC v2 02/10] Drop unused static function return values, Alberto Faria, 2022/07/29
- [RFC v2 03/10] static-analyzer: Support adding tests to checks, Alberto Faria, 2022/07/29
- [RFC v2 05/10] static-analyzer: Enforce coroutine_fn restrictions for direct calls, Alberto Faria, 2022/07/29
- [RFC v2 06/10] Fix some direct calls from non-coroutine_fn to coroutine_fn, Alberto Faria, 2022/07/29
- [RFC v2 04/10] static-analyzer: Avoid reanalyzing unmodified translation units, Alberto Faria, 2022/07/29
- [RFC v2 07/10] static-analyzer: Enforce coroutine_fn restrictions on function pointers, Alberto Faria, 2022/07/29
- [RFC v2 08/10] Fix some bad coroutine_fn indirect calls and pointer assignments,
Alberto Faria <=
- [RFC v2 09/10] block: Add no_coroutine_fn marker, Alberto Faria, 2022/07/29
- [RFC v2 10/10] Fix some calls from coroutine_fn to no_coroutine_fn, Alberto Faria, 2022/07/29