From nobody Wed May 18 21:27:23 2022 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 BD2451B30619; Wed, 18 May 2022 21:27:24 +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 4L3R0D1Gw8z4ZF0; Wed, 18 May 2022 21:27:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652909244; 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=1sf1dKqIjwtsCisXDHiCRgD0tXR23bOEjBOtZL9zJkE=; b=ZKgw7MEXZZj4gV8ix8OwfkqLGG/QWUQnzlSNizEC2FGqR9cL+YMms1ccID5CQhaLJ/I6/7 UKW3/mSm6xZXhqMuvt++8NiwHfNI453njG8u2vOFAh1dxhfaYUkzCM57iTLqwwWCWyJXUL SFuSTHykbGJ5WAMk8cjTZhZ0HvvIFx7mfGlZ/rsjhk4SXfwazZJoCzlA4Lpg7vKAXcMyCP +FE6e7B7EAkD/lQqiJiStX1iDlL4aifvjgD1BLQUV36X/jCCwGkjU9MdLEfdsSQy5IIQdT 37rY3X6xynBw6gQrRZI+7kCSF/IWzc1dQStsD3woyWnSG+V+AZmOwqTKISmvqw== 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 DAF5B10B51; Wed, 18 May 2022 21:27:23 +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 24ILRNZC079400; Wed, 18 May 2022 21:27:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24ILRNDM079399; Wed, 18 May 2022 21:27:23 GMT (envelope-from git) Date: Wed, 18 May 2022 21:27:23 GMT Message-Id: <202205182127.24ILRNDM079399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: cd613d7cd981 - stable/13 - asmc: Make the model table const and local to asmc.c 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cd613d7cd9815c43f8261ac54a568eccbc523cc5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652909244; 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=1sf1dKqIjwtsCisXDHiCRgD0tXR23bOEjBOtZL9zJkE=; b=ZUW3k0kSYZOv/hTmar34+Y3a8YBJ3JRZr6ieneJTvGBkL8erV2FkDOUv3jiToE3b/02Jf0 oaj1b6LuO05UQ4oN1Ku8GX/QanQE+lfNUAnyTFsuXYpLmEFMUTS86u3hCKwjEYc4iOw/bI +300oaRWGvfqStVRnKxl6UZFPAc2OItZL9LZKDuhdeIkfCxSOYg/5pTw80hamEurRUov0n Y80w0XmcTke9Mm3NSRsTOXGyR0ttPZmnCGAciF0OVkq6IqSQrw9UJo5HtawA7KMLZlHwAR /m+Ypksy8MSxjwBtL12CuhGMOLjdeio+TH51TZ9z32e7fd0siGUWOx/rwekXrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652909244; a=rsa-sha256; cv=none; b=mdawmpd89wo5EVcBIT7YECYc3QZkZdWQdgEvmfs3sD6D0Bsv4dcgxk7RGNSWjrQyR0Mjs8 dNp0hA1dKeNtCIRCe84GELKZQrm8aM5RpMnygMdShuxwf4SOFLmD/UgCHhPvaHBsVue/qd 64JsLlcJp8L0DSJuZfFu6AuFI/AhJUDx1Ps6JLh0u4LRmOGgoZIUkU80p1IDcPYEFrCPVN 353SBt0+SN+zoDT+tXrHzuQBZ3nlA+c6h2KLPvCXVdYouvmVhZOFITZmZuDdN1PjfowU82 H+TZLxiikOyVR00kG+w6Lx/Yctg8mKqLVeJRhqbvPacWVqu7tcKu1+2L0v+qcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd613d7cd9815c43f8261ac54a568eccbc523cc5 commit cd613d7cd9815c43f8261ac54a568eccbc523cc5 Author: Mark Johnston AuthorDate: 2022-05-04 14:44:54 +0000 Commit: Mark Johnston CommitDate: 2022-05-18 21:15:51 +0000 asmc: Make the model table const and local to asmc.c No functional change intended. (cherry picked from commit 27d4c6f86e15e818c390dfc2f3bb6ddf50148e71) --- sys/dev/asmc/asmc.c | 10 +++++----- sys/dev/asmc/asmcvar.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index b10c16ffbed0..7695b05a4ae1 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -130,7 +130,7 @@ struct asmc_model { const char *smc_tempdescs[ASMC_TEMP_MAX]; }; -static struct asmc_model *asmc_match(device_t dev); +static const struct asmc_model *asmc_match(device_t dev); #define ASMC_SMS_FUNCS asmc_mb_sysctl_sms_x, asmc_mb_sysctl_sms_y, \ asmc_mb_sysctl_sms_z @@ -153,7 +153,7 @@ static struct asmc_model *asmc_match(device_t dev); #define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL -struct asmc_model asmc_models[] = { +static const struct asmc_model asmc_models[] = { { "MacBook1,1", "Apple SMC MacBook Core Duo", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL, @@ -443,7 +443,7 @@ static unsigned int light_control = 0; DRIVER_MODULE(asmc, acpi, asmc_driver, asmc_devclass, NULL, NULL); MODULE_DEPEND(asmc, acpi, 1, 1, 1); -static struct asmc_model * +static const struct asmc_model * asmc_match(device_t dev) { int i; @@ -467,7 +467,7 @@ asmc_match(device_t dev) static int asmc_probe(device_t dev) { - struct asmc_model *model; + const struct asmc_model *model; int rv; if (resource_disabled("asmc", 0)) @@ -495,7 +495,7 @@ asmc_attach(device_t dev) struct asmc_softc *sc = device_get_softc(dev); struct sysctl_ctx_list *sysctlctx; struct sysctl_oid *sysctlnode; - struct asmc_model *model; + const struct asmc_model *model; sc->sc_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->sc_rid_port, RF_ACTIVE); diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index 70a2b24889c7..d55259122132 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -42,7 +42,7 @@ struct asmc_softc { struct sysctl_oid *sc_temp_tree; struct sysctl_oid *sc_sms_tree; struct sysctl_oid *sc_light_tree; - struct asmc_model *sc_model; + const struct asmc_model *sc_model; int sc_rid_port; int sc_rid_irq; struct resource *sc_ioport;