From: Gautam Gala <gg...@linux.ibm.com> Replace an existing macro (s390_pv_cmd_exit) that looks like a function with an actual function. The function will be used when exiting PV instead of the macro.
Reviewed-by: Steffen Eiden <sei...@linux.ibm.com> Reviewed-by: Janosch Frank <fran...@linux.ibm.com> Signed-off-by: Gautam Gala <gg...@linux.ibm.com> Reviewed-by: Thomas Huth <th...@redhat.com> Message-ID: <20250423080915.1048123-3-gg...@linux.ibm.com> Signed-off-by: Thomas Huth <th...@redhat.com> --- target/s390x/kvm/pv.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/target/s390x/kvm/pv.c b/target/s390x/kvm/pv.c index 1947a3d6692..30b64f7f22e 100644 --- a/target/s390x/kvm/pv.c +++ b/target/s390x/kvm/pv.c @@ -59,14 +59,12 @@ static int __s390_pv_cmd(uint32_t cmd, const char *cmdname, void *data, */ #define s390_pv_cmd(cmd, data) __s390_pv_cmd(cmd, #cmd, data, NULL) #define s390_pv_cmd_pvrc(cmd, data, pvrc) __s390_pv_cmd(cmd, #cmd, data, pvrc) -#define s390_pv_cmd_exit(cmd, data) \ -{ \ - int rc; \ - \ - rc = __s390_pv_cmd(cmd, #cmd, data, NULL); \ - if (rc) { \ - exit(1); \ - } \ + +static void s390_pv_cmd_exit(uint32_t cmd, void *data) +{ + if (s390_pv_cmd(cmd, data)) { + exit(1); + } } int s390_pv_query_info(void) -- 2.49.0