mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Amit Kucheria <amitk@kernel.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Mark Brown <broonie@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	linux-iio@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org
Subject: Re: [PATCH linux-next] thermal/drivers/qcom-spmi-mbg-tm: Add module namespace import for IIO_CONSUMER
Date: Thu, 13 Aug 2026 02:35:43 +0100	[thread overview]
Message-ID: <20260813023543.6936b188@jic23-huawei> (raw)
In-Reply-To: <20260812-qcom-spmi-mbg-tm-ns-modpost-error-v1-1-d849390d2714@kernel.org>

On Wed, 12 Aug 2026 18:17:22 -0700
Nathan Chancellor <nathan@kernel.org> wrote:

> Commit ebf1d03dab96 ("iio: inkern: Use namespaced exports") in the iio
> tree restricts certain exported core functions that a driver added in
> commit c3dce117333c ("thermal/drivers/qcom: Add support for Qualcomm MBG
> thermal monitoring") from the thermal tree uses, causing modpost to
> warn (or error without CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS):
> 
>   ERROR: modpost: drivers/thermal/qcom/qcom-spmi-mbg-tm.ko: module uses symbol 'devm_iio_channel_get' from namespace 'IIO_CONSUMER', but does not import it.
>   ERROR: modpost: drivers/thermal/qcom/qcom-spmi-mbg-tm.ko: module uses symbol 'iio_read_channel_processed' from namespace 'IIO_CONSUMER', but does not import it.
> 
> Add the IIO_CONSUMER namespace import to clear up the error.
> 
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Ah. I'd forgotten we had the namespace addition earlier this cycle.
Too much going on at the moment :(

Sorry about that - I should have given you a heads up.  Another
win for linux-next testing things!

> ---
> I am not sure how this should be handled. As far as I can tell, there is
> no error if this patch is applied to the thermal tree directly but it
> would leave an "orphaned" module namespace import until the iio and
> thermal trees are combined, which may not be preferable. Otherwise, it
> would need to be applied to whatever merge happens second (hence
> including Mark and Jonathan in this conversation).

I did plan for this being a possible issue:

Ideal is merge 
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git #iio-inkern-namespace-ib
to the thermal tree.  If I'd called that out originally (or a thermal
rebase is a possibility) it would be cleaner to do this before the
qcom patch adds another user then squash what you have here in the appropriate
patch.  Alternative is do it as a merge conflict resolution whilst merging
in that tree.  If the second, I'd also mention that in the thermal pull request to
Linus given it's a little unusual.

Jonathan

> ---
>  drivers/thermal/qcom/qcom-spmi-mbg-tm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/thermal/qcom/qcom-spmi-mbg-tm.c b/drivers/thermal/qcom/qcom-spmi-mbg-tm.c
> index 0492d5eeca01..a05bb444627a 100644
> --- a/drivers/thermal/qcom/qcom-spmi-mbg-tm.c
> +++ b/drivers/thermal/qcom/qcom-spmi-mbg-tm.c
> @@ -254,3 +254,4 @@ module_platform_driver(mbg_tm_driver);
>  
>  MODULE_DESCRIPTION("PMIC MBG Temperature monitor driver");
>  MODULE_LICENSE("GPL");
> +MODULE_IMPORT_NS("IIO_CONSUMER");
> 
> ---
> base-commit: 28d012efb4327f9c75d5e042a7c91e9a542efa98
> change-id: 20260812-qcom-spmi-mbg-tm-ns-modpost-error-fad8be2f985c
> 
> Best regards,
> --  
> Cheers,
> Nathan
> 


  reply	other threads:[~2026-08-13  1:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  1:17 Nathan Chancellor
2026-08-13  1:35 ` Jonathan Cameron [this message]
2026-08-14  0:05   ` Nathan Chancellor
2026-08-21 10:29     ` Uwe Kleine-König
2026-08-21 10:40       ` Daniel Lezcano
2026-08-25 18:59         ` Rafael J. Wysocki (Intel)

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=20260813023543.6936b188@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=amitk@kernel.org \
    --cc=broonie@kernel.org \
    --cc=daniel.lezcano@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=nathan@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=thara.gopinath@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 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®