From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org,
qemu-s390x@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Laurent Vivier" <laurent@vivier.eu>
Subject: [PATCH 01/16] linux-user/arm: Checkpatch style cleanups
Date: Fri, 10 Oct 2025 15:42:10 +0200 [thread overview]
Message-ID: <20251010134226.72221-2-philmd@linaro.org> (raw)
In-Reply-To: <20251010134226.72221-1-philmd@linaro.org>
Update style in a pair of methods we are going to modify in
the following commit. No functional change.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
linux-user/arm/nwfpe/fpa11_cpdt.c | 66 ++++++++++++++++---------------
1 file changed, 35 insertions(+), 31 deletions(-)
diff --git a/linux-user/arm/nwfpe/fpa11_cpdt.c b/linux-user/arm/nwfpe/fpa11_cpdt.c
index fee525937c5..6b0317883a7 100644
--- a/linux-user/arm/nwfpe/fpa11_cpdt.c
+++ b/linux-user/arm/nwfpe/fpa11_cpdt.c
@@ -40,18 +40,18 @@ void loadSingle(const unsigned int Fn, target_ulong addr)
static inline
void loadDouble(const unsigned int Fn, target_ulong addr)
{
- FPA11 *fpa11 = GET_FPA11();
- unsigned int *p;
- p = (unsigned int*)&fpa11->fpreg[Fn].fDouble;
- fpa11->fType[Fn] = typeDouble;
+ FPA11 *fpa11 = GET_FPA11();
+ unsigned int *p;
+ p = (unsigned int *)&fpa11->fpreg[Fn].fDouble;
+ fpa11->fType[Fn] = typeDouble;
#if HOST_BIG_ENDIAN
- /* FIXME - handle failure of get_user() */
- get_user_u32(p[0], addr); /* sign & exponent */
- get_user_u32(p[1], addr + 4);
+ /* FIXME - handle failure of get_user() */
+ get_user_u32(p[0], addr); /* sign & exponent */
+ get_user_u32(p[1], addr + 4);
#else
- /* FIXME - handle failure of get_user() */
- get_user_u32(p[0], addr + 4);
- get_user_u32(p[1], addr); /* sign & exponent */
+ /* FIXME - handle failure of get_user() */
+ get_user_u32(p[0], addr + 4);
+ get_user_u32(p[1], addr); /* sign & exponent */
#endif
}
@@ -108,16 +108,18 @@ void storeSingle(const unsigned int Fn, target_ulong addr)
{
FPA11 *fpa11 = GET_FPA11();
float32 val;
- register unsigned int *p = (unsigned int*)&val;
+ register unsigned int *p = (unsigned int *)&val;
switch (fpa11->fType[Fn])
{
case typeDouble:
- val = float64_to_float32(fpa11->fpreg[Fn].fDouble, &fpa11->fp_status);
+ val = float64_to_float32(fpa11->fpreg[Fn].fDouble,
+ &fpa11->fp_status);
break;
case typeExtended:
- val = floatx80_to_float32(fpa11->fpreg[Fn].fExtended, &fpa11->fp_status);
+ val = floatx80_to_float32(fpa11->fpreg[Fn].fExtended,
+ &fpa11->fp_status);
break;
default: val = fpa11->fpreg[Fn].fSingle;
@@ -130,29 +132,31 @@ void storeSingle(const unsigned int Fn, target_ulong addr)
static inline
void storeDouble(const unsigned int Fn, target_ulong addr)
{
- FPA11 *fpa11 = GET_FPA11();
- float64 val;
- register unsigned int *p = (unsigned int*)&val;
+ FPA11 *fpa11 = GET_FPA11();
+ float64 val;
+ register unsigned int *p = (unsigned int *)&val;
- switch (fpa11->fType[Fn])
- {
- case typeSingle:
- val = float32_to_float64(fpa11->fpreg[Fn].fSingle, &fpa11->fp_status);
- break;
+ switch (fpa11->fType[Fn]) {
+ case typeSingle:
+ val = float32_to_float64(fpa11->fpreg[Fn].fSingle,
+ &fpa11->fp_status);
+ break;
- case typeExtended:
- val = floatx80_to_float64(fpa11->fpreg[Fn].fExtended, &fpa11->fp_status);
- break;
+ case typeExtended:
+ val = floatx80_to_float64(fpa11->fpreg[Fn].fExtended,
+ &fpa11->fp_status);
+ break;
- default: val = fpa11->fpreg[Fn].fDouble;
- }
- /* FIXME - handle put_user() failures */
+ default:
+ val = fpa11->fpreg[Fn].fDouble;
+ }
+ /* FIXME - handle put_user() failures */
#if HOST_BIG_ENDIAN
- put_user_u32(p[0], addr); /* msw */
- put_user_u32(p[1], addr + 4); /* lsw */
+ put_user_u32(p[0], addr); /* msw */
+ put_user_u32(p[1], addr + 4); /* lsw */
#else
- put_user_u32(p[1], addr); /* msw */
- put_user_u32(p[0], addr + 4); /* lsw */
+ put_user_u32(p[1], addr); /* msw */
+ put_user_u32(p[0], addr + 4); /* lsw */
#endif
}
--
2.51.0
next prev parent reply other threads:[~2025-10-10 13:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 13:42 [PATCH 00/16] overall: Replace HOST_BIG_ENDIAN #ifdef with runtime if() check Philippe Mathieu-Daudé
2025-10-10 13:42 ` Philippe Mathieu-Daudé [this message]
2025-10-10 13:42 ` [PATCH 02/16] linux-user/arm: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 03/16] ui: " Philippe Mathieu-Daudé
2025-10-13 11:57 ` Marc-André Lureau
2025-10-10 13:42 ` [PATCH 04/16] net: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 05/16] disas: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 06/16] hw/core/loader: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 07/16] hw/display: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 08/16] hw/virtio: " Philippe Mathieu-Daudé
2025-10-10 19:23 ` Farhan Ali
2025-10-11 8:04 ` Lei Yang
2025-10-10 13:42 ` [PATCH 09/16] target/alpha: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 10/16] target/arm: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 11/16] target/mips: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 12/16] target/ppc: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 13/16] target/riscv: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 14/16] target/s390x: " Philippe Mathieu-Daudé
2025-10-10 13:56 ` David Hildenbrand
2025-10-10 13:42 ` [PATCH 15/16] target/sparc: " Philippe Mathieu-Daudé
2025-10-10 13:42 ` [PATCH 16/16] util/bitmap: " Philippe Mathieu-Daudé
2025-10-10 13:51 ` [PATCH 00/16] overall: " Paolo Bonzini
2025-10-10 14:37 ` Philippe Mathieu-Daudé
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=20251010134226.72221-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-s390x@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).