From nobody Wed May 13 12:39:47 2026 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 4gFtMS0CLbz6dLB1 for ; Wed, 13 May 2026 12:39:48 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gFtMR3sHSz3vqN for ; Wed, 13 May 2026 12:39:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778675987; 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=c7aXjPiWgRtT+ou8uKWWvpah0VXPIx6Sj3KzDtBQciQ=; b=JbkvuJWL9dE0kZ9QLGnqT0BUHzkfMnp9rdRJTsSHuVSOIXMlXwh29DSFk0CZMxnoA8vZu2 HLOsGYzxq/xvvAN1inOJRJyMAp9kJ5cth8nJWnt5nvSAdIOoYH0dJNNuGoFUndEJktCzgk qlSc9m0msZXag1MHNcqyjpfl0/uhN0UzkYOn3/jg9ADrOg2nKwAWXA5AGXnYCAQdIP7IgB loQaI/bJ36V156IXRE2l66WlP5tq/7pNbce2QoxWfOfdy81YLD0VVNxXC/RHbcDLLu4x5f KfFV3O/pqkDeyfsBLJBbZvezwIjJ35S+gwieERDSYP5DlXqcu2HcGTerUZHtrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778675987; a=rsa-sha256; cv=none; b=n1WRhOUsKPTEB9kph7oTQ3zMuH5CTYepxytXVzQ127OuJtzyc87GTODAsxxxWOfTkdoAs9 flXewN/lVeGnv7WiqHbZ7kN8UWvrk3S1girGDvNrGGFteW/zcUwTQqZRFJ4gQuzwHr+OtC HUNfZwIJ5LjS1msZ1iM0kD1BJZYhNfgIaE7a1wVz+hO2OkkKygItrivRfKD1JX2oUfPeFq PGPCFiDl+fKd2UO8Ro7jdAY177dnb+PLi7rEC23GFIe9JYzvGc+6BmbS37ejYY9vnEVSyN jI/l0Z+ugUGsT2smCLDFE91l9aOD6RsS/0KrV/l5sP0Nuny/579F6CmRj/CdxQ== 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=1778675987; 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=c7aXjPiWgRtT+ou8uKWWvpah0VXPIx6Sj3KzDtBQciQ=; b=QF55wDEQKT4of2yL7ps1Ygk5cvsHSN1lZURX2J77WEwSXnXEfsgECyHvPDsZpRV9ycG22g hIKJQ5qA4CDzqaRKYnYaAKrAGatBIv3QSaXEGoGiF0kY9vfwV3J9AjfV+FbY0K2AygKYvJ 1b3CB9lGO19j0YtAIzCj671++0wNaQc9OCzYnhuphvRtMANUTNktHiT88zqrsmNETP259J zy9KG/aQvcbNeT7RhdGEBJOeHyEr0YHSG2opzmfj/CyKPjSevsjxvcAS6SnRulqjd5MMQT jb1hGAyIHRBr/oa/jBd1MFlFxEZ/rg0NN1TXFCc96NtSyALZMt2horF48Dz1aA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gFtMR3Sp5zqyL for ; Wed, 13 May 2026 12:39:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19545 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 13 May 2026 12:39:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: a78c9a2a47f2 - main - acpi_spmc(4): Constraints: Clearer message on handle retrieve error 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a78c9a2a47f2209328bd25e527bd20cfab6d3665 Auto-Submitted: auto-generated Date: Wed, 13 May 2026 12:39:47 +0000 Message-Id: <6a047113.19545.5c5a6a90@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=a78c9a2a47f2209328bd25e527bd20cfab6d3665 commit a78c9a2a47f2209328bd25e527bd20cfab6d3665 Author: Olivier Certner AuthorDate: 2026-05-04 12:00:39 +0000 Commit: Olivier Certner CommitDate: 2026-05-13 12:38:21 +0000 acpi_spmc(4): Constraints: Clearer message on handle retrieve error Currently, the "failed to get handle for ..." log messages on attach are a bit alarming and no context is provided. Print out that these are retrieved when trying to match constraints and that such failures are ignored, which should make administrators worry less. While here, remove duplicated handle retrieving code in acpi_spmc_check_constraints() because: 1. As is, it is dead code: We 'continue' if the handle is NULL, i.e., not already resolved, before trying to resolve it again. 2. This code is called after device suspension, which might make some objects disappear from the ACPI namespace. In any case, it seems unlikely that, suddenly, new objects would appear. Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56808 --- sys/dev/acpica/acpi_spmc.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index 530d719fd66e..15b97347e8eb 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -643,7 +643,8 @@ acpi_spmc_get_constraints(device_t dev) status = acpi_GetHandleInScope(sc->handle, __DECONST(char *, constraint->name), &constraint->handle); if (ACPI_FAILURE(status)) { - device_printf(dev, "failed to get handle for %s\n", + device_printf(dev, + "Constraints: Cannot get handle for %s, ignoring\n", constraint->name); constraint->handle = NULL; } @@ -665,16 +666,6 @@ acpi_spmc_check_constraints(struct acpi_spmc_softc *sc) if (constraint->handle == NULL) continue; - ACPI_STATUS status = acpi_GetHandleInScope(sc->handle, - __DECONST(char *, constraint->name), &constraint->handle); - if (ACPI_FAILURE(status)) { - device_printf(sc->dev, "failed to get handle for %s\n", - constraint->name); - constraint->handle = NULL; - } - if (constraint->handle == NULL) - continue; - #ifdef notyet int d_state; if (ACPI_FAILURE(acpi_pwr_get_state(constraint->handle, &d_state)))