From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382074; b=ks00qieKHYCfg6YVb6dF7BhiuYbLB11P1LDJEHaKwnPv5LTbDm1fNyt3JS1YNLad4315 79FZ1sqOgrSKC2bkwfaN/NjFJQx5LxNpa41jgnePZ2wqejCgbJYu90rp/Sp1ouVMhtshA cBSM5ohi/fcc9HXrm/p8dlwQbvytfh1aNsOMy/XysFXlE6+XdEDVsPPIBAlLWrY+jedGB YQ3EeSImuSFdzpkrqQIbcpoftihnAQ8/ln6Dg2HnnijiIgNUdnl660Y90z6COgYwU1zhd xprb3UmJ7xBq6RRiinxnY8Vwlm7UB2aCAPT18Adty79SVBi37n+tTc5xcyOGmWMWdmw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382074; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=ZGjZUwXDg1QCyA3trh8U9Jx7UUfQPz56ChdFylheF30=; b=JZz8BQdoDZMHYA6rSO4ZImxMoPK6gjG3+YlpFlYXR3P5Hn+F1LmG17hlJijW6bA6MoBn B6/7sbDWR4r+xo8dhar6G1LFTarM14AYZZjUv15PbyT9SWA+LmEAsp5L5zhoyiSh2WAnT Sk8ntvRpHJZ+qCbGtM2neIZKE618zGEj/ydKsZfATUfyK4BXLENjJbMl8fEgS37wAM9hE a64j6rx+/VZlpyWY1wrHKhWpn1kke+O7z9v/Hon+m6zcRgoAfXuYewmeb4XuGzXIZBIrM SBeE0iQ1eaB9n+vfiofcfdPyz+g7sSWq6+yjfVVUSS/dXHDbh26IL8HMnvVmtrSKpHg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=xC47JxRn; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0388606A32D; Fri, 4 Dec 2026 11:01:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=xC47JxRn Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2919B1F000CE; Fri, 4 Dec 2026 11:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382074; bh=ZGjZUwXDg1QCyA3trh8U9Jx7UUfQPz56ChdFylheF30=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=xC47JxRnjuxFKfEGdXxzWfvd0iOiWT8YCNAHu51ySGSK2mLJId1b83NcYDZ5dlFMk /wuYzzj6J/DN+VYIRzCT+qLr5MXrF4qu08/KQMXiKxtl+QqU6RgKTOxh5BqpE3tI0k s21znqtkK8CuxHeSxrHYGs15CWqe69e92RSE2DDQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Jan=20Sch=C3=A4r?= , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 6.18 297/703] gpiolib: fix inverted trace values in gpiod_get_array_value() Date: Fri, 4 Dec 2026 19:03:16 +0900 Message-ID: <20261204100635.684342446@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.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 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jan Schär [ Upstream commit 601acadb79b62ee52edbd29ec69d8f677dc32dcd ] Almost all trace_gpio_value() calls report the raw value. gpiod_get_array_value_complex() is the only exception; it reports the logical value in traces unless the caller requests raw values. This inconsistency makes GPIO traces confusing. Move the trace call earlier, where the value is still raw. Now, all GPIO traces consistently report raw values. Fixes: eec1d566cdf9 ("gpio: Introduce ->get_multiple callback") Signed-off-by: Jan Schär Link: https://patch.msgid.link/20261120130208.89621-1-jan@jschaer.ch Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index e126218751eb2..00c309cf83221 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -3458,10 +3458,10 @@ int gpiod_get_array_value_complex(bool raw, bool can_sleep, int hwgpio = gpiod_hwgpio(desc); int value = test_bit(hwgpio, bits); + trace_gpio_value(desc_to_gpio(desc), 1, value); if (!raw && test_bit(GPIOD_FLAG_ACTIVE_LOW, &desc->flags)) value = !value; __assign_bit(j, value_bitmap, value); - trace_gpio_value(desc_to_gpio(desc), 1, value); j++; if (array_info) -- 2.53.0