target/s390x: Introduce function when exiting PV

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 <seiden@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Gautam Gala <ggala@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250423080915.1048123-3-ggala@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Gautam Gala 2025-04-23 10:09:14 +02:00 committed by Thomas Huth
parent 2e6a9f03ba
commit e27cbd17dd

View file

@ -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(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_pvrc(cmd, data, pvrc) __s390_pv_cmd(cmd, #cmd, data, pvrc)
#define s390_pv_cmd_exit(cmd, data) \
{ \ static void s390_pv_cmd_exit(uint32_t cmd, void *data)
int rc; \ {
\ if (s390_pv_cmd(cmd, data)) {
rc = __s390_pv_cmd(cmd, #cmd, data, NULL); \ exit(1);
if (rc) { \ }
exit(1); \
} \
} }
int s390_pv_query_info(void) int s390_pv_query_info(void)