From nobody Thu May 04 19:34:21 2023 X-Original-To: dev-commits-src-main@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 4QC3sn3pgkz49Rx8; Thu, 4 May 2023 19:34:21 +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 4QC3sn37Syz4Pk5; Thu, 4 May 2023 19:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228861; 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=xgf6P4e/B/SDpIvk2R12LgQ+uv1RRPmBRhfxmZrMAVY=; b=XJpehHPNJDyLfRyBAgY2HeI93sEbp6f8OAB7SesYBmLYIcAiDnO/hcrjw5DN/VRzKyP5OE 2n8TsRDM4fSWuv/P0gbltCb7qqO+s/EJtWoce0H+dryFs3nJy9y3jSl2LcVTAYca8hkeNl c7thicVfPblZaoPwW5MFH4jXw3Lfpn1Fg7hd5k/4Ongi68Rk0DAQZ9yzFQXqbHrPRBJFxF x//tFNeEhQ3bDLhi14vAphtvixyplIfcbZU5ZeaKfF6EI80Rew5d7YBgt19wNS91N0VJYE /8TDuK/xGb3r7QXDRs4FvpsXwN2uhALORt1DTKZtGuL5ZEaKJfqvWUSUJ5ZzpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228861; 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=xgf6P4e/B/SDpIvk2R12LgQ+uv1RRPmBRhfxmZrMAVY=; b=xh1CwSluzMIQKidGBpAYWtKzTKPLS9r9vAJrjBP/vEzqKauWTW9wYKQKRVceUC7sifQE46 NkDRejGsgo3Dqbwnbkg81WOEbd0czLRw5meGb9PynJsqa763hQgFZz+wGcivK4LAbpnmTT 2TvsqtkINA/quqthkU9Yupz2OKdbcec2ZUkUjT82V06W1NLxG+ErIlLQaMLhQ0S5tsgbzk TCJQdkeEZROfdO1nlD4XK9PRasfMU7ZAeaSwZxX/VAuQEPEPLGsC4E3f2ZZ+1d7EWY0dzE t9mGwWaSTaWmeD6mDn5m8qfWMCHf8ayz1enFdqI4m3P3Y1O75or7Di2NMMjyfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228861; a=rsa-sha256; cv=none; b=kXTA6aqtMpUWviVGHehrbDdnzU2up0RQCtq4aWoiYDpNeQYY0n68WC+APmefbYPoZvM087 uHBFZrdvBCYj+RjBTOTCLmnRo6ktrJDUVdhcIe1fUoXNktYh+mzVb4icxwJKuxPzXvHdcn bBVlMQDkWJeqqrIhk0WLUqdY433gxw/fbH2Bx4YGYoc9uc3DhgwZe36MvEJ01DPmOIpF1s XOlsCi1s5StBgq7pQahnHRpu5rEkROPCp6TlAEYiiAJL6yizI4C0PYFieOplBBURTAbrnr osZJyx+YBy91jwFoedfjciSX9YqZnEGN9A6sOakzwQwx7sD6khy+gxH7e5/Ifw== 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 4QC3sn1wcFzPtf; Thu, 4 May 2023 19:34:21 +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 344JYLvH049338; Thu, 4 May 2023 19:34:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYLd0049337; Thu, 4 May 2023 19:34:21 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:21 GMT Message-Id: <202305041934.344JYLd0049337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 65c92e48c43a - main - acpi_button: Replace boolean_t with better types. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 commit 65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 Author: John Baldwin AuthorDate: 2023-05-04 19:32:09 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:32:09 +0000 acpi_button: Replace boolean_t with better types. - Use an enum for the button type (it is not really a boolean value). - Use bool for fixed. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39922 --- sys/dev/acpica/acpi_button.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/acpica/acpi_button.c b/sys/dev/acpica/acpi_button.c index 492f64e00f4d..f2c7041f809f 100644 --- a/sys/dev/acpica/acpi_button.c +++ b/sys/dev/acpica/acpi_button.c @@ -53,10 +53,8 @@ ACPI_MODULE_NAME("BUTTON") struct acpi_button_softc { device_t button_dev; ACPI_HANDLE button_handle; - boolean_t button_type; -#define ACPI_POWER_BUTTON 0 -#define ACPI_SLEEP_BUTTON 1 - boolean_t fixed; + enum { ACPI_POWER_BUTTON, ACPI_SLEEP_BUTTON } button_type; + bool fixed; #ifdef EVDEV_SUPPORT struct evdev_dev *button_evdev; #endif @@ -120,14 +118,14 @@ acpi_button_probe(device_t dev) } else if (strcmp(str, "ACPI_FPB") == 0) { device_set_desc(dev, "Power Button (fixed)"); sc->button_type = ACPI_POWER_BUTTON; - sc->fixed = 1; + sc->fixed = true; } else if (strcmp(str, "PNP0C0E") == 0) { device_set_desc(dev, "Sleep Button"); sc->button_type = ACPI_SLEEP_BUTTON; } else if (strcmp(str, "ACPI_FSB") == 0) { device_set_desc(dev, "Sleep Button (fixed)"); sc->button_type = ACPI_SLEEP_BUTTON; - sc->fixed = 1; + sc->fixed = true; } return (rv);