From: "Arnd Bergmann" <arnd@arndb.de>
To: "Bean Huo" <beanhuo@iokpp.de>,
"Avri Altman" <avri.altman@wdc.com>,
avri.altman@sandisk.com, "Bart Van Assche" <bvanassche@acm.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
can.guo@oss.qualcomm.com, "Ulf Hansson" <ulf.hansson@linaro.org>,
"Bean Huo" <beanhuo@micron.com>,
"Jens Wiklander" <jens.wiklander@linaro.org>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH v1] scsi: ufs: Fix RPMB link error by reversing Kconfig dependencies
Date: Tue, 02 Dec 2025 16:57:20 +0100 [thread overview]
Message-ID: <c8656f51-a683-4943-ae6e-d310217897a9@app.fastmail.com> (raw)
In-Reply-To: <20251202155138.2607210-1-beanhuo@iokpp.de>
On Tue, Dec 2, 2025, at 16:51, Bean Huo wrote:
> From: Bean Huo <beanhuo@micron.com>
>
> When CONFIG_SCSI_UFSHCD=y and CONFIG_RPMB=m, the kernel fails to link
> with undefined references to ufs_rpmb_probe() and ufs_rpmb_remove():
>
> ld: drivers/ufs/core/ufshcd.c:8950: undefined reference to `ufs_rpmb_probe'
> ld: drivers/ufs/core/ufshcd.c:10505: undefined reference to `ufs_rpmb_remove'
>
> The issue is that RPMB depends on its consumers (MMC, UFS) in Kconfig, which
> is backwards. This prevents proper module dependency handling when the library
> is modular but consumers are built-in.
>
> Fix by reversing the dependency:
> - Remove 'depends on MMC || SCSI_UFSHCD' from RPMB Kconfig
> - Add 'depends on RPMB || !RPMB' to SCSI_UFSHCD Kconfig
>
> This allows RPMB to be an independent library while ensuring correct
> linking in all module/built-in combinations.
>
> Fixes: b06b8c421485 ("scsi: ufs: core: Add OP-TEE based RPMB driver for
> UFS devices")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes:
> https://lore.kernel.org/oe-kbuild-all/202511300443.h7sotuL0-lkp@intel.com/
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Bart Van Assche <bvanassche@acm.org>
> Cc: Jens Wiklander <jens.wiklander@linaro.org>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Bean Huo <beanhuo@micron.com>
Looks good to me,
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
next prev parent reply other threads:[~2025-12-02 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 15:51 Bean Huo
2025-12-02 15:57 ` Arnd Bergmann [this message]
2025-12-02 16:07 ` Jens Wiklander
2025-12-03 0:04 ` Bart Van Assche
2025-12-03 6:35 ` Martin K. Petersen
2025-12-09 3:21 ` Martin K. Petersen
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=c8656f51-a683-4943-ae6e-d310217897a9@app.fastmail.com \
--to=arnd@arndb.de \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@sandisk.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@iokpp.de \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=can.guo@oss.qualcomm.com \
--cc=jejb@linux.ibm.com \
--cc=jens.wiklander@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=martin.petersen@oracle.com \
--cc=ulf.hansson@linaro.org \
/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®