mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pinctrl: qcom: Remove unused macro definitions
@ 2026-07-30  9:00 Maulik Shah
  2026-07-30  9:28 ` Konrad Dybcio
  0 siblings, 1 reply; 8+ messages in thread
From: Maulik Shah @ 2026-07-30  9:00 UTC (permalink / raw)
  To: Bjorn Andersson, Bartosz Golaszewski, Linus Walleij
  Cc: linux-arm-msm, linux-gpio, linux-kernel, Maulik Shah

Remove macros that are defined but never used, as identified by
-Wunused-macros:

- pinctrl-qcs8300.c: QUP_I3C_{6,7,13,14}_MODE_OFFSET
- pinctrl-sa8775p.c: QUP_I3C_{6,7,13,14}_MODE_OFFSET
- pinctrl-sm6375.c: REG_BASE

No functional impact.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
---
Remove macros in Qualcomm pinctrl drivers that are defined but never
used, as identified by -Wunused-macros.

The QUP_I3C_*_MODE_OFFSET macros in pinctrl-qcs8300.c and
pinctrl-sa8775p.c, and REG_BASE in pinctrl-sm6375.c have no
references in their respective files.

No functional impact.
---
 drivers/pinctrl/qcom/pinctrl-qcs8300.c | 5 -----
 drivers/pinctrl/qcom/pinctrl-sa8775p.c | 5 -----
 drivers/pinctrl/qcom/pinctrl-sm6375.c  | 1 -
 3 files changed, 11 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-qcs8300.c b/drivers/pinctrl/qcom/pinctrl-qcs8300.c
index 9a904d809e11..c37ad3590838 100644
--- a/drivers/pinctrl/qcom/pinctrl-qcs8300.c
+++ b/drivers/pinctrl/qcom/pinctrl-qcs8300.c
@@ -100,11 +100,6 @@
 		.intr_detection_width = -1,		\
 	}
 
-#define QUP_I3C_6_MODE_OFFSET	0xaf000
-#define QUP_I3C_7_MODE_OFFSET	0xb0000
-#define QUP_I3C_13_MODE_OFFSET	0xb1000
-#define QUP_I3C_14_MODE_OFFSET	0xb2000
-
 static const struct pinctrl_pin_desc qcs8300_pins[] = {
 	PINCTRL_PIN(0, "GPIO_0"),
 	PINCTRL_PIN(1, "GPIO_1"),
diff --git a/drivers/pinctrl/qcom/pinctrl-sa8775p.c b/drivers/pinctrl/qcom/pinctrl-sa8775p.c
index 5dbaa50cbff0..23653dc65e8e 100644
--- a/drivers/pinctrl/qcom/pinctrl-sa8775p.c
+++ b/drivers/pinctrl/qcom/pinctrl-sa8775p.c
@@ -101,11 +101,6 @@
 		.intr_detection_width = -1,		\
 	}
 
-#define QUP_I3C_6_MODE_OFFSET	0xAF000
-#define QUP_I3C_7_MODE_OFFSET	0xB0000
-#define QUP_I3C_13_MODE_OFFSET	0xB1000
-#define QUP_I3C_14_MODE_OFFSET	0xB2000
-
 static const struct pinctrl_pin_desc sa8775p_pins[] = {
 	PINCTRL_PIN(0, "GPIO_0"),
 	PINCTRL_PIN(1, "GPIO_1"),
diff --git a/drivers/pinctrl/qcom/pinctrl-sm6375.c b/drivers/pinctrl/qcom/pinctrl-sm6375.c
index 8da71d940b90..cb15c562b865 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6375.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6375.c
@@ -10,7 +10,6 @@
 
 #include "pinctrl-msm.h"
 
-#define REG_BASE 0x100000
 #define REG_SIZE 0x1000
 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)	\
 	{					        \

---
base-commit: 78bc8af4affb9a732504eb22eeac7d1e50883853
change-id: 20260730-b4b4-pinctrl-unused-macros-v2-20ed662029c0

Best regards,
--  
Maulik Shah <maulik.shah@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] pinctrl: qcom: Remove unused macro definitions
@ 2026-05-29 10:43 Navya Malempati
  2026-06-08 10:04 ` Konrad Dybcio
  2026-06-11 12:07 ` Linus Walleij
  0 siblings, 2 replies; 8+ messages in thread
From: Navya Malempati @ 2026-05-29 10:43 UTC (permalink / raw)
  To: Bjorn Andersson, Linus Walleij
  Cc: linux-arm-msm, linux-gpio, linux-kernel, Navya Malempati

The macros QUP_I3C and UFS_RESET are defined in some platforms
and yet not used. Remove these macros as they are unnecessary.

Signed-off-by: Navya Malempati <navya.malempati@oss.qualcomm.com>
---
 drivers/pinctrl/qcom/pinctrl-qcs8300.c |  6 ------
 drivers/pinctrl/qcom/pinctrl-qdu1000.c | 24 ------------------------
 drivers/pinctrl/qcom/pinctrl-sa8775p.c |  6 ------
 3 files changed, 36 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-qcs8300.c b/drivers/pinctrl/qcom/pinctrl-qcs8300.c
index 852cd36df6d5..9a904d809e11 100644
--- a/drivers/pinctrl/qcom/pinctrl-qcs8300.c
+++ b/drivers/pinctrl/qcom/pinctrl-qcs8300.c
@@ -100,12 +100,6 @@
 		.intr_detection_width = -1,		\
 	}
 
-#define QUP_I3C(qup_mode, qup_offset)			\
-	{						\
-		.mode = qup_mode,			\
-		.offset = qup_offset,			\
-	}
-
 #define QUP_I3C_6_MODE_OFFSET	0xaf000
 #define QUP_I3C_7_MODE_OFFSET	0xb0000
 #define QUP_I3C_13_MODE_OFFSET	0xb1000
diff --git a/drivers/pinctrl/qcom/pinctrl-qdu1000.c b/drivers/pinctrl/qcom/pinctrl-qdu1000.c
index 77da87aa72aa..1ef77f82820c 100644
--- a/drivers/pinctrl/qcom/pinctrl-qdu1000.c
+++ b/drivers/pinctrl/qcom/pinctrl-qdu1000.c
@@ -75,30 +75,6 @@
 		.intr_detection_width = -1,		\
 	}
 
-#define UFS_RESET(pg_name, offset)				\
-	{					        \
-		.grp = PINCTRL_PINGROUP(#pg_name, 	\
-			pg_name##_pins, 		\
-			ARRAY_SIZE(pg_name##_pins)),	\
-		.ctl_reg = offset,			\
-		.io_reg = offset + 0x4,			\
-		.intr_cfg_reg = 0,			\
-		.intr_status_reg = 0,			\
-		.mux_bit = -1,				\
-		.pull_bit = 3,				\
-		.drv_bit = 0,				\
-		.oe_bit = -1,				\
-		.in_bit = -1,				\
-		.out_bit = 0,				\
-		.intr_enable_bit = -1,			\
-		.intr_status_bit = -1,			\
-		.intr_target_bit = -1,			\
-		.intr_raw_status_bit = -1,		\
-		.intr_polarity_bit = -1,		\
-		.intr_detection_bit = -1,		\
-		.intr_detection_width = -1,		\
-	}
-
 static const struct pinctrl_pin_desc qdu1000_pins[] = {
 	PINCTRL_PIN(0, "GPIO_0"),
 	PINCTRL_PIN(1, "GPIO_1"),
diff --git a/drivers/pinctrl/qcom/pinctrl-sa8775p.c b/drivers/pinctrl/qcom/pinctrl-sa8775p.c
index e9a510d3583f..5dbaa50cbff0 100644
--- a/drivers/pinctrl/qcom/pinctrl-sa8775p.c
+++ b/drivers/pinctrl/qcom/pinctrl-sa8775p.c
@@ -101,12 +101,6 @@
 		.intr_detection_width = -1,		\
 	}
 
-#define QUP_I3C(qup_mode, qup_offset)			\
-	{						\
-		.mode = qup_mode,			\
-		.offset = qup_offset,			\
-	}
-
 #define QUP_I3C_6_MODE_OFFSET	0xAF000
 #define QUP_I3C_7_MODE_OFFSET	0xB0000
 #define QUP_I3C_13_MODE_OFFSET	0xB1000

---
base-commit: d387b06f7c15b4639244ad66b4b0900c6a02b430
change-id: 20260526-macros_pinctrl-3609843a2519

Best regards,
--  
Navya Malempati <navya.malempati@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] pinctrl: qcom: Remove unused macro definitions
@ 2026-04-05 18:34 Maulik Shah
  2026-04-06  0:57 ` Dmitry Baryshkov
  2026-04-09  8:55 ` Linus Walleij
  0 siblings, 2 replies; 8+ messages in thread
From: Maulik Shah @ 2026-04-05 18:34 UTC (permalink / raw)
  To: Bjorn Andersson, Linus Walleij
  Cc: linux-arm-msm, linux-gpio, linux-kernel, Maulik Shah

Remove SDC_QDSD_PINGROUP, QUP_I3C and UFS_RESET macros as on some
platforms they are unused.

No functional impact.

Signed-off-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
---
 drivers/pinctrl/qcom/pinctrl-eliza.c   | 25 -------------------------
 drivers/pinctrl/qcom/pinctrl-qcm2290.c | 24 ------------------------
 drivers/pinctrl/qcom/pinctrl-qdu1000.c |  6 ------
 drivers/pinctrl/qcom/pinctrl-sm4450.c  |  7 -------
 4 files changed, 62 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-eliza.c b/drivers/pinctrl/qcom/pinctrl-eliza.c
index 1a2e6461a69b8e7c0ffaeb15b0c20bccffc51410..4c941cbd4a12736e3ec135066a229227875f16b2 100644
--- a/drivers/pinctrl/qcom/pinctrl-eliza.c
+++ b/drivers/pinctrl/qcom/pinctrl-eliza.c
@@ -55,31 +55,6 @@
 		.intr_detection_width = 2,	\
 	}
 
-#define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)	\
-	{					        \
-		.grp = PINCTRL_PINGROUP(#pg_name,	\
-			pg_name##_pins,			\
-			ARRAY_SIZE(pg_name##_pins)),	\
-		.ctl_reg = ctl,				\
-		.io_reg = 0,				\
-		.intr_cfg_reg = 0,			\
-		.intr_status_reg = 0,			\
-		.intr_target_reg = 0,			\
-		.mux_bit = -1,				\
-		.pull_bit = pull,			\
-		.drv_bit = drv,				\
-		.oe_bit = -1,				\
-		.in_bit = -1,				\
-		.out_bit = -1,				\
-		.intr_enable_bit = -1,			\
-		.intr_status_bit = -1,			\
-		.intr_target_bit = -1,			\
-		.intr_raw_status_bit = -1,		\
-		.intr_polarity_bit = -1,		\
-		.intr_detection_bit = -1,		\
-		.intr_detection_width = -1,		\
-	}
-
 #define UFS_RESET(pg_name, ctl, io)			\
 	{					        \
 		.grp = PINCTRL_PINGROUP(#pg_name,	\
diff --git a/drivers/pinctrl/qcom/pinctrl-qcm2290.c b/drivers/pinctrl/qcom/pinctrl-qcm2290.c
index 38200957451e1975b7215eae6a2d10329a30a57d..1c6d0e0b7ddb785b36febc4efdecbc84a27408ec 100644
--- a/drivers/pinctrl/qcom/pinctrl-qcm2290.c
+++ b/drivers/pinctrl/qcom/pinctrl-qcm2290.c
@@ -77,30 +77,6 @@
 		.intr_detection_width = -1,		\
 	}
 
-#define UFS_RESET(pg_name, offset)				\
-	{					        \
-		.grp = PINCTRL_PINGROUP(#pg_name, 	\
-			pg_name##_pins, 		\
-			ARRAY_SIZE(pg_name##_pins)),	\
-		.ctl_reg = offset,			\
-		.io_reg = offset + 0x4,			\
-		.intr_cfg_reg = 0,			\
-		.intr_status_reg = 0,			\
-		.intr_target_reg = 0,			\
-		.mux_bit = -1,				\
-		.pull_bit = 3,				\
-		.drv_bit = 0,				\
-		.oe_bit = -1,				\
-		.in_bit = -1,				\
-		.out_bit = 0,				\
-		.intr_enable_bit = -1,			\
-		.intr_status_bit = -1,			\
-		.intr_target_bit = -1,			\
-		.intr_raw_status_bit = -1,		\
-		.intr_polarity_bit = -1,		\
-		.intr_detection_bit = -1,		\
-		.intr_detection_width = -1,		\
-	}
 static const struct pinctrl_pin_desc qcm2290_pins[] = {
 	PINCTRL_PIN(0, "GPIO_0"),
 	PINCTRL_PIN(1, "GPIO_1"),
diff --git a/drivers/pinctrl/qcom/pinctrl-qdu1000.c b/drivers/pinctrl/qcom/pinctrl-qdu1000.c
index 7c535698a780041c2660c08d22146c8d700ce081..c9431bcdd4b499e035f48498e822fe20ecc98d0e 100644
--- a/drivers/pinctrl/qcom/pinctrl-qdu1000.c
+++ b/drivers/pinctrl/qcom/pinctrl-qdu1000.c
@@ -102,12 +102,6 @@
 		.intr_detection_width = -1,		\
 	}
 
-#define QUP_I3C(qup_mode, qup_offset)			\
-	{						\
-		.mode = qup_mode,			\
-		.offset = qup_offset,			\
-	}
-
 static const struct pinctrl_pin_desc qdu1000_pins[] = {
 	PINCTRL_PIN(0, "GPIO_0"),
 	PINCTRL_PIN(1, "GPIO_1"),
diff --git a/drivers/pinctrl/qcom/pinctrl-sm4450.c b/drivers/pinctrl/qcom/pinctrl-sm4450.c
index d51e271e336101796b75d64e56f573f3547f1121..bb4e2c7714e3fefbd47a9dbfaaef542d19555675 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm4450.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm4450.c
@@ -102,13 +102,6 @@
 		.intr_detection_width = -1,		\
 	}
 
-#define QUP_I3C(qup_mode, qup_offset)			\
-	{						\
-		.mode = qup_mode,			\
-		.offset = qup_offset,			\
-	}
-
-
 static const struct pinctrl_pin_desc sm4450_pins[] = {
 	PINCTRL_PIN(0, "GPIO_0"),
 	PINCTRL_PIN(1, "GPIO_1"),

---
base-commit: 2febe6e6ee6e34c7754eff3c4d81aa7b0dcb7979
change-id: 20260405-eliza_pinctrl-382bd31c3eef

Best regards,
-- 
Maulik Shah <maulik.shah@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-30  9:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-30  9:00 [PATCH] pinctrl: qcom: Remove unused macro definitions Maulik Shah
2026-07-30  9:28 ` Konrad Dybcio
  -- strict thread matches above, loose matches on Subject: below --
2026-05-29 10:43 Navya Malempati
2026-06-08 10:04 ` Konrad Dybcio
2026-06-11 12:07 ` Linus Walleij
2026-04-05 18:34 Maulik Shah
2026-04-06  0:57 ` Dmitry Baryshkov
2026-04-09  8:55 ` Linus Walleij

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

all inboxes | Powered by JetHome®