From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: lvivier@redhat.com
Subject: [PATCH] thunk: do not use HOST_* defines
Date: Thu, 16 Dec 2021 11:05:27 +0100 [thread overview]
Message-ID: <20211216100527.103021-1-pbonzini@redhat.com> (raw)
Just use sizeof, avoiding the need to write down all the ABIs twice.
Cc: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/exec/user/thunk.h | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h
index 300a840d58..c50ba17317 100644
--- a/include/exec/user/thunk.h
+++ b/include/exec/user/thunk.h
@@ -22,6 +22,7 @@
#include "cpu.h"
#include "exec/user/abitypes.h"
+#include <asm/posix_types.h>
/* types enums definitions */
@@ -109,16 +110,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host)
break;
case TYPE_OLDDEVT:
if (is_host) {
-#if defined(HOST_X86_64)
- return 8;
-#elif defined(HOST_ALPHA) || defined(HOST_IA64) || defined(HOST_MIPS) || \
- defined(HOST_PARISC) || defined(HOST_SPARC64)
- return 4;
-#elif defined(HOST_PPC)
- return sizeof(void *);
-#else
- return 2;
-#endif
+ return sizeof(__kernel_old_dev_t);
} else {
#if defined(TARGET_X86_64)
return 8;
--
2.33.1
next reply other threads:[~2021-12-16 10:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 10:05 Paolo Bonzini [this message]
2021-12-17 9:13 ` [PATCH] thunk: do not use HOST_* defines Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211216100527.103021-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=lvivier@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).