From: Joshua Crofts <crofts@kernel.org>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Jonathan Cameron" <jonathan.cameron@oss.qualcomm.com>,
"Nuno Sá" <nuno.sa@analog.com>,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>,
Rupesh Majhi <zoone.rupert@gmail.com>
Subject: Re: [PATCH v2 1/1] iio: core: Split debugfs routines
Date: Wed, 25 Nov 2026 15:22:59 +0100 [thread overview]
Message-ID: <6d517c95-82e1-4713-bc1f-9922a975e26d@kernel.org> (raw)
In-Reply-To: <20261125140251.384361-1-andriy.shevchenko@linux.intel.com>
On 25-Nov-26 14:59, Andy Shevchenko wrote:
> Split debugfs routines into a separate file for easier maintenance.
> No functional changes intended.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> ---
>
> v2: fixed compilation errors (LKP, Joshua)
>
> Cc: Rupesh Majhi <zoone.rupert@gmail.com>
> Rupesh, feel free to include this patch into your series as the first one.
>
> Fun fact: This patch was written with zero AI assistance.
>
> drivers/iio/Makefile | 1 +
> drivers/iio/iio_core.h | 14 +++
> drivers/iio/industrialio-core.c | 152 +-------------------------
> drivers/iio/industrialio-debugfs.c | 165 +++++++++++++++++++++++++++++
> 4 files changed, 182 insertions(+), 150 deletions(-)
> create mode 100644 drivers/iio/industrialio-debugfs.c
>
> diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
> index 8a897b6729d2..5fd81b20da22 100644
> --- a/drivers/iio/Makefile
> +++ b/drivers/iio/Makefile
> @@ -8,6 +8,7 @@ industrialio-y := industrialio-core.o industrialio-event.o inkern.o
> industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
> industrialio-$(CONFIG_IIO_TRIGGER) += industrialio-trigger.o
> industrialio-$(CONFIG_ACPI) += industrialio-acpi.o
> +industrialio-$(CONFIG_DEBUG_FS) += industrialio-debugfs.o
>
> obj-$(CONFIG_IIO_CONFIGFS) += industrialio-configfs.o
> obj-$(CONFIG_IIO_GTS_HELPER) += industrialio-gts-helper.o
> diff --git a/drivers/iio/iio_core.h b/drivers/iio/iio_core.h
> index 59fa1bd9924b..985ac82a37f9 100644
> --- a/drivers/iio/iio_core.h
> +++ b/drivers/iio/iio_core.h
> @@ -16,6 +16,20 @@ struct iio_buffer;
> struct iio_chan_spec;
> struct iio_dev;
>
> +#if defined(CONFIG_DEBUG_FS)
> +void iio_debugfs_create(void);
> +void iio_debugfs_remove(void);
> +
> +void iio_device_unregister_debugfs(struct iio_dev *indio_dev);
> +void iio_device_register_debugfs(struct iio_dev *indio_dev);
> +#else
> +static inline void iio_debugfs_create(void) {}
> +static inline void iio_debugfs_remove(void) {}
> +
> +static void iio_device_register_debugfs(struct iio_dev *indio_dev) {}
> +static void iio_device_unregister_debugfs(struct iio_dev *indio_dev) {}
I checked Sashiko and it points out that building with debugfs disabled
causes compiler warnings:
In file included from drivers/iio/industrialio-event.c:22:
drivers/iio/iio_core.h:30:13: warning: ‘iio_device_unregister_debugfs’ defined but not used [-Wunused-function]
30 | static void iio_device_unregister_debugfs(struct iio_dev *indio_dev) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/iio_core.h:29:13: warning: ‘iio_device_register_debugfs’ defined but not used [-Wunused-function]
29 | static void iio_device_register_debugfs(struct iio_dev *indio_dev) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
CC io_uring/fs.o
CC io_uring/splice.o
CC io_uring/sync.o
CC kernel/nsproxy.o
In file included from drivers/iio/inkern.c:18:
drivers/iio/iio_core.h:30:13: warning: ‘iio_device_unregister_debugfs’ defined but not used [-Wunused-function]
30 | static void iio_device_unregister_debugfs(struct iio_dev *indio_dev) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/iio_core.h:29:13: warning: ‘iio_device_register_debugfs’ defined but not used [-Wunused-function]
29 | static void iio_device_register_debugfs(struct iio_dev *indio_dev) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Better to mark the functions static inline.
After adding inline,
Reviewed-by: Joshua Crofts <crofts@kernel.org>
--
Kind regards,
Joshua Crofts
next prev parent reply other threads:[~2026-11-25 14:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 13:59 [PATCH v2 1/1] iio: core: Split debugfs routines Andy Shevchenko
2026-11-25 14:20 ` Andy Shevchenko
2026-11-25 14:22 ` Joshua Crofts [this message]
2026-11-25 17:26 ` Andy Shevchenko
2026-11-26 1:44 ` Jonathan Cameron
2026-11-27 8:32 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d517c95-82e1-4713-bc1f-9922a975e26d@kernel.org \
--to=crofts@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=jonathan.cameron@oss.qualcomm.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=zoone.rupert@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.