Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH 15/32] media: i2c: mt9v111: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/mt9v111.c:1143:3-10: WARNING: Consider using %pe to print PTR_ERR()
./i2c/mt9v111.c:1151:3-10: WARNING: Consider using %pe to print PTR_ERR()
./i2c/mt9v111.c:1159:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/mt9v111.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index b4f2703faa1854a3a5e7d92ef312d01a39879a5a..64a758c95ab7b767de452304615a8d1f986dd23d 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -1139,24 +1139,24 @@ static int mt9v111_probe(struct i2c_client *client)
 	mt9v111->oe = devm_gpiod_get_optional(&client->dev, "enable",
 					      GPIOD_OUT_LOW);
 	if (IS_ERR(mt9v111->oe)) {
-		dev_err(&client->dev, "Unable to get GPIO \"enable\": %ld\n",
-			PTR_ERR(mt9v111->oe));
+		dev_err(&client->dev, "Unable to get GPIO \"enable\": %pe\n",
+			mt9v111->oe);
 		return PTR_ERR(mt9v111->oe);
 	}
 
 	mt9v111->standby = devm_gpiod_get_optional(&client->dev, "standby",
 						   GPIOD_OUT_HIGH);
 	if (IS_ERR(mt9v111->standby)) {
-		dev_err(&client->dev, "Unable to get GPIO \"standby\": %ld\n",
-			PTR_ERR(mt9v111->standby));
+		dev_err(&client->dev, "Unable to get GPIO \"standby\": %pe\n",
+			mt9v111->standby);
 		return PTR_ERR(mt9v111->standby);
 	}
 
 	mt9v111->reset = devm_gpiod_get_optional(&client->dev, "reset",
 						 GPIOD_OUT_LOW);
 	if (IS_ERR(mt9v111->reset)) {
-		dev_err(&client->dev, "Unable to get GPIO \"reset\": %ld\n",
-			PTR_ERR(mt9v111->reset));
+		dev_err(&client->dev, "Unable to get GPIO \"reset\": %pe\n",
+			mt9v111->reset);
 		return PTR_ERR(mt9v111->reset);
 	}
 

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 12/32] media: i2c: max9286: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/max9286.c:755:7-14: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/max9286.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
index 7c0961688d6173843f3ae846253d4a8669ae762b..e6e214f8294b83105be02f29966e1d3ed72f8dbe 100644
--- a/drivers/media/i2c/max9286.c
+++ b/drivers/media/i2c/max9286.c
@@ -751,8 +751,8 @@ static int max9286_v4l2_notifier_register(struct max9286_priv *priv)
 		mas = v4l2_async_nf_add_fwnode(&priv->notifier, source->fwnode,
 					       struct max9286_asd);
 		if (IS_ERR(mas)) {
-			dev_err(dev, "Failed to add subdev for source %u: %ld",
-				i, PTR_ERR(mas));
+			dev_err(dev, "Failed to add subdev for source %u: %pe",
+				i, mas);
 			v4l2_async_nf_cleanup(&priv->notifier);
 			return PTR_ERR(mas);
 		}

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 14/32] media: i2c: mt9m111: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/mt9m111.c:1290:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/mt9m111.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
index 05dcf37c6f013b1cefb5d85f893af08f4533c7b4..3532c7c38becc21df88957f8f323c77033026a81 100644
--- a/drivers/media/i2c/mt9m111.c
+++ b/drivers/media/i2c/mt9m111.c
@@ -1286,8 +1286,8 @@ static int mt9m111_probe(struct i2c_client *client)
 
 	mt9m111->regulator = devm_regulator_get(&client->dev, "vdd");
 	if (IS_ERR(mt9m111->regulator)) {
-		dev_err(&client->dev, "regulator not found: %ld\n",
-			PTR_ERR(mt9m111->regulator));
+		dev_err(&client->dev, "regulator not found: %pe\n",
+			mt9m111->regulator);
 		return PTR_ERR(mt9m111->regulator);
 	}
 

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 11/32] media: i2c: imx412: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/imx412.c:931:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/imx412.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/imx412.c b/drivers/media/i2c/imx412.c
index 7bbd639a9ddfa7fa76d3a4594be1e1c4d002c98a..b3826f80354703b17b416dc233854da3f5736e38 100644
--- a/drivers/media/i2c/imx412.c
+++ b/drivers/media/i2c/imx412.c
@@ -927,8 +927,8 @@ static int imx412_parse_hw_config(struct imx412 *imx412)
 	imx412->reset_gpio = devm_gpiod_get_optional(imx412->dev, "reset",
 						     GPIOD_OUT_LOW);
 	if (IS_ERR(imx412->reset_gpio)) {
-		dev_err(imx412->dev, "failed to get reset gpio %ld\n",
-			PTR_ERR(imx412->reset_gpio));
+		dev_err(imx412->dev, "failed to get reset gpio %pe\n",
+			imx412->reset_gpio);
 		return PTR_ERR(imx412->reset_gpio);
 	}
 

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 13/32] media: i2c: max96717: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/max96717.c:653:44-51: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/max96717.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c
index c8ae7890d9fa87a78084df1f3be631004acbf57b..71ec4fdb8e3d96dddc23ab090a63b23b1d093fd4 100644
--- a/drivers/media/i2c/max96717.c
+++ b/drivers/media/i2c/max96717.c
@@ -650,7 +650,7 @@ static int max96717_v4l2_notifier_register(struct max96717_priv *priv)
 	fwnode_handle_put(ep_fwnode);
 
 	if (IS_ERR(asd)) {
-		dev_err(dev, "Failed to add subdev: %ld", PTR_ERR(asd));
+		dev_err(dev, "Failed to add subdev: %pe", asd);
 		v4l2_async_nf_cleanup(&priv->notifier);
 		return PTR_ERR(asd);
 	}

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 10/32] media: i2c: imx335: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/imx335.c:1013:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/imx335.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
index c043df2f15fb25b3a56422092f99a1fd9a508fa9..71ed9a0d84a252ee362621c4d38001508fb86d28 100644
--- a/drivers/media/i2c/imx335.c
+++ b/drivers/media/i2c/imx335.c
@@ -1009,8 +1009,8 @@ static int imx335_parse_hw_config(struct imx335 *imx335)
 	imx335->reset_gpio = devm_gpiod_get_optional(imx335->dev, "reset",
 						     GPIOD_OUT_HIGH);
 	if (IS_ERR(imx335->reset_gpio)) {
-		dev_err(imx335->dev, "failed to get reset gpio %ld\n",
-			PTR_ERR(imx335->reset_gpio));
+		dev_err(imx335->dev, "failed to get reset gpio %pe\n",
+			imx335->reset_gpio);
 		return PTR_ERR(imx335->reset_gpio);
 	}
 

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 09/32] media: i2c: imx274: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/imx274.c:2038:32-39: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/imx274.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index d86d08c29174584b26e109a7858542313219c19a..8ec78b60bea6d47d2088b8251b679224e0d34980 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -2034,8 +2034,7 @@ static int imx274_probe(struct i2c_client *client)
 	/* initialize regmap */
 	imx274->regmap = devm_regmap_init_i2c(client, &imx274_regmap_config);
 	if (IS_ERR(imx274->regmap)) {
-		dev_err(dev,
-			"regmap init failed: %ld\n", PTR_ERR(imx274->regmap));
+		dev_err(dev, "regmap init failed: %pe\n", imx274->regmap);
 		ret = -ENODEV;
 		goto err_regmap;
 	}

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 07/32] media: i2c: ds90ub913: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/ds90ub913.c:625:44-51: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/ds90ub913.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c
index 73150061ea458937ae4ba7a937ea030b0d98bce3..e97e499b04e6c2700d7d433ccb4fdc57ff12b586 100644
--- a/drivers/media/i2c/ds90ub913.c
+++ b/drivers/media/i2c/ds90ub913.c
@@ -622,7 +622,7 @@ static int ub913_v4l2_notifier_register(struct ub913_data *priv)
 	fwnode_handle_put(ep_fwnode);
 
 	if (IS_ERR(asd)) {
-		dev_err(dev, "Failed to add subdev: %ld", PTR_ERR(asd));
+		dev_err(dev, "Failed to add subdev: %pe", asd);
 		v4l2_async_nf_cleanup(&priv->notifier);
 		return PTR_ERR(asd);
 	}

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 08/32] media: i2c: ds90ub953: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/ds90ub953.c:779:44-51: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/ds90ub953.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c
index e3fc9d66970a762d284955f14db48d7105b4b8c4..087bb4ea555977692c66387a43dab54c12134e60 100644
--- a/drivers/media/i2c/ds90ub953.c
+++ b/drivers/media/i2c/ds90ub953.c
@@ -776,7 +776,7 @@ static int ub953_v4l2_notifier_register(struct ub953_data *priv)
 	fwnode_handle_put(ep_fwnode);
 
 	if (IS_ERR(asd)) {
-		dev_err(dev, "Failed to add subdev: %ld", PTR_ERR(asd));
+		dev_err(dev, "Failed to add subdev: %pe", asd);
 		v4l2_async_nf_cleanup(&priv->notifier);
 		return PTR_ERR(asd);
 	}

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 06/32] media: ccs: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./i2c/ccs/ccs-core.c:3241:3-10: WARNING: Consider using %pe to print PTR_ERR()
./i2c/ccs/ccs-core.c:3298:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/ccs/ccs-core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index 1c889c878abd3aeb1b7a887cff29b5eb864ab057..f8523140784c7120eaf018ffa9e3b43ea12ef72f 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -3237,8 +3237,8 @@ static int ccs_probe(struct i2c_client *client)
 		dev_info(&client->dev, "no clock defined, continuing...\n");
 		sensor->ext_clk = NULL;
 	} else if (IS_ERR(sensor->ext_clk)) {
-		dev_err(&client->dev, "could not get clock (%ld)\n",
-			PTR_ERR(sensor->ext_clk));
+		dev_err(&client->dev, "could not get clock (%pe)\n",
+			sensor->ext_clk);
 		return -EPROBE_DEFER;
 	}
 
@@ -3294,8 +3294,8 @@ static int ccs_probe(struct i2c_client *client)
 
 	sensor->regmap = devm_cci_regmap_init_i2c(client, 16);
 	if (IS_ERR(sensor->regmap)) {
-		dev_err(&client->dev, "can't initialise CCI (%ld)\n",
-			PTR_ERR(sensor->regmap));
+		dev_err(&client->dev, "can't initialise CCI (%pe)\n",
+			sensor->regmap);
 		return PTR_ERR(sensor->regmap);
 	}
 

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 04/32] media: adv7842: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./i2c/adv7842.c:3470:16-23: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/adv7842.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index 9780082db8415a3d65860666d0dce8399f57e4e3..a35077178a0950090369e17b4aaf9904da041a00 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -3466,8 +3466,8 @@ static struct i2c_client *adv7842_dummy_client(struct v4l2_subdev *sd, const cha
 
 	cp = i2c_new_dummy_device(client->adapter, io_read(sd, io_reg) >> 1);
 	if (IS_ERR(cp)) {
-		v4l2_err(sd, "register %s on i2c addr 0x%x failed with %ld\n",
-			 desc, addr, PTR_ERR(cp));
+		v4l2_err(sd, "register %s on i2c addr 0x%x failed with %pe\n",
+			 desc, addr, cp);
 		cp = NULL;
 	}
 

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 05/32] media: ar0521: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./i2c/ar0521.c:1113:31-38: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/ar0521.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c
index 939bf590d4b2107c6669b83903028744de1c2b30..f156058500e3dce5d7b5b831bf8ec4056e49ad5b 100644
--- a/drivers/media/i2c/ar0521.c
+++ b/drivers/media/i2c/ar0521.c
@@ -1109,8 +1109,8 @@ static int ar0521_probe(struct i2c_client *client)
 						ar0521_supply_names[cnt]);
 
 		if (IS_ERR(supply)) {
-			dev_info(dev, "no %s regulator found: %li\n",
-				 ar0521_supply_names[cnt], PTR_ERR(supply));
+			dev_info(dev, "no %s regulator found: %pe\n",
+				 ar0521_supply_names[cnt], supply);
 			return PTR_ERR(supply);
 		}
 		sensor->supplies[cnt] = supply;

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 02/32] media: dvbdev: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./dvb-core/dvbdev.c:575:48-55: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/dvb-core/dvbdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 9df7c213716aec54bab7fde2c94ac030696fe25f..8b980d371a45e4fec5368a7e90d4c42518b72e72 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -571,8 +571,8 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 			       MKDEV(DVB_MAJOR, minor),
 			       dvbdev, "dvb%d.%s%d", adap->num, dnames[type], id);
 	if (IS_ERR(clsdev)) {
-		pr_err("%s: failed to create device dvb%d.%s%d (%ld)\n",
-		       __func__, adap->num, dnames[type], id, PTR_ERR(clsdev));
+		pr_err("%s: failed to create device dvb%d.%s%d (%pe)\n",
+		       __func__, adap->num, dnames[type], id, clsdev);
 		if (new_node) {
 			list_del(&new_node->list_head);
 			kfree(dvbdevfops);

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 03/32] media: mn88443x: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./dvb-frontends/mn88443x.c:698:3-10: WARNING: Consider using %pe to print PTR_ERR()
./dvb-frontends/mn88443x.c:713:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/dvb-frontends/mn88443x.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb-frontends/mn88443x.c b/drivers/media/dvb-frontends/mn88443x.c
index 7a58f53ab9996031e319711a21b1a8f1c13abed4..818c4e67364c7c6ec2bfc17f21e2cac360f6bfb3 100644
--- a/drivers/media/dvb-frontends/mn88443x.c
+++ b/drivers/media/dvb-frontends/mn88443x.c
@@ -694,8 +694,7 @@ static int mn88443x_probe(struct i2c_client *client)
 
 	chip->mclk = devm_clk_get(dev, "mclk");
 	if (IS_ERR(chip->mclk) && !conf) {
-		dev_err(dev, "Failed to request mclk: %ld\n",
-			PTR_ERR(chip->mclk));
+		dev_err(dev, "Failed to request mclk: %pe\n", chip->mclk);
 		return PTR_ERR(chip->mclk);
 	}
 
@@ -709,8 +708,8 @@ static int mn88443x_probe(struct i2c_client *client)
 	chip->reset_gpio = devm_gpiod_get_optional(dev, "reset",
 						   GPIOD_OUT_HIGH);
 	if (IS_ERR(chip->reset_gpio)) {
-		dev_err(dev, "Failed to request reset_gpio: %ld\n",
-			PTR_ERR(chip->reset_gpio));
+		dev_err(dev, "Failed to request reset_gpio: %pe\n",
+			chip->reset_gpio);
 		return PTR_ERR(chip->reset_gpio);
 	}
 

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 01/32] Input: cyttsp5 - Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda
In-Reply-To: <20251013-ptr_err-v1-0-2c5efbd82952@chromium.org>

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./cyttsp5.c:927:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/input/touchscreen/cyttsp5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
index 071b7c9bf566eb0b58e302a941ec085be1eb5683..47f4271395a69b8350f9be7266b57fe11d442ee3 100644
--- a/drivers/input/touchscreen/cyttsp5.c
+++ b/drivers/input/touchscreen/cyttsp5.c
@@ -923,8 +923,8 @@ static int cyttsp5_i2c_probe(struct i2c_client *client)
 
 	regmap = devm_regmap_init_i2c(client, &config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "regmap allocation failed: %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&client->dev, "regmap allocation failed: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 

-- 
2.51.0.760.g7b8bcc2412-goog


^ permalink raw reply related

* [PATCH 00/32] media: Use %pe format specifier
From: Ricardo Ribalda @ 2025-10-13 14:14 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov, Mauro Carvalho Chehab,
	Hans Verkuil, Sakari Ailus, Krzysztof Hałasa, Tomi Valkeinen,
	Leon Luo, Kieran Bingham, Jacopo Mondi, Kieran Bingham,
	Laurent Pinchart, Niklas Söderlund, Julien Massot,
	Jacopo Mondi, Daniel Scally, Dave Stevenson, Benjamin Mugnier,
	Sylvain Petinot, Yong Zhi, Bingbu Cao, Tianshu Qiu, Tiffany Lin,
	Andrew-CT Chen, Yunfei Dong, Matthias Brugger,
	AngeloGioacchino Del Regno, Rui Miguel Silva, Laurent Pinchart,
	Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Dafna Hirschfeld,
	Heiko Stuebner, Sylwester Nawrocki, Krzysztof Kozlowski,
	Alim Akhtar, Yemike Abhilash Chandra, Greg Kroah-Hartman
  Cc: linux-input, linux-kernel, linux-media, linux-arm-kernel,
	linux-mediatek, imx, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, linux-staging, Ricardo Ribalda

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

The recently introduced test scripts/coccinelle/misc/ptr_err_to_pe.cocci
checks that we use %pe. Let's make it happy.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Ricardo Ribalda (32):
      Input: cyttsp5 - Use %pe format specifier
      media: dvbdev: Use %pe format specifier
      media: mn88443x: Use %pe format specifier
      media: adv7842: Use %pe format specifier
      media: ar0521: Use %pe format specifier
      media: ccs: Use %pe format specifier
      media: i2c: ds90ub913: Use %pe format specifier
      media: i2c: ds90ub953: Use %pe format specifier
      media: i2c: imx274: Use %pe format specifier
      media: i2c: imx335: Use %pe format specifier
      media: i2c: imx412: Use %pe format specifier
      media: i2c: max9286: Use %pe format specifier
      media: i2c: max96717: Use %pe format specifier
      media: i2c: mt9m111: Use %pe format specifier
      media: i2c: mt9v111: Use %pe format specifier
      media: i2c: ov5675: Use %pe format specifier
      media: i2c: ov5693: Use %pe format specifier
      media: i2c: ov9282: Use %pe format specifier
      media: rj54n1cb0c: Use %pe format specifier
      media: i2c: st-mipid02: Use %pe format specifier
      media: ipu-bridge: Use %pe format specifier
      media: ipu3-cio2: Use %pe format specifier
      media: ipu6: isys: Use %pe format specifier
      media: mediatek: vcodec: Use %pe format specifier
      media: imx8mq-mipi-csi2: Use %pe format specifier
      media: platform: rzg2l-cru: Use %pe format specifier
      media: renesas: vsp1: Use %pe format specifier
      media: rkisp1: Use %pe format specifier
      media: samsung: exynos4-is: Use %pe format specifier
      media: ti: cal Use %pe format specifier
      media: staging: ipu3-imgu: Use %pe format specifier
      media: staging/ipu7: Use %pe format specifier

 drivers/input/touchscreen/cyttsp5.c                          |  4 ++--
 drivers/media/dvb-core/dvbdev.c                              |  4 ++--
 drivers/media/dvb-frontends/mn88443x.c                       |  7 +++----
 drivers/media/i2c/adv7842.c                                  |  4 ++--
 drivers/media/i2c/ar0521.c                                   |  4 ++--
 drivers/media/i2c/ccs/ccs-core.c                             |  8 ++++----
 drivers/media/i2c/ds90ub913.c                                |  2 +-
 drivers/media/i2c/ds90ub953.c                                |  2 +-
 drivers/media/i2c/imx274.c                                   |  3 +--
 drivers/media/i2c/imx335.c                                   |  4 ++--
 drivers/media/i2c/imx412.c                                   |  4 ++--
 drivers/media/i2c/max9286.c                                  |  4 ++--
 drivers/media/i2c/max96717.c                                 |  2 +-
 drivers/media/i2c/mt9m111.c                                  |  4 ++--
 drivers/media/i2c/mt9v111.c                                  | 12 ++++++------
 drivers/media/i2c/ov5675.c                                   |  4 ++--
 drivers/media/i2c/ov5693.c                                   |  4 ++--
 drivers/media/i2c/ov9282.c                                   |  4 ++--
 drivers/media/i2c/rj54n1cb0c.c                               |  8 ++++----
 drivers/media/i2c/st-mipid02.c                               |  4 ++--
 drivers/media/pci/intel/ipu-bridge.c                         |  4 ++--
 drivers/media/pci/intel/ipu3/ipu3-cio2.c                     |  4 ++--
 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c                |  4 ++--
 .../media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c |  4 ++--
 drivers/media/platform/nxp/imx8mq-mipi-csi2.c                |  4 ++--
 drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c        |  8 ++++----
 drivers/media/platform/renesas/vsp1/vsp1_drv.c               |  3 +--
 drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c          |  4 ++--
 drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c          |  4 ++--
 drivers/media/platform/samsung/exynos4-is/media-dev.c        |  4 ++--
 drivers/media/platform/ti/cal/cal.c                          |  3 +--
 drivers/staging/media/ipu3/ipu3.c                            |  3 +--
 drivers/staging/media/ipu7/ipu7-isys-csi-phy.c               |  4 ++--
 drivers/staging/media/ipu7/ipu7-isys-csi2.c                  |  4 ++--
 34 files changed, 72 insertions(+), 77 deletions(-)
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251013-ptr_err-9a7968fcd19f

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>


^ permalink raw reply

* Re: [PATCH v3 04/11] HID: haptic: introduce hid_haptic_device
From: Jonathan Denose @ 2025-10-13 13:19 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Thorsten Leemhuis, Jiri Kosina, Benjamin Tissoires,
	Dmitry Torokhov, Jonathan Corbet, Henrik Rydberg, linux-input,
	linux-kernel, linux-doc, Angela Czubak, Sean O'Brien,
	Lucas GISSOT
In-Reply-To: <04df1bb8-8409-4ece-a21c-4c71592eb852@infradead.org>

On Fri, Oct 10, 2025 at 5:52 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
>
>
> On 10/10/25 1:30 PM, Jonathan Denose wrote:
> > Hi all,
> >
> > Thanks for looking into this.
> >
> > On Fri, Oct 10, 2025 at 1:55 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>
> >> Hi,
> >>
> >> I think I found it... see below.
> >>
> >>
> >> On 10/9/25 11:48 PM, Thorsten Leemhuis wrote:
> >>> [Top-Posting for easier consumption]
> >>>
> >>> Mainly writing this mail to bring Lucas GISSOT in here, who reported the
> >>> same error yesterday here:
> >>> https://lore.kernel.org/all/aOgvA8Jiofcnk2xb@ARSENIURE.localdomain/
> >>>
> >>> Lucas there suggested:
> >>> """but it seems to me that the #if IS_ENABLED(CONFIG_HID_HAPTIC) in
> >>> hid-haptic.h should be replaced by IS_BUILTIN(CONFIG_HID_HAPTIC) and
> >>> Kconfig updated."""
> >>>
> >>> And Randy: Thx for the closer investigation! It explains some of the
> >>> "that feels odd, am I holding this wrong" feeling I had when reporting this.
> >>>
> >>> Ciao, Thorsten
> >>>
> >>> On 10/10/25 06:50, Randy Dunlap wrote:
> >>>> On 10/9/25 7:43 AM, Thorsten Leemhuis wrote:
> >>>>> On 8/19/25 01:08, Jonathan Denose wrote:
> >>>>>> From: Angela Czubak <aczubak@google.com>
> >>>>>>
> >>>>>> Define a new structure that contains simple haptic device configuration
> >>>>>> as well as current state.
> >>>>>> Add functions that recognize auto trigger and manual trigger reports
> >>>>>> as well as save their addresses.Hi,
> >>>>>> Verify that the pressure unit is either grams or newtons.
> >>>>>> Mark the input device as a haptic touchpad if the unit is correct and
> >>>>>> the reports are found.
> >>>>>>  [...]
> >>>>>> +config HID_HAPTIC
> >>>>>> +  tristate "Haptic touchpad support"
> >>>>>> +  default n
> >>>>>> +  help
> >>>>>> +  Support for touchpads with force sensors and haptic actuators instead of a
> >>>>>> +  traditional button.
> >>>>>> +  Adds extra parsing and FF device for the hid multitouch driver.
> >>>>>> +  It can be used for Elan 2703 haptic touchpad.
> >>>>>> +
> >>>>>> +  If unsure, say N.
> >>>>>> +
> >>>>>>  menu "Special HID drivers"
> >>>>>
> >>>>> I suspect this change is related to a build error I ran into today:
> >>>>>
> >>>>>   MODPOST Module.symvers
> >>>>> ERROR: modpost: "hid_haptic_init" [drivers/hid/hid-multitouch.ko] undefined!
> >>>>> ERROR: modpost: "hid_haptic_pressure_increase" [drivers/hid/hid-multitouch.ko] undefined!
> >>>>> ERROR: modpost: "hid_haptic_check_pressure_unit" [drivers/hid/hid-multitouch.ko] undefined!
> >>>>> ERROR: modpost: "hid_haptic_input_configured" [drivers/hid/hid-multitouch.ko] undefined!
> >>>>> ERROR: modpost: "hid_haptic_input_mapping" [drivers/hid/hid-multitouch.ko] undefined!
> >>>>> ERROR: modpost: "hid_haptic_feature_mapping" [drivers/hid/hid-multitouch.ko] undefined!
> >>>>> ERROR: modpost: "hid_haptic_pressure_reset" [drivers/hid/hid-multitouch.ko] undefined!
> >>>>> make[3]: *** [/home/thl/var/linux.dev/scripts/Makefile.modpost:147: Module.symvers] Error 1
> >>>>>
> >>>>> The config where this occurred had this:
> >>>>>
> >>>>> CONFIG_HID=y
> >>>>> CONFIG_HID_MULTITOUCH=m
> >>>>> CONFIG_HID_HAPTIC=m
> >>>>>
> >>>>> Changing the latter to "CONFIG_HID_HAPTIC=y" fixed the problem for me.
> >>>>
> >>>> Sure, but that's just covering up the problem.
> >>>>> First, I get this build error:
> >>>>
> >>>> ERROR: modpost: missing MODULE_LICENSE() in drivers/hid/hid-haptic.o
> >>>> WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hid/hid-haptic.o
> >>>>
> >>
> >> ISTM that tristate is incompatible with this newly added Makefile
> >> line:
> >>
> >> +hid-$(CONFIG_HID_HAPTIC)       += hid-haptic.o
> >>
> >> hid-* lists files that should be builtin, not loadable modules.
> >> These should all be hid-y.  AFAIK, hid-m is not useful.
> >> (A maintainer can correct me as needed.)
>
> More correctly, any .o that is listed as being built as part of
> hid.o should is going to be controlled by CONFIG_HID and should
> not its own have a Kconfig symbol at all.
>
> E.g. here:
>  hid-y                  := hid-core.o hid-input.o hid-quirks.o
> hid-core, hid-input, and hid-quirks don't have their own
> Kconfig symbols.
>
>
>
> >> So adding a MODULE_LICENSE() and MODULE_DESCRIPTION() to
> >> hid-haptic.c and changing drivers/hid/Makefile to use
> >> obj-$(CONFIG_HID_HAPTIC_        += hid-haptic.o
> >>
> >> fixes the build errors for me.
> >>
> >> Angela, Jonathan D., is there any reason that
> >> hid-haptic needs to be builtin instead of a loadable
> >> module?  It's no problem for hid-multitouch.ko to call
> >> into hid-haptic.ko (both as loadable modules) as long as
> >> hid-haptic.ko is loaded first.
> >>
> > As long as hid-multitouch.ko is able to call into hid-haptic.ko I
> > don't see any issues, but is there a way to enforce that when
> > CONFIG_HID_HAPTIC is enabled, hid-haptic.ko will be loaded before
> > hid-multitouch.ko?
>
> I only know of two possibilities though there may be more.
>
> a. use request_module(true, "hid-haptic");
>
> This would probably be used in the hid core somewhere, afterthe device matching is done.
>
> b. use udev. When a device that needs hid-multitouch is
> discovered, have udev load both hid-haptic and hid-multitouch.
>
>
> I see that hid-haptic.h is written so that it has stubs for
> when CONFIG_HID_HAPTIC is not enabled. Can hid-multitouch
> operate (in a reduced capacity) when HID_HAPTIC is not enabled?
> So that they are separate modules and hid-multitouch is not
> dependent on hid-haptic?
>
> There is probably a use case for hid-multitouch without having
> hid-haptic loaded since hid-multitouch existed without having
> hid-haptic around at all.
>
> It seems that you want both of them loaded. And then Lucas
> has reported a build error when HID_HAPTIC=m and
> HID_MULTITOUCH=y, so either (like Lucas said) HID_HAPTIC
> should be bool, not tristate; or in Kconfig,
> HID_MULTITOUCH should depend on HID_HAPTIC, which would not
> allow the problem config that Lucas reported.
> But that forces devices that want HID_MULTITOUCH to also
> have HID_HAPTIC loaded, even though they may not need it.
>
The idea behind these patches was that hid-haptic would depend on
hid-multitouch but not the other way around. I am fine changing
HID_HAPTIC to bool. That's what I had it as initially, but I was asked
to change it.

If everyone else is fine with that, I can send out a patch.
> --
> ~Randy
>
-- 
Jonathan

^ permalink raw reply

* Re: [QUESTION] Plans for GDIX1003 Support in Goodix Touchscreen Driver
From: Hans de Goede @ 2025-10-13 12:15 UTC (permalink / raw)
  To: Salvatore Bonaccorso
  Cc: Weikang Guo, Bastien Nocera, Dmitry Torokhov, linux-kernel,
	linux-input, Raphael La Greca
In-Reply-To: <aOyleKvZe336pSSx@eldamar.lan>

Hi,

On 13-Oct-25 9:08 AM, Salvatore Bonaccorso wrote:
> Hi,
> 
> On Sat, Mar 01, 2025 at 12:36:40PM +0100, Hans de Goede wrote:
>> Hi WeiKang,
>>
>> On 27-Feb-25 12:36 PM, Weikang Guo wrote:
>>> Hi, Hans
>>>
>>> On Tue, 25 Feb 2025 at 20:09, Hans de Goede <hdegoede@redhat.com> wrote:
>>>>
>>>> Hi WeiKang,
>>>>
>>>> On 25-Feb-25 3:04 AM, Weikang Guo wrote:
>>>>> Hi Bastien, Hans, Dmitry,
>>>>>
>>>>> I am currently working on the Ayaneo Flip DS device, which I installed Kali
>>>>> Linux with kernel version 6.8.11-amd. This device has two touchscreens,
>>>>> but only one is functional. After investigating, I found that the second
>>>>> touchscreen has the device ID GDIX1003(confirmed by exporting the results
>>>>> through acpidump), and upon comparing with the current driver, I noticed
>>>>> that only GDIX1001, GDIX1002, and GDX9110 are supported.
>>>>>
>>>>> I have also reviewed the ACPI description and can provide the details if
>>>>> needed. Any guidance or updates on this would be greatly appreciated.
>>>>
>>>> I think this might just work with the existing goodix driver, just
>>>> add the new GDIX1003 HID to the goodix_acpi_match table:
>>>>
>>>> diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
>>>> index a3e8a51c9144..4b497540ed2d 100644
>>>> --- a/drivers/input/touchscreen/goodix.c
>>>> +++ b/drivers/input/touchscreen/goodix.c
>>>> @@ -1519,6 +1519,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
>>>>  static const struct acpi_device_id goodix_acpi_match[] = {
>>>>         { "GDIX1001", 0 },
>>>>         { "GDIX1002", 0 },
>>>> +       { "GDIX1003", 0 },
>>>>         { "GDX9110", 0 },
>>>>         { }
>>>>  };
>>>>
>>>> Note I'm not sure this will work, but is worth a try.
>>>>
>>>
>>> It works, thank you very much.
>>
>> Thank you for testing.
>>
>> I've submitted a patch upstream to add this new hardware-ID
>> to the kernel:
>>
>> https://lore.kernel.org/linux-input/20250301113525.6997-1-hdegoede@redhat.com/
> 
> Raphael La Greca has reported this issue as well in Debian at
> https://lists.debian.org/debian-kernel/2025/10/msg00013.html an
> confirmed the change to work.
> 
> Any chance this can be applied as proposed? Did the patch submission
> felt trought the cracks?

It indeed looks like the patch fell through the cracks. I've just resend it.

Regards,

Hans



^ permalink raw reply

* [PATCH resend] Input: goodix - add support for ACPI ID GDIX1003
From: Hans de Goede @ 2025-10-13 12:10 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Hans de Goede, Bastien Nocera, linux-input, Hans de Goede,
	Weikang Guo

From: Hans de Goede <hdegoede@redhat.com>

Some newer devices use an ACPI hardware ID of GDIX1003 for their Goodix
touchscreen controller, instead of GDIX1001 / GDIX1002. Add GDIX1003
to the goodix_acpi_match[] table.

Reported-by: Weikang Guo <guoweikang.kernel@gmail.com>
Closes: https://lore.kernel.org/linux-input/20250225024409.1467040-1-guoweikang.kernel@gmail.com/
Tested-by: Weikang Guo <guoweikang.kernel@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/input/touchscreen/goodix.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index 252dcae039f8..5551decb8d22 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -1557,6 +1557,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
 static const struct acpi_device_id goodix_acpi_match[] = {
 	{ "GDIX1001", 0 },
 	{ "GDIX1002", 0 },
+	{ "GDIX1003", 0 },
 	{ "GDX9110", 0 },
 	{ }
 };
-- 
2.51.0


^ permalink raw reply related

* Re: [PATCH v2] HID: quirks: Add device descriptor for 4c4a:4155
From: zhangheng @ 2025-10-13  8:32 UTC (permalink / raw)
  To: Linux Hid, jikos, bentiss, staffan.melin
  Cc: linux-input, linux-kernel, 1114557
In-Reply-To: <e0dde746-3761-414e-8df1-eb8557cadbf8@cosmicgizmosystems.com>

It happened to be the holiday, so communication was a bit troublesome.

However, after a brief discussion with the microphone manufacturer,

it was found that the serial number was still 20201111000001 on another

microphone device. So, should we add it?

在 2025/9/29 8:42, Linux Hid 写道:
> Hi Zhang,
>
> The subject doesn't reflect what the patch is doing. You are not adding
> a device descriptor, you are fixing a regression.
>
> On 9/22/2025 7:24 PM, Zhang Heng wrote:
>> Multiple USB devices have the same ID;
>> add device descriptors to distinguish them.
>>
>> Fixes: 1a8953f4f774 ("HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY")
> Should have a Fixes: tag referencing the regression bug.
> Also a CC: tag for 1114557@bugs.debian.org
> Possibly a CC: tag for stable@vger.kernel.org as well?
>
>> Tested-by: staffan.melin@oscillator.se
>> Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
>> ---
>>    drivers/hid/hid-quirks.c | 12 +++++++++++-
>>    1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
>> index ffd034566e2e..d28b180abd72 100644
>> --- a/drivers/hid/hid-quirks.c
>> +++ b/drivers/hid/hid-quirks.c
>> @@ -913,7 +913,6 @@ static const struct hid_device_id hid_ignore_list[] = {
>>    #endif
>>    	{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
>>    	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) },
>> -	{ HID_USB_DEVICE(USB_VENDOR_ID_SMARTLINKTECHNOLOGY, USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155) },
>>    	{ }
>>    };
> Smartlink Technology does not own the 0x4c4a VID or the 0x4155 PID. They
> are an artifact of the Jieli SDK they used in development so the
> #defines should not imply ownership by Smartlink. VID 0x4c4a is
> currently unassigned by the USBIF and is therefore 'reserved'.
>
> Maybe change
> USB_VENDOR_ID_SMARTLINKTECHNOLOGY to USB_VENDOR_ID_JIELI_SDK_DEFAULT
> and
> USB_DEVICE_ID_SMARTLINKTRCHNOLOGY_4155 to USB_DEVICE_ID_JIELI_SDK_4155?
>
>>    
>> @@ -1062,6 +1061,17 @@ bool hid_ignore(struct hid_device *hdev)
>>    					     strlen(elan_acpi_id[i].id)))
>>    					return true;
>>    		break;
>> +	case USB_VENDOR_ID_SMARTLINKTECHNOLOGY:
>> +		/* Multiple USB devices with identical IDs (mic & touchscreen).
>> +		 * The touch screen requires hid core processing, but the
>> +		 * microphone does not. They can be distinguished by manufacturer
>> +		 * and serial number.
>> +		 */
>> +		if (hdev->product == USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155 &&
>> +		    strncmp(hdev->name, "SmartlinkTechnology", 19) == 0 &&
>> +		    strncmp(hdev->uniq, "20201111000001", 14) == 0)
> Using the serial number as a device identifier is somewhat risky. The
> serial number is optional for a USB device but if it is used then it's
> supposed to be unique for each device. Given how horrible the
> configuration and HID descriptors are for this device it's unlikely that
> they went to the trouble to give each unit a unique serial number. But
> you should check a few of the devices (if you have more than one) to
> verify they all have the same 20201111000001 serial number.
>
> It's too bad the bcdHID version test for 0x0201 didn't work. The
> hid->version field is filled by usbhid_probe with bcdDevice before both
> hid_lookup_quirk and hid_ignore are called and then updated with bcdHID
> by usbhid_parse after they have been called.
>
>> +			return true;
>> +		break;
>>    	}
>>    
>>    	if (hdev->type == HID_TYPE_USBMOUSE &&
> Thanks
> Terry

^ permalink raw reply

* Re: [QUESTION] Plans for GDIX1003 Support in Goodix Touchscreen Driver
From: Salvatore Bonaccorso @ 2025-10-13  7:08 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Weikang Guo, Bastien Nocera, Dmitry Torokhov, linux-kernel,
	linux-input, Raphael La Greca
In-Reply-To: <72619870-bf83-47f9-9b66-6678e245364c@redhat.com>

Hi,

On Sat, Mar 01, 2025 at 12:36:40PM +0100, Hans de Goede wrote:
> Hi WeiKang,
> 
> On 27-Feb-25 12:36 PM, Weikang Guo wrote:
> > Hi, Hans
> > 
> > On Tue, 25 Feb 2025 at 20:09, Hans de Goede <hdegoede@redhat.com> wrote:
> >>
> >> Hi WeiKang,
> >>
> >> On 25-Feb-25 3:04 AM, Weikang Guo wrote:
> >>> Hi Bastien, Hans, Dmitry,
> >>>
> >>> I am currently working on the Ayaneo Flip DS device, which I installed Kali
> >>> Linux with kernel version 6.8.11-amd. This device has two touchscreens,
> >>> but only one is functional. After investigating, I found that the second
> >>> touchscreen has the device ID GDIX1003(confirmed by exporting the results
> >>> through acpidump), and upon comparing with the current driver, I noticed
> >>> that only GDIX1001, GDIX1002, and GDX9110 are supported.
> >>>
> >>> I have also reviewed the ACPI description and can provide the details if
> >>> needed. Any guidance or updates on this would be greatly appreciated.
> >>
> >> I think this might just work with the existing goodix driver, just
> >> add the new GDIX1003 HID to the goodix_acpi_match table:
> >>
> >> diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
> >> index a3e8a51c9144..4b497540ed2d 100644
> >> --- a/drivers/input/touchscreen/goodix.c
> >> +++ b/drivers/input/touchscreen/goodix.c
> >> @@ -1519,6 +1519,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
> >>  static const struct acpi_device_id goodix_acpi_match[] = {
> >>         { "GDIX1001", 0 },
> >>         { "GDIX1002", 0 },
> >> +       { "GDIX1003", 0 },
> >>         { "GDX9110", 0 },
> >>         { }
> >>  };
> >>
> >> Note I'm not sure this will work, but is worth a try.
> >>
> > 
> > It works, thank you very much.
> 
> Thank you for testing.
> 
> I've submitted a patch upstream to add this new hardware-ID
> to the kernel:
> 
> https://lore.kernel.org/linux-input/20250301113525.6997-1-hdegoede@redhat.com/

Raphael La Greca has reported this issue as well in Debian at
https://lists.debian.org/debian-kernel/2025/10/msg00013.html an
confirmed the change to work.

Any chance this can be applied as proposed? Did the patch submission
felt trought the cracks?

Regards,
Salvatore

^ permalink raw reply

* [syzbot] [input?] [usb?] KASAN: slab-out-of-bounds Read in mcp2221_raw_event (2)
From: syzbot @ 2025-10-13  4:00 UTC (permalink / raw)
  To: bentiss, jikos, linux-input, linux-kernel, linux-usb,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    ec714e371f22 Merge tag 'perf-tools-for-v6.18-1-2025-10-08'..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15400dcd980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=61ab7fa743df0ec1
dashboard link: https://syzkaller.appspot.com/bug?extid=1018672fe70298606e5f
compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
userspace arch: i386

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4067604ee40d/disk-ec714e37.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6683059d243f/vmlinux-ec714e37.xz
kernel image: https://storage.googleapis.com/syzbot-assets/fcbc710a7633/bzImage-ec714e37.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1018672fe70298606e5f@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88806c49ffff by task kworker/1:4/5894

CPU: 1 UID: 0 PID: 5894 Comm: kworker/1:4 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Workqueue: usb_hub_wq hub_event
Call Trace:
 <IRQ>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xca/0x240 mm/kasan/report.c:482
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
 __hid_input_report drivers/hid/hid-core.c:2139 [inline]
 hid_input_report+0x40a/0x520 drivers/hid/hid-core.c:2166
 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
 __usb_hcd_giveback_urb+0x373/0x540 drivers/usb/core/hcd.c:1661
 dummy_timer+0x85f/0x44c0 drivers/usb/gadget/udc/dummy_hcd.c:1995
 __run_hrtimer kernel/time/hrtimer.c:1777 [inline]
 __hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1841
 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
 handle_softirqs+0x283/0x870 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find arch/x86/kernel/unwind_orc.c:102 [inline]
RIP: 0010:orc_find arch/x86/kernel/unwind_orc.c:227 [inline]
RIP: 0010:unwind_next_frame+0x130e/0x2390 arch/x86/kernel/unwind_orc.c:494
Code: c1 e8 3f 48 01 c8 48 83 e0 fe 4c 8d 3c 45 00 00 00 00 49 01 ef 4c 89 f8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 0f b6 04 08 <84> c0 75 27 49 63 07 4c 01 f8 49 8d 4f 04 4c 39 e0 48 0f 46 e9 49
RSP: 0018:ffffc9000450d6d8 EFLAGS: 00000a07
RAX: 0000000000000000 RBX: ffffffff8fe36e54 RCX: dffffc0000000000
RDX: ffffffff8fe36e54 RSI: ffffffff90773ada RDI: ffffffff8bc07480
RBP: ffffffff8fe36e54 R08: 0000000000000001 R09: ffffffff81731d25
R10: ffffc9000450d7f8 R11: ffffffff81abbce0 R12: ffffffff85ccc8e0
R13: ffffffff8fe36e54 R14: ffffc9000450d7a8 R15: ffffffff8fe36e54
 arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 poison_kmalloc_redzone mm/kasan/common.c:400 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417
 kasan_kmalloc include/linux/kasan.h:262 [inline]
 __kmalloc_cache_noprof+0x3d5/0x6f0 mm/slub.c:5724
 kmalloc_noprof include/linux/slab.h:957 [inline]
 add_stack_record_to_list mm/page_owner.c:172 [inline]
 inc_stack_record_count mm/page_owner.c:214 [inline]
 __set_page_owner+0x25c/0x4a0 mm/page_owner.c:333
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
 prep_new_page mm/page_alloc.c:1858 [inline]
 get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
 alloc_slab_page mm/slub.c:3030 [inline]
 allocate_slab+0x96/0x3a0 mm/slub.c:3203
 new_slab mm/slub.c:3257 [inline]
 ___slab_alloc+0xe94/0x1920 mm/slub.c:4627
 __slab_alloc+0x65/0x100 mm/slub.c:4746
 __slab_alloc_node mm/slub.c:4822 [inline]
 slab_alloc_node mm/slub.c:5233 [inline]
 kmem_cache_alloc_noprof+0x3f9/0x6e0 mm/slub.c:5252
 __kernfs_new_node+0xd7/0x7e0 fs/kernfs/dir.c:637
 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:713
 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1057
 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:313
 sysfs_create_file_ns+0x128/0x1a0 fs/sysfs/file.c:374
 device_add+0x5d2/0xb50 drivers/base/core.c:3655
 cdev_device_add+0x1d6/0x390 fs/char_dev.c:556
 i2cdev_attach_adapter+0x2ed/0x4e0 drivers/i2c/i2c-dev.c:691
 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85
 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380
 bus_notify+0x143/0x180 drivers/base/bus.c:1001
 device_add+0x54d/0xb50 drivers/base/core.c:3669
 i2c_register_adapter+0x4f1/0x10f0 drivers/i2c/i2c-core-base.c:1573
 devm_i2c_add_adapter+0x1b/0x80 drivers/i2c/i2c-core-base.c:1845
 mcp2221_probe+0x404/0x880 drivers/hid/hid-mcp2221.c:1289
 __hid_device_probe drivers/hid/hid-core.c:2775 [inline]
 hid_device_probe+0x416/0x7a0 drivers/hid/hid-core.c:2812
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x26a/0x9e0 drivers/base/dd.c:659
 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462
 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031
 bus_probe_device+0x185/0x260 drivers/base/bus.c:537
 device_add+0x7b6/0xb50 drivers/base/core.c:3689
 hid_add_device+0x272/0x3e0 drivers/hid/hid-core.c:2951
 usbhid_probe+0xe13/0x12a0 drivers/hid/usbhid/hid-core.c:1435
 usb_probe_interface+0x665/0xc30 drivers/usb/core/driver.c:396
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x26a/0x9e0 drivers/base/dd.c:659
 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462
 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031
 bus_probe_device+0x185/0x260 drivers/base/bus.c:537
 device_add+0x7b6/0xb50 drivers/base/core.c:3689
 usb_set_configuration+0x1a87/0x20e0 drivers/usb/core/message.c:2210
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c1/0x390 drivers/usb/core/driver.c:291
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x26a/0x9e0 drivers/base/dd.c:659
 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801
 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831
 __device_attach_driver+0x2ce/0x530 drivers/base/dd.c:959
 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:462
 __device_attach+0x2b8/0x400 drivers/base/dd.c:1031
 bus_probe_device+0x185/0x260 drivers/base/bus.c:537
 device_add+0x7b6/0xb50 drivers/base/core.c:3689
 usb_new_device+0xa39/0x16f0 drivers/usb/core/hub.c:2694
 hub_port_connect drivers/usb/core/hub.c:5566 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
 port_event drivers/usb/core/hub.c:5870 [inline]
 hub_event+0x2958/0x4a20 drivers/usb/core/hub.c:5952
 process_one_work kernel/workqueue.c:3263 [inline]
 process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Allocated by task 6100:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 unpoison_slab_object mm/kasan/common.c:342 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:368
 kasan_slab_alloc include/linux/kasan.h:252 [inline]
 slab_post_alloc_hook mm/slub.c:4946 [inline]
 slab_alloc_node mm/slub.c:5245 [inline]
 kmem_cache_alloc_node_noprof+0x433/0x710 mm/slub.c:5297
 kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:579
 __alloc_skb+0x142/0x2d0 net/core/skbuff.c:670
 alloc_skb include/linux/skbuff.h:1383 [inline]
 alloc_uevent_skb+0x7d/0x230 lib/kobject_uevent.c:289
 uevent_net_broadcast_tagged lib/kobject_uevent.c:352 [inline]
 kobject_uevent_net_broadcast+0x184/0x560 lib/kobject_uevent.c:413
 kobject_uevent_env+0x55b/0x8c0 lib/kobject_uevent.c:608
 __kobject_del+0xd2/0x300 lib/kobject.c:601
 kobject_cleanup lib/kobject.c:680 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x243/0x480 lib/kobject.c:737
 netdev_queue_update_kobjects+0x5db/0x6c0 net/core/net-sysfs.c:2073
 remove_queue_kobjects net/core/net-sysfs.c:2170 [inline]
 netdev_unregister_kobject+0x11f/0x450 net/core/net-sysfs.c:2325
 unregister_netdevice_many_notify+0x1a6b/0x1ff0 net/core/dev.c:12289
 unregister_netdevice_many net/core/dev.c:12317 [inline]
 unregister_netdevice_queue+0x33c/0x380 net/core/dev.c:12161
 unregister_netdevice include/linux/netdevice.h:3389 [inline]
 __tun_detach+0x6d9/0x15d0 drivers/net/tun.c:621
 tun_detach drivers/net/tun.c:637 [inline]
 tun_chr_close+0x10a/0x1c0 drivers/net/tun.c:3436
 __fput+0x44c/0xa70 fs/file_table.c:468
 task_work_run+0x1d4/0x260 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xe9/0x130 kernel/entry/common.c:43
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 __do_fast_syscall_32+0x1f4/0x2b0 arch/x86/entry/syscall_32.c:309
 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e

Freed by task 6100:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 __kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587
 kasan_save_free_info mm/kasan/kasan.h:406 [inline]
 poison_slab_object mm/kasan/common.c:252 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2514 [inline]
 slab_free mm/slub.c:6566 [inline]
 kmem_cache_free+0x19b/0x690 mm/slub.c:6676
 skb_release_data+0x62d/0x7c0 net/core/skbuff.c:1087
 skb_release_all net/core/skbuff.c:1152 [inline]
 __kfree_skb net/core/skbuff.c:1166 [inline]
 consume_skb+0x9e/0xf0 net/core/skbuff.c:1398
 netlink_broadcast_filtered+0xec7/0x1000 net/netlink/af_netlink.c:1537
 netlink_broadcast+0x37/0x50 net/netlink/af_netlink.c:1559
 uevent_net_broadcast_tagged lib/kobject_uevent.c:373 [inline]
 kobject_uevent_net_broadcast+0x4bc/0x560 lib/kobject_uevent.c:413
 kobject_uevent_env+0x55b/0x8c0 lib/kobject_uevent.c:608
 __kobject_del+0xd2/0x300 lib/kobject.c:601
 kobject_cleanup lib/kobject.c:680 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x243/0x480 lib/kobject.c:737
 netdev_queue_update_kobjects+0x5db/0x6c0 net/core/net-sysfs.c:2073
 remove_queue_kobjects net/core/net-sysfs.c:2170 [inline]
 netdev_unregister_kobject+0x11f/0x450 net/core/net-sysfs.c:2325
 unregister_netdevice_many_notify+0x1a6b/0x1ff0 net/core/dev.c:12289
 unregister_netdevice_many net/core/dev.c:12317 [inline]
 unregister_netdevice_queue+0x33c/0x380 net/core/dev.c:12161
 unregister_netdevice include/linux/netdevice.h:3389 [inline]
 __tun_detach+0x6d9/0x15d0 drivers/net/tun.c:621
 tun_detach drivers/net/tun.c:637 [inline]
 tun_chr_close+0x10a/0x1c0 drivers/net/tun.c:3436
 __fput+0x44c/0xa70 fs/file_table.c:468
 task_work_run+0x1d4/0x260 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xe9/0x130 kernel/entry/common.c:43
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 __do_fast_syscall_32+0x1f4/0x2b0 arch/x86/entry/syscall_32.c:309
 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e

The buggy address belongs to the object at ffff88806c49fa80
 which belongs to the cache skbuff_small_head of size 704
The buggy address is located 703 bytes to the right of
 allocated 704-byte region [ffff88806c49fa80, ffff88806c49fd40)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6c49c
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff8881416f6b40 ffffea0001b12500 0000000000000003
raw: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff8881416f6b40 ffffea0001b12500 0000000000000003
head: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0001b12701 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 12, tgid 12 (kworker/u8:0), ts 104150033521, free_ts 94308046189
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
 prep_new_page mm/page_alloc.c:1858 [inline]
 get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
 alloc_slab_page mm/slub.c:3030 [inline]
 allocate_slab+0x96/0x3a0 mm/slub.c:3203
 new_slab mm/slub.c:3257 [inline]
 ___slab_alloc+0xe94/0x1920 mm/slub.c:4627
 __slab_alloc+0x65/0x100 mm/slub.c:4746
 __slab_alloc_node mm/slub.c:4822 [inline]
 slab_alloc_node mm/slub.c:5233 [inline]
 kmem_cache_alloc_node_noprof+0x4c5/0x710 mm/slub.c:5297
 kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:579
 __alloc_skb+0x142/0x2d0 net/core/skbuff.c:670
 alloc_skb include/linux/skbuff.h:1383 [inline]
 nlmsg_new include/net/netlink.h:1055 [inline]
 inet6_rt_notify+0x170/0x470 net/ipv6/route.c:6345
 fib6_add_rt2node+0x1876/0x33a0 net/ipv6/ip6_fib.c:1275
 fib6_add+0x8da/0x18a0 net/ipv6/ip6_fib.c:1528
 __ip6_ins_rt net/ipv6/route.c:1351 [inline]
 ip6_ins_rt+0xc8/0x120 net/ipv6/route.c:1361
 __ipv6_ifa_notify+0x63f/0xac0 net/ipv6/addrconf.c:6283
 ipv6_ifa_notify net/ipv6/addrconf.c:6322 [inline]
 addrconf_dad_completed+0x180/0xd60 net/ipv6/addrconf.c:4320
page last free pid 5818 tgid 5818 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1394 [inline]
 free_unref_folios+0xdb3/0x14f0 mm/page_alloc.c:2963
 folios_put_refs+0x584/0x670 mm/swap.c:1002
 free_pages_and_swap_cache+0x277/0x520 mm/swap_state.c:355
 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
 tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:397 [inline]
 tlb_flush_mmu+0x3a0/0x680 mm/mmu_gather.c:404
 tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:497
 vms_clear_ptes+0x42c/0x540 mm/vma.c:1235
 vms_complete_munmap_vmas+0x206/0x8a0 mm/vma.c:1277
 do_vmi_align_munmap+0x364/0x440 mm/vma.c:1536
 do_vmi_munmap+0x253/0x2e0 mm/vma.c:1584
 __vm_munmap+0x207/0x380 mm/vma.c:3156
 __do_sys_munmap mm/mmap.c:1080 [inline]
 __se_sys_munmap mm/mmap.c:1077 [inline]
 __ia32_sys_munmap+0x5f/0x70 mm/mmap.c:1077
 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
 __do_fast_syscall_32+0xb6/0x2b0 arch/x86/entry/syscall_32.c:306
 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e

Memory state around the buggy address:
 ffff88806c49fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88806c49ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88806c49ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                                ^
 ffff88806c4a0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88806c4a0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
   0:	c1 e8 3f             	shr    $0x3f,%eax
   3:	48 01 c8             	add    %rcx,%rax
   6:	48 83 e0 fe          	and    $0xfffffffffffffffe,%rax
   a:	4c 8d 3c 45 00 00 00 	lea    0x0(,%rax,2),%r15
  11:	00
  12:	49 01 ef             	add    %rbp,%r15
  15:	4c 89 f8             	mov    %r15,%rax
  18:	48 c1 e8 03          	shr    $0x3,%rax
  1c:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  23:	fc ff df
  26:	0f b6 04 08          	movzbl (%rax,%rcx,1),%eax
* 2a:	84 c0                	test   %al,%al <-- trapping instruction
  2c:	75 27                	jne    0x55
  2e:	49 63 07             	movslq (%r15),%rax
  31:	4c 01 f8             	add    %r15,%rax
  34:	49 8d 4f 04          	lea    0x4(%r15),%rcx
  38:	4c 39 e0             	cmp    %r12,%rax
  3b:	48 0f 46 e9          	cmovbe %rcx,%rbp
  3f:	49                   	rex.WB


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply

* [PATCH RESEND v3] Input: Improve WinWing Orion2 throttle support
From: Ivan Gorinov @ 2025-10-12 20:50 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-input, linux-kernel

Add support for Orion2 throttle configurations with more than 32 buttons
on the grip handle (this means the device reports more than 80 buttons).

Map additional button codes to KEY_MACRO1 .. KEY_MACRO28.

Make the module simpler, removing report descriptor fixup.

Changes since v2:
   - Add more comments about button mapping

Changes since v1:
   - Correct trivial coding style violations

Signed-off-by: Ivan Gorinov <linux-kernel@altimeter.info>
---
 drivers/hid/Kconfig       |   2 +
 drivers/hid/hid-winwing.c | 169 +++++++++++++++++++++++---------------
 2 files changed, 106 insertions(+), 65 deletions(-)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index a57901203aeb..3317981e65dc 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -1309,6 +1309,8 @@ config HID_WINWING
 	help
 	  Support for WinWing Orion2 throttle base with the following grips:
 
+	    * TGRIP-15E
+	    * TGRIP-15EX
 	    * TGRIP-16EX
 	    * TGRIP-18
 
diff --git a/drivers/hid/hid-winwing.c b/drivers/hid/hid-winwing.c
index d4afbbd27807..775609d0e35a 100644
--- a/drivers/hid/hid-winwing.c
+++ b/drivers/hid/hid-winwing.c
@@ -37,6 +37,7 @@ struct winwing_drv_data {
 	struct hid_device *hdev;
 	__u8 *report_buf;
 	struct mutex lock;
+	int map_more_buttons;
 	unsigned int num_leds;
 	struct winwing_led leds[];
 };
@@ -81,12 +82,10 @@ static int winwing_init_led(struct hid_device *hdev,
 	int ret;
 	int i;
 
-	size_t data_size = struct_size(data, leds, 3);
-
-	data = devm_kzalloc(&hdev->dev, data_size, GFP_KERNEL);
+	data = hid_get_drvdata(hdev);
 
 	if (!data)
-		return -ENOMEM;
+		return -EINVAL;
 
 	data->report_buf = devm_kmalloc(&hdev->dev, MAX_REPORT, GFP_KERNEL);
 
@@ -106,6 +105,7 @@ static int winwing_init_led(struct hid_device *hdev,
 						"%s::%s",
 						dev_name(&input->dev),
 						info->led_name);
+
 		if (!led->cdev.name)
 			return -ENOMEM;
 
@@ -114,14 +114,98 @@ static int winwing_init_led(struct hid_device *hdev,
 			return ret;
 	}
 
-	hid_set_drvdata(hdev, data);
-
 	return ret;
 }
 
+static int winwing_map_button(int button, int map_more_buttons)
+{
+	if (button < 1)
+		return KEY_RESERVED;
+
+	if (button > 112)
+		return KEY_RESERVED;
+
+	if (button <= 16) {
+		/*
+		 * Grip buttons [1 .. 16] are mapped to
+		 * key codes BTN_TRIGGER .. BTN_DEAD
+		 */
+		return (button - 1) + BTN_JOYSTICK;
+	}
+
+	if (button >= 65) {
+		/*
+		 * Base buttons [65 .. 112] are mapped to
+		 * key codes BTN_TRIGGER_HAPPY17 .. KEY_MAX
+		 */
+		return (button - 65) + BTN_TRIGGER_HAPPY17;
+	}
+
+	if (!map_more_buttons) {
+		/*
+		 * Not mapping numbers [33 .. 64] which
+		 * are not assigned to any real buttons
+		 */
+		if (button >= 33)
+			return KEY_RESERVED;
+		/*
+		 * Grip buttons [17 .. 32] are mapped to
+		 * BTN_TRIGGER_HAPPY1 .. BTN_TRIGGER_HAPPY16
+		 */
+		return (button - 17) + BTN_TRIGGER_HAPPY1;
+	}
+
+	if (button >= 49) {
+		/*
+		 * Grip buttons [49 .. 64] are mapped to
+		 * BTN_TRIGGER_HAPPY1 .. BTN_TRIGGER_HAPPY16
+		 */
+		return (button - 49) + BTN_TRIGGER_HAPPY1;
+	}
+
+	/*
+	 * Grip buttons [17 .. 44] are mapped to
+	 * key codes KEY_MACRO1 .. KEY_MACRO28;
+	 * also mapping numbers [45 .. 48] which
+	 * are not assigned to any real buttons.
+	 */
+	return (button - 17) + KEY_MACRO1;
+}
+
+static int winwing_input_mapping(struct hid_device *hdev,
+	struct hid_input *hi, struct hid_field *field, struct hid_usage *usage,
+	unsigned long **bit, int *max)
+{
+	struct winwing_drv_data *data;
+	int code = KEY_RESERVED;
+	int button = 0;
+
+	data = hid_get_drvdata(hdev);
+
+	if (!data)
+		return -EINVAL;
+
+	if ((usage->hid & HID_USAGE_PAGE) != HID_UP_BUTTON)
+		return 0;
+
+	if (field->application != HID_GD_JOYSTICK)
+		return 0;
+
+	/* Button numbers start with 1 */
+	button = usage->hid & HID_USAGE;
+
+	code = winwing_map_button(button, data->map_more_buttons);
+
+	hid_map_usage(hi, usage, bit, max, EV_KEY, code);
+
+	return 1;
+}
+
 static int winwing_probe(struct hid_device *hdev,
 		const struct hid_device_id *id)
 {
+	struct winwing_drv_data *data;
+	size_t data_size = struct_size(data, leds, 3);
 	int ret;
 
 	ret = hid_parse(hdev);
@@ -130,6 +214,15 @@ static int winwing_probe(struct hid_device *hdev,
 		return ret;
 	}
 
+	data = devm_kzalloc(&hdev->dev, data_size, GFP_KERNEL);
+
+	if (!data)
+		return -ENOMEM;
+
+	data->map_more_buttons = id->driver_data;
+
+	hid_set_drvdata(hdev, data);
+
 	ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
 	if (ret) {
 		hid_err(hdev, "hw start failed\n");
@@ -152,64 +245,11 @@ static int winwing_input_configured(struct hid_device *hdev,
 	return ret;
 }
 
-static const __u8 original_rdesc_buttons[] = {
-	0x05, 0x09, 0x19, 0x01, 0x29, 0x6F,
-	0x15, 0x00, 0x25, 0x01, 0x35, 0x00,
-	0x45, 0x01, 0x75, 0x01, 0x95, 0x6F,
-	0x81, 0x02, 0x75, 0x01, 0x95, 0x01,
-	0x81, 0x01
-};
-
-/*
- * HID report descriptor shows 111 buttons, which exceeds maximum
- * number of buttons (80) supported by Linux kernel HID subsystem.
- *
- * This module skips numbers 32-63, unused on some throttle grips.
- */
-
-static const __u8 *winwing_report_fixup(struct hid_device *hdev, __u8 *rdesc,
-		unsigned int *rsize)
-{
-	int sig_length = sizeof(original_rdesc_buttons);
-	int unused_button_numbers = 32;
-
-	if (*rsize < 34)
-		return rdesc;
-
-	if (memcmp(rdesc + 8, original_rdesc_buttons, sig_length) == 0) {
-
-		/* Usage Maximum */
-		rdesc[13] -= unused_button_numbers;
-
-		/*  Report Count for buttons */
-		rdesc[25] -= unused_button_numbers;
-
-		/*  Report Count for padding [HID1_11, 6.2.2.9] */
-		rdesc[31] += unused_button_numbers;
-
-		hid_info(hdev, "winwing descriptor fixed\n");
-	}
-
-	return rdesc;
-}
-
-static int winwing_raw_event(struct hid_device *hdev,
-		struct hid_report *report, u8 *raw_data, int size)
-{
-	if (size >= 15) {
-		/* Skip buttons 32 .. 63 */
-		memmove(raw_data + 5, raw_data + 9, 6);
-
-		/* Clear the padding */
-		memset(raw_data + 11, 0, 4);
-	}
-
-	return 0;
-}
-
 static const struct hid_device_id winwing_devices[] = {
-	{ HID_USB_DEVICE(0x4098, 0xbe62) },  /* TGRIP-18 */
-	{ HID_USB_DEVICE(0x4098, 0xbe68) },  /* TGRIP-16EX */
+	{ HID_USB_DEVICE(0x4098, 0xbd65), .driver_data = 1 },  /* TGRIP-15E  */
+	{ HID_USB_DEVICE(0x4098, 0xbd64), .driver_data = 1 },  /* TGRIP-15EX */
+	{ HID_USB_DEVICE(0x4098, 0xbe68), .driver_data = 0 },  /* TGRIP-16EX */
+	{ HID_USB_DEVICE(0x4098, 0xbe62), .driver_data = 0 },  /* TGRIP-18   */
 	{}
 };
 
@@ -218,10 +258,9 @@ MODULE_DEVICE_TABLE(hid, winwing_devices);
 static struct hid_driver winwing_driver = {
 	.name = "winwing",
 	.id_table = winwing_devices,
+	.input_configured = winwing_input_configured,
+	.input_mapping = winwing_input_mapping,
 	.probe = winwing_probe,
-	.input_configured = winwing_input_configured,
-	.report_fixup = winwing_report_fixup,
-	.raw_event = winwing_raw_event,
 };
 module_hid_driver(winwing_driver);
 
-- 
2.34.1


^ permalink raw reply related

* [PATCH] ARM: dts: imx53: enable PMIC RTC on imx53-qsrb
From: Alexander Kurz @ 2025-10-11  6:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, devicetree,
	linux-input
  Cc: linux-kernel, Alexander Kurz

The RTC inside mc34708 is supported by RTC_DRV_MC13XXX since v3.6-rc1.
Enable the PMIC RTC on the imx53-qsrb. Without a battery the RTC may be
powered via the micro-USB connector when main 5V power is not available.

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 arch/arm/boot/dts/nxp/imx/imx53-qsrb.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/nxp/imx/imx53-qsrb.dts b/arch/arm/boot/dts/nxp/imx/imx53-qsrb.dts
index 2f06ad61a766..6938ad6dbc2c 100644
--- a/arch/arm/boot/dts/nxp/imx/imx53-qsrb.dts
+++ b/arch/arm/boot/dts/nxp/imx/imx53-qsrb.dts
@@ -28,6 +28,7 @@ pmic: mc34708@8 {
 		reg = <0x08>;
 		interrupt-parent = <&gpio5>;
 		interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
+		fsl,mc13xxx-uses-rtc;
 		regulators {
 			sw1_reg: sw1a {
 				regulator-name = "SW1";
-- 
2.39.5


^ permalink raw reply related

* Re: hid_multitouch - random non-responsive, multitouch, scrolling and zooming
From: Steven Haigh @ 2025-10-10 23:30 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Stéphane Chatty, Peter Hutterer, linux-input
In-Reply-To: <ed69f310-8a4d-4023-b1ce-72b78e512177@app.fastmail.com>

On 11/10/25 00:54, Benjamin Tissoires wrote:
> On Fri, Oct 10, 2025, at 2:21 PM, Steven Haigh wrote:
>> On 7/10/25 20:10, Benjamin Tissoires wrote:
>>> On Tue, Oct 7, 2025, at 3:42 AM, Steven Haigh wrote:
>>>> I ran `libinput record -o recording.yml /dev/event/input6` and have
>>>> attached the compressed output. Annoyingly, it seems like the touchpad
>>>> is working fine at the moment - so it may confirm the hardware
>>>> information, but not a recording of the problem right now.
>>>
>>> Yeah, same on one of the Dell laptops I have here. I know it has the bug, but whenever I try to reproduce it it never shows meaning I was never able to pin point the issue :(
>>
>> So, "good" news is that I managed to grab a recording today when the
>> touchpad started to play up. When using two-fingers to scroll, I ended
>> up zooming etc.
> 
> Unfortunately, this is a recording after the kernel processing, so all I can do is check that we have ghost fingers (and even that is trciky because I'm not sure if what we see are the expected events or not).

Ah, of course - that makes sense. For some reason, I had it in my head 
that it'd record the touchpad data directly - but that's a libinput 
tool. Seems obvious now, but I get you can't figure out the fake touches 
vs me mashing the touchpad :)
>>
>> I tried to make the recording as short as possible, but still include
>> examples of clicking, scrolling etc.
>>
>> Attached for reference.
>>
>> As for which way to approach a fix - I'm happy for you to suggest what
>> path we take - a BPF, kernel patch backport, or something else.
> 
> Great, thanks!
> 
>>
>> You tell me which one gives the most value and is likely to help more
>> people in the long run.
> 
> Right now the most valuable would be to test the series at
> https://lore.kernel.org/linux-input/20251008-fix-sticky-fingers-v1-0-760f1f26fce3@kernel.org/T/#m0fba507cbd43acd36bef28151ecb90b7077606a4
> 
> If this work and you want a quick and dirty fix you can then return to the default kernel, and use the BPF from https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/204, the latest version should be compatible with your device, just re-download and install it again.
> 
> But definitely a tested-by on the kernel patch would be appreciated :)

Ok, I'll take a peek at this. Just for my own workloads sake, I've 
installed the BPF hack first - just to make sure that it fixes the 
issue. I did have a thought that potentially its a hardware issue - but 
hopefully this issue is just the driver.

I'll give it a run for a little while to see if I get any of the same 
problems - and if not, try to figure out how to build a kernel with this 
patch.

To run a like for like comparison, I guess I'd want to take the Fedora 
SRPM, add the patch, rebuild that, and then run it to test. It's been a 
*long* time since I've done kernel builds :)

I know this isn't conducive to a quick test turnaround - but I'd rather 
give you correct feedback than quick feedback.

-- 
Steven Haigh

📧 netwiz@crc.id.au
💻 https://crc.id.au



^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox