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=1796380434; b=VNJ/txnmEwoIBqCz8dMkM+ZwmE5cbvPLykFYQguFnz6k6+oJY/t+djPK2oBe2k7PS1Le 76ZQxshZvaV6maAWzkrp1zLsjYJU4xFCJXVScwZfcIxxJbUT0WKJCNFp76e4dBRUGV33p CFfRltMyZ9LwTlbayH7ZZEfJid42tO3K6O7o3+OVXIoXYLHFkNt5xG4a5A8z5SezXBw3X aOdQMi5lXKAfTDRndlbHAqvPfzj4UR68GIYLjb9acOMco47IRgeE3s8qJ/i0kzGytR3U9 edmzQHrvnZLJkegDpBQZsXfy9psT8IW9pnUTnhYGqRhBfm8G8Hf4JtIZRJYmjA9QrYw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380434; 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=1CQ4DjMhwGUzTyvgaVkQVL+9eRH53FCu5lQM8h7YGLg=; b=dnNr7AiUbFgyOO5MyasKhzoTk+ictoyEQaQ0dWkTymQzD+RGZY5+5Jjsgw9yFKhoZAqk 5Ck53TXo4gI2yxzGZN3WUfRAWdzddkeVtwBWMJG03cKqKNSKefPxS7FubxzAEKcNxKWNV U6lhe3CGbQJ9ZhnXIFM910epiz12UIRtj5MwgPh9o2QLqfl9LnwSRS+fhMWVJ102MfsZR LmbsYB6eB+Db9dUcPmWY7aSw3l6evUWGbMG+u9CGNNTtS4L84L2I0O2chtm9Cx8JRR6/F 1hxs44SVz+BbHsZSeBxfnbtaQw7APGdalcX+nDe6vNXIGUgWJgp5V21vRjhxiU2BBxw== 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=FfZky8Ec; 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 45988606A688; Fri, 4 Dec 2026 10:33:53 +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=FfZky8Ec Received: by smtp.kernel.org (Postfix) with ESMTPSA id 404691F000CE; Fri, 4 Dec 2026 10:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380433; bh=1CQ4DjMhwGUzTyvgaVkQVL+9eRH53FCu5lQM8h7YGLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FfZky8EctF2ARJNLP+deeN/Cb8WJ8CVdEXC1BKIwBjfiH7nSv23K5fQoQgEjl0kef SLg0nXCOYPHKZ/xlwL4cnOLQ74clQ3M6g6CaZN5JnxxUw2rnKFqwo7Aj4oAq5xLi3A nURFAPTgu395s79iV3DB6q2sfNXDzYJqXf925s1o= 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 7.3 264/742] gpiolib: fix inverted trace values in gpiod_get_array_value() Date: Fri, 4 Dec 2026 19:02:08 +0900 Message-ID: <20261204100642.076543826@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev 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 7.3-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 a16a787c58cbd..53d123661ebeb 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -3623,10 +3623,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