From nobody Tue Jan 24 22:12:40 2023 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 4P1h6d2vVnz3bg45; Tue, 24 Jan 2023 22:12:41 +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 4P1h6c54QSz3DkQ; Tue, 24 Jan 2023 22:12:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598360; 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=NcqpTWdtdQ6Y8pyr5jEGFkF5MxfdGBu/veE/BpcVOj4=; b=dER9VcQZfShYfktBzU5dEUQQ7D7ZIgpNSAxTBJTITe8YvIhIo2gG2JWqsL1kEWfboI55QP z+l54wMHj7z9TgyzjjL6iQMQhlVCyqUkXFSoPOWtpeyABjMKNBChhxuJIQjBTt9pKpCs6M jL3Of8gCNE+IG/iHcK33oIGGr0eIavLG0vN5MHLpXJH7UTTwosFNfyFamS+2T5ES1YISDd YItZVgVOuumYrZBdFWs97q9Lay4YA261sRrRCDgruAcoLGD13q9zHbTKHIv9bNOnZD7Cut r7lBydj4/5LwWBaMw6mZbS+gZrTGh1qGmFCyPQWjr0G9uNwp46eHtjUElriayw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598360; 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=NcqpTWdtdQ6Y8pyr5jEGFkF5MxfdGBu/veE/BpcVOj4=; b=hKvLORNlafC/p37MwB7qaifLfJSwuA6ZD37eeiVFvyFGXk40M07AuiYKkJrs2IJtsi0N8a CgEcK2gcAx5pohBbWeuaqfNk5RI6mKpRFcEvsYlZKxVe93NVJ79VnxcfRpB+qInC3Oic8D tJq/2zQELhQs0TcDdM33WrCZdy30WVhVFR9cHNKccktjY9JpFeaW9VG7Xq0UzoRKZJBMjQ 21z149u7RR8Ue07fa7wMEIgAPbp4E/0fs9msk1RSUnWmZ2GrC8hlqdePgE1VvCsuRYq1vz VWdGedtrYjBtv5GVe/ldmxVmPgb+kG69o4FPn+FdGbVvYRchV6Yhh/nBK8/uPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598360; a=rsa-sha256; cv=none; b=l9LV1GRQjPDC71s3h3PcmBjuB8+J08AI2HvuwozHvd8L8MydQ/0FCuFHUta1sMdXDFyP4m Vgw3to61w29nrrYjgaI+6SOwGzrCvagmNAwxxqePbmV+p5K+m2/v1Y4wIP6FLHNjrQIfP/ bH3m6SsGbnQDxD7H+zYrNVMP+7wF56VUOvRMkcYrK6l1kkdzvraE5CiDP41Pdwa8+A9m0S 4FxoahZ07Is+yEaXIe7HMBCY6nmrHUXp9UoFWOZ8xtlsj5r7+9geUcYKdszy8qPP49xEyI kQoiWjWk+jNPpgczZCg796fJkHGZ/BlDz9CgjaG3Zzu+uNsmlXWtH0DsYcvcsw== 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 4P1h6c3qf8zQfM; Tue, 24 Jan 2023 22:12:40 +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 30OMCe1v087355; Tue, 24 Jan 2023 22:12:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMCeOl087354; Tue, 24 Jan 2023 22:12:40 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:12:40 GMT Message-Id: <202301242212.30OMCeOl087354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 742ad212c5bd - stable/13 - stand: Remove dead store to bi_kernelname 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 742ad212c5bdc8e75a7ff58f0c21757cd010cb61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=742ad212c5bdc8e75a7ff58f0c21757cd010cb61 commit 742ad212c5bdc8e75a7ff58f0c21757cd010cb61 Author: Warner Losh AuthorDate: 2022-09-16 15:09:02 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:35 +0000 stand: Remove dead store to bi_kernelname We set this value twice: once to 0 and once to the VA that has the name of the kernel. The first store is redundant. In addition, these two stores of 0 are also redundant. Since we never set them, they will always be zero, even if we're called multiple times. This saves 21 bytes on BIOS loader. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D36541 (cherry picked from commit e895ab3fbdc10fbf944289165c25357cb3f279fe) --- stand/i386/libi386/bootinfo32.c | 3 --- stand/userboot/userboot/bootinfo32.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/stand/i386/libi386/bootinfo32.c b/stand/i386/libi386/bootinfo32.c index 9ca6a70d674e..68aae9b67ba9 100644 --- a/stand/i386/libi386/bootinfo32.c +++ b/stand/i386/libi386/bootinfo32.c @@ -173,9 +173,6 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t kernelname = getenv("kernelname"); i386_getdev(NULL, kernelname, &kernelpath); bi.bi_version = BOOTINFO_VERSION; - bi.bi_kernelname = 0; /* XXX char * -> kernel name */ - bi.bi_nfs_diskless = 0; /* struct nfs_diskless * */ - bi.bi_n_bios_used = 0; /* XXX would have to hook biosdisk driver for these */ for (i = 0; i < N_BIOS_GEOM; i++) bi.bi_bios_geom[i] = bd_getbigeom(i); bi.bi_size = sizeof(bi); diff --git a/stand/userboot/userboot/bootinfo32.c b/stand/userboot/userboot/bootinfo32.c index 08dde13baa30..d496384fbcb5 100644 --- a/stand/userboot/userboot/bootinfo32.c +++ b/stand/userboot/userboot/bootinfo32.c @@ -152,9 +152,6 @@ bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t kernelname = getenv("kernelname"); userboot_getdev(NULL, kernelname, &kernelpath); bi.bi_version = BOOTINFO_VERSION; - bi.bi_kernelname = 0; /* XXX char * -> kernel name */ - bi.bi_nfs_diskless = 0; /* struct nfs_diskless * */ - bi.bi_n_bios_used = 0; /* XXX would have to hook biosdisk driver for these */ #if 0 for (i = 0; i < N_BIOS_GEOM; i++) bi.bi_bios_geom[i] = bd_getbigeom(i);