Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment
@ 2026-06-10  4:05 Ethan Nelson-Moore
  2026-06-10  6:03 ` Joshua Crofts
  2026-06-10 13:41 ` Andy Shevchenko
  0 siblings, 2 replies; 7+ messages in thread
From: Ethan Nelson-Moore @ 2026-06-10  4:05 UTC (permalink / raw)
  To: linux-iio
  Cc: Ethan Nelson-Moore, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko

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.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
 drivers/iio/iio_core_trigger.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/iio_core_trigger.h b/drivers/iio/iio_core_trigger.h
index e1a56824e07f..4698a857739f 100644
--- a/drivers/iio/iio_core_trigger.h
+++ b/drivers/iio/iio_core_trigger.h
@@ -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 */
-- 
2.43.0


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

* Re: [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment
  2026-06-10  4:05 [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment Ethan Nelson-Moore
@ 2026-06-10  6:03 ` Joshua Crofts
  2026-06-10 13:41 ` Andy Shevchenko
  1 sibling, 0 replies; 7+ messages in thread
From: Joshua Crofts @ 2026-06-10  6:03 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: linux-iio, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko

On Tue,  9 Jun 2026 21:05:01 -0700
Ethan Nelson-Moore <enelsonmoore@gmail.com> wrote:

> 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.
> 
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
> ---

Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>

-- 
Kind regards

CJD

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

* Re: [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment
  2026-06-10  4:05 [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment Ethan Nelson-Moore
  2026-06-10  6:03 ` Joshua Crofts
@ 2026-06-10 13:41 ` Andy Shevchenko
  2026-06-10 13:59   ` Joshua Crofts
  1 sibling, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2026-06-10 13:41 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: linux-iio, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko

On Tue, Jun 09, 2026 at 09:05:01PM -0700, Ethan Nelson-Moore wrote:
> 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 <jic23@cam.ac.uk>
  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 <jic23@kernel.org>
  Date:   Wed Apr 25 15:54:59 2012 +0100

    IIO: Move the core files to drivers/iio

and kept till now.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment
  2026-06-10 13:41 ` Andy Shevchenko
@ 2026-06-10 13:59   ` Joshua Crofts
  2026-06-10 16:01     ` Jonathan Cameron
  2026-06-10 19:18     ` Ethan Nelson-Moore
  0 siblings, 2 replies; 7+ messages in thread
From: Joshua Crofts @ 2026-06-10 13:59 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Ethan Nelson-Moore, linux-iio, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko

On Wed, 10 Jun 2026 16:41:54 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Tue, Jun 09, 2026 at 09:05:01PM -0700, Ethan Nelson-Moore wrote:
> > 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 :)

-- 
Kind regards

CJD

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

* Re: [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment
  2026-06-10 13:59   ` Joshua Crofts
@ 2026-06-10 16:01     ` Jonathan Cameron
  2026-06-10 19:18     ` Ethan Nelson-Moore
  1 sibling, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2026-06-10 16:01 UTC (permalink / raw)
  To: Joshua Crofts
  Cc: Andy Shevchenko, Ethan Nelson-Moore, linux-iio, David Lechner,
	Nuno Sá, Andy Shevchenko

On Wed, 10 Jun 2026 15:59:21 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:

> On Wed, 10 Jun 2026 16:41:54 +0300
> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> 
> > On Tue, Jun 09, 2026 at 09:05:01PM -0700, Ethan Nelson-Moore wrote:  
> > > 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 :)

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

Applied.

Thanks,

Jonathan


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

* Re: [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment
  2026-06-10 13:59   ` Joshua Crofts
  2026-06-10 16:01     ` Jonathan Cameron
@ 2026-06-10 19:18     ` Ethan Nelson-Moore
  2026-06-11  5:38       ` Andy Shevchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Ethan Nelson-Moore @ 2026-06-10 19:18 UTC (permalink / raw)
  To: Joshua Crofts
  Cc: Andy Shevchenko, linux-iio, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko

Hi, Andy and Joshua,

On Wed, Jun 10, 2026 at 6:59 AM Joshua Crofts <joshua.crofts1@gmail.com> wrote:
>
> On Wed, 10 Jun 2026 16:41:54 +0300
> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > (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.

> > Wow! This line is from 2009
>
> Perhaps there should be an award for finding issues this old :)

You're welcome! :p

Ethan

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

* Re: [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment
  2026-06-10 19:18     ` Ethan Nelson-Moore
@ 2026-06-11  5:38       ` Andy Shevchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2026-06-11  5:38 UTC (permalink / raw)
  To: Ethan Nelson-Moore
  Cc: Joshua Crofts, linux-iio, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko

On Wed, Jun 10, 2026 at 12:18:34PM -0700, Ethan Nelson-Moore wrote:
> On Wed, Jun 10, 2026 at 6:59 AM Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> > On Wed, 10 Jun 2026 16:41:54 +0300
> > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> > > (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.

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

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2026-06-11  5:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10  4:05 [PATCH] iio: core-trigger: correct CONFIG_IIO_TRIGGER macro name in #endif comment Ethan Nelson-Moore
2026-06-10  6:03 ` Joshua Crofts
2026-06-10 13:41 ` Andy Shevchenko
2026-06-10 13:59   ` Joshua Crofts
2026-06-10 16:01     ` Jonathan Cameron
2026-06-10 19:18     ` Ethan Nelson-Moore
2026-06-11  5:38       ` Andy Shevchenko

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