From nobody Fri Dec 19 07:47:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1628372663; cv=none; d=zohomail.com; s=zohoarc; b=NJ0sRbqzkG9UwJXnq7DFI7crT/ojCMT8Bzx55D62kDT80zjB24uIOLQpOHYcYyYM6M9fIGitVnpXJXEdWp8SalL8bla2EIWx/CTJmuX+vM8PuOZdEVdQOWITnWKUGadvojq1TP9YNhNnBf7Sjx2XcZqJC3g0gCEF0B6o+xpd7d4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628372663; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BZr8mJ1mJ66M5MXwN6/HePswNTldWfKVbwj4u/xapbY=; b=EDTm9c3armhDBJqNEIP7u/JVolVXNaLy97HFJFQLeZ6Xn72vGg5JpHVuWFH/tYc9Hk22mK58ZsU5Yyfo7XeGaRBamcNOgIP1cEvhaAhWUciOOi/PMHEhDaf0+BpNa5556M3E/r+7nPZomPe9eSk/QTaMq+Frekq7X0CQEjJ3/OE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1628372663739213.07585362329212; Sat, 7 Aug 2021 14:44:23 -0700 (PDT) Received: from localhost ([::1]:37526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCU7C-0000vW-F5 for importer@patchew.org; Sat, 07 Aug 2021 17:44:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCU5t-0006LF-Et for qemu-devel@nongnu.org; Sat, 07 Aug 2021 17:43:01 -0400 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]:35603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCU5r-0004kO-GO for qemu-devel@nongnu.org; Sat, 07 Aug 2021 17:43:01 -0400 Received: by mail-io1-xd2d.google.com with SMTP id s184so20001911ios.2 for ; Sat, 07 Aug 2021 14:42:59 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id a17sm8062827ios.36.2021.08.07.14.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 14:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BZr8mJ1mJ66M5MXwN6/HePswNTldWfKVbwj4u/xapbY=; b=rB/UeJT5/eO3l18ZhVaHV8ZEhSsfEcqor5wDkMH9YzJt3uBEJff5928CuGdPR0xSO0 KYVuXAlK4z8rCHi9904rkr8/XRbeo4SwLOowtY27l/XEXYMbrMujjc3OL8qj84kZf9jL ZmzBWeihGoIqrOI6Ies1jMnbm1HDEm/cBsYwzkPMAuMpJSY9rcnAl53qbIfSepWjZmhL ZZFGrmoy/SecngwoPuTYufo5FZ9p+0PHfno6Z7lwoVz1o4hAgm+58VpqZojmDJxao/Qd P9WbSVH3/7nYTAPAJD0hWu+IOHSBO/fdUzcSJVkjtO6ddvc6XcSBPQFARDqXLG5iJwhd 0Xjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BZr8mJ1mJ66M5MXwN6/HePswNTldWfKVbwj4u/xapbY=; b=gyO2bxvD8jSwXt5C/qpA0JEg8UrPueHya40zFKCaR1LUn51whaUtDfsKZnTxU33Eve OCYinGmuO6roQCWPhpT/rgCM8T9zIEhfLtNeuKERdPKzgssstu8qjVtUYQq6yd/2OU/j Wi7m2QpGEyahwZijBqDlUpXKTcfG7o1oDK+OxVGlH/KIqDDzoEb498LDC3J+ox2DvF4p cMEBzmuaZLcrZKbzcXoUgL+0hdUPWTDZht4xgBj2wgOHOD21SY3ejutJHISqNi72XUXd vEGNcrphRIg0BAosjdB/KEuFYw/mEM2trP2xYW1L+Ei6jHmrUJ0sZuInoKrjCbbVry/C 8miQ== X-Gm-Message-State: AOAM533npAxpURciFEE5kZhMRXdue9lZ/bSOUiGT9ZWB+3aZkFl21G5x eaEBoG5i9bM3L7M0IGNHpRIPC5J7kqcgjmpx X-Google-Smtp-Source: ABdhPJy7WRHLHzrg2s8kzCbc7n4vWbMj+D5lyevZyHok8jHGy3+FPu8C3px1f6F2lAwopnjg0Mit3w== X-Received: by 2002:a92:2e12:: with SMTP id v18mr69568ile.100.1628372578235; Sat, 07 Aug 2021 14:42:58 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH for 6.2 07/49] bsd-user: style nits: apply qemu style to these files Date: Sat, 7 Aug 2021 15:42:00 -0600 Message-Id: <20210807214242.82385-8-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210807214242.82385-1-imp@bsdimp.com> References: <20210807214242.82385-1-imp@bsdimp.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::d2d; envelope-from=imp@bsdimp.com; helo=mail-io1-xd2d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: kevans@freebsd.org, Warner Losh Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @bsdimp-com.20150623.gappssmtp.com) X-ZM-MESSAGEID: 1628372663956100007 Content-Type: text/plain; charset="utf-8" Fix style wrt {} placement, spaces around () and line lengths. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/i386/target_arch_elf.h | 27 ++++++++++++++++----------- bsd-user/x86_64/target_arch_elf.h | 11 +++++++---- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/bsd-user/i386/target_arch_elf.h b/bsd-user/i386/target_arch_el= f.h index 20ef0ccbdb..f322fc174b 100644 --- a/bsd-user/i386/target_arch_elf.h +++ b/bsd-user/i386/target_arch_elf.h @@ -25,10 +25,12 @@ static const char *get_elf_platform(void) { static char elf_platform[] =3D "i386"; int family =3D object_property_get_int(OBJECT(thread_cpu), "family", N= ULL); - if (family > 6) + if (family > 6) { family =3D 6; - if (family >=3D 3) + } + if (family >=3D 3) { elf_platform[1] =3D '0' + family; + } return elf_platform; } =20 @@ -46,7 +48,7 @@ static uint32_t get_elf_hwcap(void) /* * This is used to ensure we don't load something for the wrong architectu= re. */ -#define elf_check_arch(x) ( ((x) =3D=3D EM_386) || ((x) =3D=3D EM_486) ) +#define elf_check_arch(x) (((x) =3D=3D EM_386) || ((x) =3D=3D EM_486)) =20 /* * These are used to set parameters in the core dumps. @@ -55,18 +57,21 @@ static uint32_t get_elf_hwcap(void) #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_386 =20 -static inline void init_thread(struct target_pt_regs *regs, struct image_i= nfo *infop) +static inline void init_thread(struct target_pt_regs *regs, + struct image_info *infop) { regs->esp =3D infop->start_stack; regs->eip =3D infop->entry; =20 - /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program - starts %edx contains a pointer to a function which might be - registered using `atexit'. This provides a mean for the - dynamic linker to call DT_FINI functions for shared libraries - that have been loaded before the code runs. - - A value of 0 tells we have no such handler. */ + /* + * SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts = %edx + * contains a pointer to a function which might be registered using + * `atexit'. This provides a mean for the dynamic linker to call DT_F= INI + * functions for shared libraries that have been loaded before the code + * runs. + * + * A value of 0 tells we have no such handler. + */ regs->edx =3D 0; } =20 diff --git a/bsd-user/x86_64/target_arch_elf.h b/bsd-user/x86_64/target_arc= h_elf.h index d3c139c7a9..e7c8aa2755 100644 --- a/bsd-user/x86_64/target_arch_elf.h +++ b/bsd-user/x86_64/target_arch_elf.h @@ -25,10 +25,12 @@ static const char *get_elf_platform(void) { static char elf_platform[] =3D "i386"; int family =3D object_property_get_int(OBJECT(thread_cpu), "family", N= ULL); - if (family > 6) + if (family > 6) { family =3D 6; - if (family >=3D 3) + } + if (family >=3D 3) { elf_platform[1] =3D '0' + family; + } return elf_platform; } =20 @@ -42,13 +44,14 @@ static uint32_t get_elf_hwcap(void) } =20 #define ELF_START_MMAP 0x2aaaaab000ULL -#define elf_check_arch(x) ( ((x) =3D=3D ELF_ARCH) ) +#define elf_check_arch(x) (((x) =3D=3D ELF_ARCH)) =20 #define ELF_CLASS ELFCLASS64 #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_X86_64 =20 -static inline void init_thread(struct target_pt_regs *regs, struct image_i= nfo *infop) +static inline void init_thread(struct target_pt_regs *regs, + struct image_info *infop) { regs->rax =3D 0; regs->rsp =3D infop->start_stack; --=20 2.32.0