Skip to contentSkip to conversation

iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment

PATCH Applied Ethan Nelson-Moore 4 participants 7 messages Jun 10 – Jun 11 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment

A comment in drivers/iio/iio_core_trigger.h incorrectly refers to CONFIG_TRIGGER_CONSUMER instead of CONFIG_IIO_TRIGGER. Correct it.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

---
 drivers/iio/iio_core_trigger.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/iio_core_trigger.h +1 -1
index e1a56824e07f..4698a857739f 100644
@@ -56,4 +56,4 @@ static inline int iio_trigger_detach_poll_func(struct iio_trigger *trig,
 	return 0;
 }
 
-#endif /* CONFIG_TRIGGER_CONSUMER */
+#endif /* CONFIG_IIO_TRIGGER */
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Tue, 9 Jun 2026 21:05:01 -0700 Ethan Nelson-Moore <[email protected]>…

A comment in drivers/iio/iio_core_trigger.h incorrectly refers to CONFIG_TRIGGER_CONSUMER instead of CONFIG_IIO_TRIGGER. Correct it.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

---

Signature · 3 lines
Kind regards

CJD
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ethan Nelson-Moore
Quoted 5 lines · Ethan Nelson-Moore

A comment in drivers/iio/iio_core_trigger.h incorrectly refers to CONFIG_TRIGGER_CONSUMER instead of CONFIG_IIO_TRIGGER. Correct it.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

(Btw, did you do that manually or using some scripts?)

Wow! This line is from 2009

commit 1637db44413e32a0f100dd4bd164644e641842f7
Author: Jonathan Cameron <[email protected]>
Date: Tue Aug 18 18:06:26 2009 +0100

Staging: IIO: Trigger support added to core.

and that time it might have been correct one, dunno. In any case your change is correct. The new header split was done in

commit a980e046098b0a40eaff5e4e7fcde6cf035b7c06
Author: Jonathan Cameron <[email protected]>
Date: Wed Apr 25 15:54:59 2012 +0100

IIO: Move the core files to drivers/iio

and kept till now.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 10 lines · On Wed, 10 Jun 2026 16:41:54 +0300 Andy Shevchenko…
Quoted 5 lines · Ethan Nelson-Moore

A comment in drivers/iio/iio_core_trigger.h incorrectly refers to CONFIG_TRIGGER_CONSUMER instead of CONFIG_IIO_TRIGGER. Correct it.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

(Btw, did you do that manually or using some scripts?)

Wow! This line is from 2009

Perhaps there should be an award for finding issues this old :)

Signature · 3 lines
Kind regards

CJD
maintainer Applied
#4 lore raw
Quoted 7 lines · On Wed, 10 Jun 2026 15:59:21 +0200 Joshua Crofts <[email protected]>…
Quoted 4 lines · On Wed, 10 Jun 2026 16:41:54 +0300 Andy Shevchenko…
Quoted 3 lines · Ethan Nelson-Moore

A comment in drivers/iio/iio_core_trigger.h incorrectly refers to CONFIG_TRIGGER_CONSUMER instead of CONFIG_IIO_TRIGGER. Correct it.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

(Btw, did you do that manually or using some scripts?)

Wow! This line is from 2009

Perhaps there should be an award for finding issues this old :)

Plenty of those out there I suspect :(
Younger me didn't write particularly good code!

Applied.

Thanks,

Jonathan

#5 lore raw
In reply to Joshua Crofts

Hi, Andy and Joshua,

Quoted 4 lines · Joshua Crofts
Quoted 1 line · On Wed, 10 Jun 2026 16:41:54 +0300 Andy Shevchenko…

(Btw, did you do that manually or using some scripts?)

I used a script I am writing. It attempts to filter out enums, changelog entries, and example/dummy values, which makes the list significantly shorter, although it does so by committing the cardinal sin of parsing C using grep :). It also has an easily editable list of known false positives. Once I reduce the rate of false positives to an acceptable level (I notably need to exclude typedefs), I will post the script on GitHub.

Quoted 3 lines
Quoted 1 line

Wow! This line is from 2009

Perhaps there should be an award for finding issues this old :)

You're welcome! :p

Ethan

#6 lore raw
Quoted 5 lines · Ethan Nelson-Moore
Quoted 3 lines · Joshua Crofts
Quoted 1 line · On Wed, 10 Jun 2026 16:41:54 +0300 Andy Shevchenko…

(Btw, did you do that manually or using some scripts?)

Quoted 7 lines

I used a script I am writing. It attempts to filter out enums, changelog entries, and example/dummy values, which makes the list significantly shorter, although it does so by committing the cardinal sin of parsing C using grep :). It also has an easily editable list of known false positives. Once I reduce the rate of false positives to an acceptable level (I notably need to exclude typedefs), I will post the script on GitHub.

Okay. When modifying C code (not text or comments), consider using coccinelle.

Signature · 2 lines
With Best Regards,
Andy Shevchenko