From: shiliyang <shiliyang@huawei.com>
To: <qemu-devel@nongnu.org>, <peter.maydell@linaro.org>
Cc: alex.chen@huawei.com, hunongda@huawei.com
Subject: [PATCH V3 2/4] bsd-user: suspect code indent for conditional statements
Date: Wed, 13 Jan 2021 17:32:03 +0800 [thread overview]
Message-ID: <db8990fc-f702-bd2e-93cb-8c96587535d1@huawei.com> (raw)
In-Reply-To: <b820b729-88a8-1103-b7a7-b66b637947d9@huawei.com>
This patch fixes error style problems found by checkpatch.pl:
ERROR: suspect code indent for conditional statements
Signed-off-by: Liyang Shi <shiliyang@huawei.com>
---
bsd-user/elfload.c | 10 +++++-----
bsd-user/syscall.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index 35c340f13a..a121e71339 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -184,7 +184,7 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
memset(regs, 0, sizeof(*regs));
regs->ARM_cpsr = 0x10;
if (infop->entry & 1)
- regs->ARM_cpsr |= CPSR_T;
+ regs->ARM_cpsr |= CPSR_T;
regs->ARM_pc = infop->entry & 0xfffffffe;
regs->ARM_sp = infop->start_stack;
/* FIXME - what to for failure of get_user()? */
@@ -784,7 +784,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
sp = sp &~ (abi_ulong)15;
size = (DLINFO_ITEMS + 1) * 2;
if (k_platform)
- size += 2;
+ size += 2;
#ifdef DLINFO_ARCH_ITEMS
size += DLINFO_ARCH_ITEMS * 2;
#endif
@@ -871,7 +871,7 @@ static abi_ulong load_elf_interp(struct elfhdr *interp_elf_ex,
malloc(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum);
if (!elf_phdata)
- return ~((abi_ulong)0UL);
+ return ~((abi_ulong)0UL);
/*
* If the size of this structure has changed, then punt, since
@@ -1267,7 +1267,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
if (strcmp(elf_interpreter,"/usr/lib/libc.so.1") == 0 ||
strcmp(elf_interpreter,"/usr/lib/ld.so.1") == 0) {
- ibcs2_interpreter = 1;
+ ibcs2_interpreter = 1;
}
#if 0
@@ -1314,7 +1314,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs,
/* Now figure out which format our binary is */
if ((N_MAGIC(interp_ex) != OMAGIC) && (N_MAGIC(interp_ex) != ZMAGIC) &&
(N_MAGIC(interp_ex) != QMAGIC)) {
- interpreter_type = INTERPRETER_ELF;
+ interpreter_type = INTERPRETER_ELF;
}
if (interp_elf_ex.e_ident[0] != 0x7f ||
diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
index d38ec7a162..9b471b665c 100644
--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -241,7 +241,7 @@ static abi_long do_freebsd_sysctl(abi_ulong namep, int32_t namelen, abi_ulong ol
return -TARGET_EFAULT;
holdlen = oldlen;
for (p = hnamep, q = snamep, i = 0; i < namelen; p++, i++)
- *q++ = tswap32(*p);
+ *q++ = tswap32(*p);
oidfmt(snamep, namelen, NULL, &kind);
/* XXX swap hnewp */
ret = get_errno(sysctl(snamep, namelen, holdp, &holdlen, hnewp, newlen));
--
2.29.1.59.gf9b6481aed
next prev parent reply other threads:[~2021-01-13 9:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 9:30 [PATCH V3 0/4] bsd-user: Fix some code style problems shiliyang
2021-01-13 9:31 ` [PATCH V3 1/4] bsd-user: "foo * bar" should be "foo *bar" shiliyang
2021-01-13 9:32 ` shiliyang [this message]
2021-01-13 9:32 ` [PATCH V3 3/4] bsd-user: space required after semicolon shiliyang
2021-01-13 9:33 ` [PATCH V3 4/4] bsd-user: do not use C99 // comments shiliyang
2021-01-13 22:03 ` [PATCH V3 0/4] bsd-user: Fix some code style problems Warner Losh
2021-01-14 6:42 ` shiliyang
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=db8990fc-f702-bd2e-93cb-8c96587535d1@huawei.com \
--to=shiliyang@huawei.com \
--cc=alex.chen@huawei.com \
--cc=hunongda@huawei.com \
--cc=peter.maydell@linaro.org \
--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).