Focusing on a single file at a time now, this particular revised patch adds missing function signature `coroutine_fn` to definitions in scsi/qemu-pr-helper.c Intend to do more files in a separate patch series once I get the full flow of this.
Compared to my previous e-mail, have also confirmed this edit passes checkpatch.pl The following functions are affected. do_sgio() do_pr_in() --> do_sgio() do_pr_out() --> do_sgio() mpath_reconstruct_sense() --> do_sgio() multipath_pr_out() --> mpath_reconstruct_sense() --> do_sgio() multipath_pr_in() --> mpath_reconstruct_sense() --> do_sgio() accept_client() --> prh_co_entry() >From 5bdef14027457d412972131dace76c3cabcc45a0 Mon Sep 17 00:00:00 2001 From: Cenne Dee <cennedee+qemu-de...@protonmail.com> Date: Fri, 30 Apr 2021 15:52:28 -0400 Subject: [PATCH] Add missing coroutine_fn function signature to some _co() functions Patch adds the signature for relevant functions ending with _co or those that use them. Signed-off-by: Cenne Dee <cennedee+qemu-de...@protonmail.com> --- scsi/qemu-pr-helper.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c index 7b9389b47b..7ed47c17c7 100644 --- a/scsi/qemu-pr-helper.c +++ b/scsi/qemu-pr-helper.c @@ -175,8 +175,8 @@ static int do_sgio_worker(void *opaque) return status; } -static int do_sgio(int fd, const uint8_t *cdb, uint8_t *sense, - uint8_t *buf, int *sz, int dir) +static int coroutine_fn do_sgio(int fd, const uint8_t *cdb, uint8_t *sense, + uint8_t *buf, int *sz, int dir) { ThreadPool *pool = aio_get_thread_pool(qemu_get_aio_context()); int r; @@ -318,7 +318,7 @@ static SCSISense mpath_generic_sense(int r) } } -static int mpath_reconstruct_sense(int fd, int r, uint8_t *sense) +static int coroutine_fn mpath_reconstruct_sense(int fd, int r, uint8_t *sense) { switch (r) { case MPATH_PR_SUCCESS: @@ -370,8 +370,8 @@ static int mpath_reconstruct_sense(int fd, int r, uint8_t *sense) } } -static int multipath_pr_in(int fd, const uint8_t *cdb, uint8_t *sense, - uint8_t *data, int sz) +static int coroutine_fn multipath_pr_in(int fd, const uint8_t *cdb, + uint8_t *sense, uint8_t *data, int sz) { int rq_servact = cdb[1]; struct prin_resp resp; @@ -425,8 +425,9 @@ static int multipath_pr_in(int fd, const uint8_t *cdb, uint8_t *sense, return mpath_reconstruct_sense(fd, r, sense); } -static int multipath_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, - const uint8_t *param, int sz) +static int coroutine_fn multipath_pr_out(int fd, const uint8_t *cdb, + uint8_t *sense, const uint8_t *param, + int sz) { int rq_servact = cdb[1]; int rq_scope = cdb[2] >> 4; @@ -543,8 +544,8 @@ static int multipath_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, } #endif -static int do_pr_in(int fd, const uint8_t *cdb, uint8_t *sense, - uint8_t *data, int *resp_sz) +static int coroutine_fn do_pr_in(int fd, const uint8_t *cdb, uint8_t *sense, + uint8_t *data, int *resp_sz) { #ifdef CONFIG_MPATH if (is_mpath(fd)) { @@ -561,8 +562,8 @@ static int do_pr_in(int fd, const uint8_t *cdb, uint8_t *sense, SG_DXFER_FROM_DEV); } -static int do_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, - const uint8_t *param, int sz) +static int coroutine_fn do_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, + const uint8_t *param, int sz) { int resp_sz; @@ -804,7 +805,8 @@ out: g_free(client); } -static gboolean accept_client(QIOChannel *ioc, GIOCondition cond, gpointer opaque) +static gboolean coroutine_fn accept_client(QIOChannel *ioc, GIOCondition cond, + gpointer opaque) { QIOChannelSocket *cioc; PRHelperClient *prh; -- 2.31.1