nvme: common: make keyring and auth separate modules
authorArnd Bergmann <arnd@arndb.de>
Thu, 26 Oct 2023 13:08:03 +0000 (15:08 +0200)
committerKeith Busch <kbusch@kernel.org>
Tue, 7 Nov 2023 18:05:15 +0000 (10:05 -0800)
commit6affe08aea5f3b630565676e227b41d55a6f009c
treed241517de15d44dfbf2a803c30767e41be90316a
parent4733b65d82bdb19bca5ba47ff6c9b24bce1b3f9f
nvme: common: make keyring and auth separate modules

When only the keyring module is included but auth is not, modpost
complains about the lack of a module license tag:

ERROR: modpost: missing MODULE_LICENSE() in drivers/nvme/common/nvme-common.o

Address this by making both modules buildable standalone,
removing the now unnecessary CONFIG_NVME_COMMON symbol
in the process.

Also, now that NVME_KEYRING config symbol can be either a module or
built-in, the stubs need to check for '#if IS_ENABLED' rather than a
simple '#ifdef'.

Fixes: 9d77eb5277849 ("nvme-keyring: register '.nvme' keyring")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/Makefile
drivers/nvme/common/Kconfig
drivers/nvme/common/Makefile
drivers/nvme/common/keyring.c
drivers/nvme/host/Kconfig
drivers/nvme/target/Kconfig
include/linux/nvme-keyring.h