From nobody Sat Sep 21 04:18:47 2024 X-Original-To: dev-commits-src-branches@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 4X9bbq5zt5z5XBnG; Sat, 21 Sep 2024 04:18:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X9bbq43Q0z40Mn; Sat, 21 Sep 2024 04:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726892327; 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=tbGAg5dcUq5eVmbfgJsDSsFQcYCr3u52v4B3iA2LN4c=; b=LuICnlklcGpP8jkCBtOCGkCU7gDmqt4Nyuqo2ShuEwT6ze53YxaCd5z+fHxgQmvcfkr9K/ u+Y/I5lBfh8loB/Oc91vZP1/BDvW6VB7kJMuF7n9nS8J8KWGPbY7FOjGZ0TBIgaASXxzfR f7aMp16sl34HhsUdDBXjwoTmv5c0hEO4Xzf5Kong5NYV6ydOyvs/w1qsecPkfmXUS95KiZ 78qLZGCqU+zyQt2ufRTQkrvKnWVf6Ul3RnEOmEDz7h9sNhpIu6qCzL92xCv5e7U9rl3x8D Otf7lg24fRCOA8hNGGw9XArrFcvLG2GbuNqKpRlmPexN00oQdS46iB08LXDjlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726892327; a=rsa-sha256; cv=none; b=l7SQ8d79tFxZCQaGXA9vSqV0/Okn5B+793eKDiUdgXBB8w9O5/F0wkLK6KYIyVh5xe3W0c LJoND56ag1vBBXX/kbzbQGmyASsrOf21jS58IhN+ngMuiTs1+X/YFOwZgheV7969mc8vUv vN6oAhO0c43YGMAn54lxoPEAsu7kRfBScpcM19XBZiuWobtSawJBQ1W93MpqRszMsOqpZl s0JFeD/oRZU7CLjM1XlA8iywxGDqlMK6UCFQ9manUC1Vw8vtgc/6QfJL591lPHx+erLYwo t51TEcWxZJBvwCEaeFB3EfMr1kzbLgfmr9rllHVPR5si/uqLqTy0Jz2E9LFUPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726892327; 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=tbGAg5dcUq5eVmbfgJsDSsFQcYCr3u52v4B3iA2LN4c=; b=pRwWZJxeXZ+tKOiPuaUAUwAXLfDGWKzX+yQp1ZDAk8U5D6K7ppsDmcjNICSlDhePduRYaH YGmaNnW/U/R3IXURA1KGBUtsULbJfyOQxnpMe4QB2bkoTY2K0YBlaTRIE7sT6P8RpyZeDX YeuN8E8XXTZ1abXwsdX4qNQZ/oXER26sUq4LFiw+UrSQ9ejwTFlmsGoGkM7OXP5uqAtZ8I RaqHkiHY1bjDU6CYbfGIIh2ExHx2z/E/HdrQ3Fhg6WBILqmWaURLKwfJYyAKYGNJJb5mcY jfADdRpW3XrO5Oo844Y8H13f1VWXdSc4BEXVy73o/sdV3bNMGGAzXFoUKRAqbA== 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 4X9bbq3gZ4zJ6X; Sat, 21 Sep 2024 04:18:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48L4IlUd010175; Sat, 21 Sep 2024 04:18:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48L4IlYl010172; Sat, 21 Sep 2024 04:18:47 GMT (envelope-from git) Date: Sat, 21 Sep 2024 04:18:47 GMT Message-Id: <202409210418.48L4IlYl010172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9c3fc1da7b3c - stable/13 - mips: Make the variable machine const List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9c3fc1da7b3c9e34dfa48f4f4c4e41b16e7a72e7 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9c3fc1da7b3c9e34dfa48f4f4c4e41b16e7a72e7 commit 9c3fc1da7b3c9e34dfa48f4f4c4e41b16e7a72e7 Author: Zhenlei Huang AuthorDate: 2024-09-21 04:17:05 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-21 04:17:05 +0000 mips: Make the variable machine const Unbreaks mips build after MFCing commit [1]. While here prefer macro SYSCTL_CONST_STRING to avoid casting. This is a direct commit to stable/13. 1. 356be1348dac kernel: Make some compile time constant variables const --- sys/mips/mips/machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c index 877216c25b05..a520700a70a7 100644 --- a/sys/mips/mips/machdep.c +++ b/sys/mips/mips/machdep.c @@ -101,9 +101,9 @@ #define BOOTINFO_DEBUG 0 -char machine[] = "mips"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD, - machine, 0, "Machine class"); +const char machine[] = "mips"; +SYSCTL_CONST_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD, + machine, "Machine class"); char cpu_model[80]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "Machine model");