From: sashiko-bot@kernel.org
To: "Rodrigo Alencar" <rodrigo.alencar@analog.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 07/17] iio: test: add kunit tests for channel prefix naming generation
Date: Tue, 14 Jul 2026 12:12:51 +0000 [thread overview]
Message-ID: <20260714121252.445271F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260714-ad9910-iio-driver-v8-7-36939c3c07d2@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The tristate Kconfig option IIO_CHANNEL_PREFIX_KUNIT_TEST allows a configuration where the test is built-in but KUnit is a module, causing linker failures.
--
--- Patch [7]: [PATCH v8 07/17] iio: test: add kunit tests for channel prefix naming generation ---
commit 103d8c2a68a52f0447bd7dca00d5cedd2334e131
Author: Rodrigo Alencar <rodrigo.alencar@analog.com>
iio: test: add kunit tests for channel prefix naming generation
This commit adds a KUnit test suite for the internal helper function
__iio_chan_prefix_emit(), which builds IIO sysfs attribute name prefixes.
Because the function is static, the test file is included directly into
industrialio-core.c.
> diff --git a/drivers/iio/test/Kconfig b/drivers/iio/test/Kconfig
> index 4fc17dd0dcd77..7d2c29cc583b9 100644
> --- a/drivers/iio/test/Kconfig
> +++ b/drivers/iio/test/Kconfig
[ ... ]
> @@ -4,6 +4,20 @@
> #
>
> # Keep in alphabetical order
> +config IIO_CHANNEL_PREFIX_KUNIT_TEST
> + tristate "Test IIO channel prefix" if !KUNIT_ALL_TESTS
> + depends on KUNIT && IIO
> + default KUNIT_ALL_TESTS
[ ... ]
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index b365922d84810..3909255212f5e 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
[ ... ]
> @@ -2230,6 +2230,10 @@ EXPORT_SYMBOL_GPL(iio_device_get_current_mode);
> subsys_initcall(iio_init);
> module_exit(iio_exit);
>
> +#if IS_ENABLED(CONFIG_IIO_CHANNEL_PREFIX_KUNIT_TEST)
> +#include "test/iio-test-channel-prefix.c"
> +#endif
[Severity: High]
Does this setup cause linker errors if CONFIG_IIO is built-in (y) and
CONFIG_KUNIT is built as a module (m)?
Looking at the Kconfig, IIO_CHANNEL_PREFIX_KUNIT_TEST is a tristate that
depends on KUNIT && IIO. If CONFIG_IIO=y and CONFIG_KUNIT=m, the test config
evaluates to 'm'.
Because IS_ENABLED() is true for both 'y' and 'm', this preprocessor check
will include the test code directly into industrialio-core.o, which is built-in.
Since the test code references KUnit symbols that are isolated in a loadable
module, could this result in undefined reference errors during the final
vmlinux link stage?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260714-ad9910-iio-driver-v8-0-36939c3c07d2@analog.com?part=7
next prev parent reply other threads:[~2026-07-14 12:12 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 11:02 [PATCH v8 00/17] AD9910 Direct Digital Synthesizer Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 01/17] iio: ABI: add attributes for altcurrent channels Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:14 ` sashiko-bot
2026-07-14 11:02 ` [PATCH v8 02/17] iio: ABI: raw, scale and offset for frequency/phase channels Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:25 ` sashiko-bot
2026-07-14 11:02 ` [PATCH v8 03/17] iio: ABI: add parent entry for iio channels Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 04/17] iio: add IIO_FREQUENCY channel type Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 05/17] iio: core: support 64-bit register through debugfs Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 06/17] iio: core: create local __iio_chan_prefix_emit() for reuse Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:46 ` Andy Shevchenko
2026-07-14 11:02 ` [PATCH v8 07/17] iio: test: add kunit tests for channel prefix naming generation Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 12:12 ` sashiko-bot [this message]
2026-07-14 11:02 ` [PATCH v8 08/17] iio: core: add hierarchical channel relationships Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 09/17] dt-bindings: iio: frequency: add ad9910 Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 10/17] iio: frequency: ad9910: initial driver implementation Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 12:29 ` sashiko-bot
2026-07-14 11:02 ` [PATCH v8 11/17] iio: frequency: ad9910: add basic parallel port support Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 12/17] iio: frequency: ad9910: add digital ramp generator support Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 13/17] iio: frequency: ad9910: add RAM mode support Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 13:17 ` sashiko-bot
2026-07-14 11:02 ` [PATCH v8 14/17] iio: frequency: ad9910: add output shift keying support Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 15/17] iio: frequency: ad9910: show channel priority in debugfs Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 16/17] iio: ABI: add docs for ad9910 sysfs and debugfs entries Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
2026-07-14 11:02 ` [PATCH v8 17/17] docs: iio: add documentation for ad9910 driver Rodrigo Alencar
2026-07-14 11:02 ` Rodrigo Alencar via B4 Relay
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=20260714121252.445271F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rodrigo.alencar@analog.com \
--cc=sashiko-reviews@lists.linux.dev \
/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.