From patchwork Wed Jan 13 09:31:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shiliyang X-Patchwork-Id: 1425726 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DG2SX6PvKz9sVp for ; Wed, 13 Jan 2021 20:38:36 +1100 (AEDT) Received: from localhost ([::1]:37528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzcbq-0004cX-QT for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2021 04:38:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzcUs-0005xx-E6 for qemu-devel@nongnu.org; Wed, 13 Jan 2021 04:31:22 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzcUp-0002ye-Su for qemu-devel@nongnu.org; Wed, 13 Jan 2021 04:31:22 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DG2GZ0c2Fzl4XT; Wed, 13 Jan 2021 17:29:58 +0800 (CST) Received: from [10.108.235.13] (10.108.235.13) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Wed, 13 Jan 2021 17:31:08 +0800 Subject: [PATCH V3 1/4] bsd-user: "foo * bar" should be "foo *bar" References: To: , From: shiliyang Message-ID: <5a05a173-2c54-155f-f34d-3a5758c1c4d5@huawei.com> Date: Wed, 13 Jan 2021 17:31:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.108.235.13] X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.190; envelope-from=shiliyang@huawei.com; helo=szxga04-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.chen@huawei.com, hunongda@huawei.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patch fixes error style problems found by checkpatch.pl: ERROR: "foo ** bar" should be "foo **bar". ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Liyang Shi --- bsd-user/bsdload.c | 6 +++--- bsd-user/elfload.c | 22 +++++++++++----------- bsd-user/qemu.h | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c index f38c4faacf..b2f352c041 100644 --- a/bsd-user/bsdload.c +++ b/bsd-user/bsdload.c @@ -20,7 +20,7 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src, return 0; } -static int count(char ** vec) +static int count(char **vec) { int i; @@ -125,8 +125,8 @@ abi_ulong loader_build_argptr(int envc, int argc, abi_ulong sp, return sp; } -int loader_exec(const char * filename, char ** argv, char ** envp, - struct target_pt_regs * regs, struct image_info *infop) +int loader_exec(const char *filename, char **argv, char **envp, + struct target_pt_regs *regs, struct image_info *infop) { struct linux_binprm bprm; int retval; diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 32378af7b2..35c340f13a 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -547,12 +547,12 @@ struct exec #define DLINFO_ITEMS 12 -static inline void memcpy_fromfs(void * to, const void * from, unsigned long n) +static inline void memcpy_fromfs(void *to, const void *from, unsigned long n) { memcpy(to, from, n); } -static int load_aout_interp(void * exptr, int interp_fd); +static int load_aout_interp(void *exptr, int interp_fd); #ifdef BSWAP_NEEDED static void bswap_ehdr(struct elfhdr *ehdr) @@ -613,7 +613,7 @@ static void bswap_sym(struct elf_sym *sym) * to be put directly into the top of new user memory. * */ -static abi_ulong copy_elf_strings(int argc,char ** argv, void **page, +static abi_ulong copy_elf_strings(int argc, char **argv, void **page, abi_ulong p) { char *tmp, *tmp1, *pag = NULL; @@ -756,7 +756,7 @@ static void padzero(abi_ulong elf_bss, abi_ulong last_bss) static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc, - struct elfhdr * exec, + struct elfhdr *exec, abi_ulong load_addr, abi_ulong load_bias, abi_ulong interp_load_addr, int ibcs, @@ -834,7 +834,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc, } -static abi_ulong load_elf_interp(struct elfhdr * interp_elf_ex, +static abi_ulong load_elf_interp(struct elfhdr *interp_elf_ex, int interpreter_fd, abi_ulong *interp_load_addr) { @@ -1143,8 +1143,8 @@ static void load_symbols(struct elfhdr *hdr, int fd) syminfos = s; } -int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, - struct image_info * info) +int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs, + struct image_info *info) { struct elfhdr elf_ex; struct elfhdr interp_elf_ex; @@ -1155,11 +1155,11 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, unsigned int interpreter_type = INTERPRETER_NONE; unsigned char ibcs2_interpreter; int i; - struct elf_phdr * elf_ppnt; + struct elf_phdr *elf_ppnt; struct elf_phdr *elf_phdata; abi_ulong elf_bss, k, elf_brk; int retval; - char * elf_interpreter; + char *elf_interpreter; abi_ulong elf_entry, interp_load_addr = 0; abi_ulong start_code, end_code, start_data, end_data; abi_ulong reloc_func_desc = 0; @@ -1334,7 +1334,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, and then start this sucker up */ { - char * passed_p; + char *passed_p; if (interpreter_type == INTERPRETER_AOUT) { snprintf(passed_fileno, sizeof(passed_fileno), "%d", bprm->fd); @@ -1553,7 +1553,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, return 0; } -static int load_aout_interp(void * exptr, int interp_fd) +static int load_aout_interp(void *exptr, int interp_fd) { printf("a.out interpreter not yet supported\n"); return(0); diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index f8bb1e5459..cbf42129e4 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -123,19 +123,19 @@ struct linux_binprm { int argc, envc; char **argv; char **envp; - char * filename; /* Name of binary */ + char *filename; /* Name of binary */ }; void do_init_thread(struct target_pt_regs *regs, struct image_info *infop); abi_ulong loader_build_argptr(int envc, int argc, abi_ulong sp, abi_ulong stringp, int push_ptr); -int loader_exec(const char * filename, char ** argv, char ** envp, - struct target_pt_regs * regs, struct image_info *infop); +int loader_exec(const char *filename, char **argv, char **envp, + struct target_pt_regs *regs, struct image_info *infop); -int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, - struct image_info * info); -int load_flt_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, - struct image_info * info); +int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs, + struct image_info *info); +int load_flt_binary(struct linux_binprm *bprm, struct target_pt_regs *regs, + struct image_info *info); abi_long memcpy_to_target(abi_ulong dest, const void *src, unsigned long len); From patchwork Wed Jan 13 09:32:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shiliyang X-Patchwork-Id: 1425732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DG2Vd2YMFz9sVs for ; Wed, 13 Jan 2021 20:40:25 +1100 (AEDT) Received: from localhost ([::1]:45752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzcdb-00086u-CT for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2021 04:40:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzcVm-0007NL-0z for qemu-devel@nongnu.org; Wed, 13 Jan 2021 04:32:18 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzcVj-0003NW-Tl for qemu-devel@nongnu.org; Wed, 13 Jan 2021 04:32:17 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DG2Hx61Kgzj69W; Wed, 13 Jan 2021 17:31:09 +0800 (CST) Received: from [10.108.235.13] (10.108.235.13) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.498.0; Wed, 13 Jan 2021 17:32:03 +0800 Subject: [PATCH V3 2/4] bsd-user: suspect code indent for conditional statements References: To: , From: shiliyang Message-ID: Date: Wed, 13 Jan 2021 17:32:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.108.235.13] X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.191; envelope-from=shiliyang@huawei.com; helo=szxga05-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.chen@huawei.com, hunongda@huawei.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patch fixes error style problems found by checkpatch.pl: ERROR: suspect code indent for conditional statements Signed-off-by: Liyang Shi --- 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)); From patchwork Wed Jan 13 09:32:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shiliyang X-Patchwork-Id: 1425725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DG2ST31bDz9sVp for ; Wed, 13 Jan 2021 20:38:33 +1100 (AEDT) Received: from localhost ([::1]:36334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzcbn-000475-9o for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2021 04:38:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzcWa-0008FK-CF for qemu-devel@nongnu.org; Wed, 13 Jan 2021 04:33:08 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzcWY-0003kP-99 for qemu-devel@nongnu.org; Wed, 13 Jan 2021 04:33:08 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DG2Jc42KjzMJhK; Wed, 13 Jan 2021 17:31:44 +0800 (CST) Received: from [10.108.235.13] (10.108.235.13) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Wed, 13 Jan 2021 17:32:56 +0800 Subject: [PATCH V3 3/4] bsd-user: space required after semicolon References: To: , From: shiliyang Message-ID: <339c2da9-065e-d535-b63e-b35478b050c6@huawei.com> Date: Wed, 13 Jan 2021 17:32:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.108.235.13] X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.191; envelope-from=shiliyang@huawei.com; helo=szxga05-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.chen@huawei.com, hunongda@huawei.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patch fixes error style problems found by checkpatch.pl: ERROR: space required after that ';' Signed-off-by: Liyang Shi --- bsd-user/elfload.c | 2 +- bsd-user/syscall.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index a121e71339..fab9da757c 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -1227,7 +1227,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct target_pt_regs *regs, end_data = 0; interp_ex.a_info = 0; - for(i=0;i < elf_ex.e_phnum; i++) { + for (i = 0; i < elf_ex.e_phnum; i++) { if (elf_ppnt->p_type == PT_INTERP) { if ( elf_interpreter != NULL ) { diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 9b471b665c..e16dc80478 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -271,7 +271,7 @@ static abi_long lock_iovec(int type, struct iovec *vec, abi_ulong target_addr, target_vec = lock_user(VERIFY_READ, target_addr, count * sizeof(struct target_iovec), 1); if (!target_vec) return -TARGET_EFAULT; - for(i = 0;i < count; i++) { + for (i = 0; i < count; i++) { base = tswapl(target_vec[i].iov_base); vec[i].iov_len = tswapl(target_vec[i].iov_len); if (vec[i].iov_len != 0) { @@ -297,7 +297,7 @@ static abi_long unlock_iovec(struct iovec *vec, abi_ulong target_addr, target_vec = lock_user(VERIFY_READ, target_addr, count * sizeof(struct target_iovec), 1); if (!target_vec) return -TARGET_EFAULT; - for(i = 0;i < count; i++) { + for (i = 0; i < count; i++) { if (target_vec[i].iov_base) { base = tswapl(target_vec[i].iov_base); unlock_user(vec[i].iov_base, base, copy ? vec[i].iov_len : 0); From patchwork Wed Jan 13 09:33:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shiliyang X-Patchwork-Id: 1425727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DG2Sb0qW2z9sVp for ; Wed, 13 Jan 2021 20:38:39 +1100 (AEDT) Received: from localhost ([::1]:37730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzcbt-0004ir-4U for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2021 04:38:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzcXK-0000hm-7u for qemu-devel@nongnu.org; Wed, 13 Jan 2021 04:33:54 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzcXG-000427-0A for qemu-devel@nongnu.org; Wed, 13 Jan 2021 04:33:54 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DG2KT1kG5zl3x5; Wed, 13 Jan 2021 17:32:29 +0800 (CST) Received: from [10.108.235.13] (10.108.235.13) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Wed, 13 Jan 2021 17:33:35 +0800 Subject: [PATCH V3 4/4] bsd-user: do not use C99 // comments References: To: , From: shiliyang Message-ID: Date: Wed, 13 Jan 2021 17:33:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.108.235.13] X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.190; envelope-from=shiliyang@huawei.com; helo=szxga04-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.chen@huawei.com, hunongda@huawei.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This patch fixes error messages found by checkpatch.pl: ERROR: do not use C99 // comments Signed-off-by: Liyang Shi --- bsd-user/elfload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index fab9da757c..ff571088f7 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -1010,7 +1010,7 @@ static const char *lookup_symbolxx(struct syminfo *s, target_ulong orig_addr) struct elf_sym *syms = s->disas_symtab.elf64; #endif - // binary search + /* binary search */ struct elf_sym *sym; sym = bsearch(&orig_addr, syms, s->disas_num_syms, sizeof(*syms), symfind); @@ -1092,7 +1092,7 @@ static void load_symbols(struct elfhdr *hdr, int fd) #ifdef BSWAP_NEEDED bswap_sym(syms + i); #endif - // Throw away entries which we do not need. + /* Throw away entries which we do not need. */ if (syms[i].st_shndx == SHN_UNDEF || syms[i].st_shndx >= SHN_LORESERVE || ELF_ST_TYPE(syms[i].st_info) != STT_FUNC) {