Skip to contentSkip to conversation

FAILED: patch "[PATCH] iio: adc: rtq6056: Correct the sign bit index" failed to apply to 6.1-stable tree

PATCH New [email protected] 2 participants 2 messages Dec 1, 2025

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 9b45744bf09fc2a3287e05287141d6e123c125a7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025120113-employed-paddle-1a20@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 9b45744bf09fc2a3287e05287141d6e123c125a7 Mon Sep 17 00:00:00 2001
From: ChiYuan Huang <[email protected]>
Date: Thu, 18 Sep 2025 11:10:59 +0800
Subject: [PATCH] iio: adc: rtq6056: Correct the sign bit index

The vshunt/current reported register is a signed 16bit integer. The sign bit index should be '15', not '16'.

Fixes 4396f45d211b ("iio: adc: Add rtq6056 support")
drivers/iio/adc/rtq6056.c +1 -1
index ad9738228b7f..2bf3a09ac6b0 100644
@@ -300,7 +300,7 @@ static int rtq6056_adc_read_channel(struct rtq6056_priv *priv,
 		return IIO_VAL_INT;
 	case RTQ6056_REG_SHUNTVOLT:
 	case RTQ6056_REG_CURRENT:
-		*val = sign_extend32(regval, 16);
+		*val = sign_extend32(regval, 15);
 		return IIO_VAL_INT;
 	default:
 		return -EINVAL;
maintainer
#1 lore raw

PATCH 1/1 iio: adc: rtq6056: Correct the sign bit index

From: ChiYuan Huang <[email protected]>

[ Upstream commit 9b45744bf09fc2a3287e05287141d6e123c125a7 ]

The vshunt/current reported register is a signed 16bit integer. The sign bit index should be '15', not '16'.

Fixes 4396f45d211b ("iio: adc: Add rtq6056 support")
[ adapted switch statement to existing if-else structure for sign_extend32() fix ]
---
 drivers/iio/adc/rtq6056.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/rtq6056.c +1 -1
index c1b2e8dc9a266..04ce542f8ab3f 100644
@@ -171,7 +171,7 @@ static int rtq6056_adc_read_channel(struct rtq6056_priv *priv,
 	if (addr == RTQ6056_REG_BUSVOLT || addr == RTQ6056_REG_POWER)
 		*val = regval;
 	else
-		*val = sign_extend32(regval, 16);
+		*val = sign_extend32(regval, 15);
 
 	return IIO_VAL_INT;
 }
Signature · 1 line
2.51.0