From nobody Mon Oct 24 18:13:52 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mx39X6yc3z4gN54; Mon, 24 Oct 2022 18:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mx39X69kmz3pqS; Mon, 24 Oct 2022 18:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666635232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hnLb85cDTLPfpZ4DE1o731GwMPR4SC2zXlktvUdlFNg=; b=mcis/JWzlMKimn+BUHv5ysjv46+scCr5uby8H3OOExSNOUmyNVXV5fIy9co0lUe8FO3mwf jM6xccjAkk+j+cUYJNwcnGsMZHOkF+fGLpukz3S9tZkkeNPbZhIdj0f8/Kmmcq+6vBDuKJ 76PI6GUxeijknzwYseuLF+n0R0gfx4vKDIqzSOZak5l18IfeJOimu5NZKZuAMkv3VZrneL ZzTb+HYIabjYm+5NDTLk47v2PPqxqY64WlCxTvpAsFMQjl9hyeHwt+opCYSACxFhiMnSXn uNj85Z7IpquBpV1deMvXXC8nU5NZNsC0+baomHgGbpRfAvHv/wgOh4UYBrfBYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mx39X5D14zKMR; Mon, 24 Oct 2022 18:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29OIDqXu088363; Mon, 24 Oct 2022 18:13:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29OIDqtW088362; Mon, 24 Oct 2022 18:13:52 GMT (envelope-from git) Date: Mon, 24 Oct 2022 18:13:52 GMT Message-Id: <202210241813.29OIDqtW088362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: eca818c872f7 - main - stand/efi: Simpler construct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eca818c872f7ad094f8dac143123e7e8d65f3bcc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666635232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hnLb85cDTLPfpZ4DE1o731GwMPR4SC2zXlktvUdlFNg=; b=sG7qIVsfHdMxItHphyks7+1kW8K8u/GFZ4qpXBRirnwoBm1j1m/376X6BqzDAqGGC/2kDU ye52lk3OxqGnfh/QC/z+Y02vbxkVuRTv4KeoZfqjuH4NiprXHGp1aaYYBt73dCvY7LOzus 8tAwB8K3SSXJtLvMwahQ09a968vraG1p2d3i/uYrua/ulRSvJCOz46MNW8aZJKBg43AoHK m9LqA/WrYReXUg7qR9gNwNFdTyrJ7qL2FLavwyoRxj14XQDRvVAQosrcG/QLI/NpJfYSSN wpsvM0YsFrnwLAJz/zPuz9pIs1rkHKAsamTuAexagXm5GSeYuIpFRe5y6h0zMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666635232; a=rsa-sha256; cv=none; b=nDkVPzyy5mt/fMxhpO6xucuqdV91yDG9aEzexH5OcGw6RRdc4NvFm0Mge97EnYnReIRLFA DiIuwfmKX/P7V8Y7GUo7fOsm3XLmg8TdF773ZQSr5hB4ZqUhSxijMM3xYXDsofd/sBtL/D tM+lCCRsGJt7lbFm2at9aUZdP3ahGsu+ENbsM5/JV9b4bdr9C/+4hFpTQWsp0TvsZsIAoY WGescPv+cYKf2ySjgwfx43RshOtEt+ebuIqmN7CCQ4Pt4Gz4rZ+SMtHlxKOFapRfDgXjPZ sJ2nxyH4rbBGYf9PcMFsavgZgWSVEPFvCb8WLMJc4SJy37cA6IQo0swZMglVxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=eca818c872f7ad094f8dac143123e7e8d65f3bcc commit eca818c872f7ad094f8dac143123e7e8d65f3bcc Author: Warner Losh AuthorDate: 2022-10-24 18:11:50 +0000 Commit: Warner Losh CommitDate: 2022-10-24 18:13:03 +0000 stand/efi: Simpler construct Use 'sizeof(long) == 8' for a compile time constant that can be used as an initializer rather than #ifdefs. Sponsored by: Netflix --- stand/efi/loader/bootinfo.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 38175bf10bc5..afa24c127276 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -316,7 +316,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) vm_offset_t size; char *rootdevname; int howto; - bool is64; + bool is64 = sizeof(long) == 8; #if defined(LOADER_FDT_SUPPORT) vm_offset_t dtbp; int dtb_size; @@ -336,12 +336,6 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) #endif }; #endif -#ifdef __LP64__ - is64 = true; -#else - is64 = false; -#endif - howto = bi_getboothowto(args); /*