From: "Arnd Bergmann" <arnd@arndb.de>
To: "Hannes Reinecke" <hare@suse.de>,
"Arnd Bergmann" <arnd@kernel.org>,
"Keith Busch" <kbusch@kernel.org>, "Jens Axboe" <axboe@kernel.dk>,
"Christoph Hellwig" <hch@lst.de>,
"Sagi Grimberg" <sagi@grimberg.me>,
"Chaitanya Kulkarni" <kch@nvidia.com>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] nvme: keyring: fix conditional compilation
Date: Wed, 25 Oct 2023 09:36:23 +0200 [thread overview]
Message-ID: <d89d139e-744f-4bf2-bdd7-5bfaab1cc7fb@app.fastmail.com> (raw)
In-Reply-To: <60b7f4c3-c5e8-4fab-bf31-d576fff7a016@suse.de>
On Wed, Oct 25, 2023, at 09:02, Hannes Reinecke wrote:
> On 10/20/23 22:54, Arnd Bergmann wrote:
oid)
>> +
>> +static inline key_serial_t nvme_target_keyring_id(void)
>> {
>> + if (IS_ENABLED(CONFIG_NVME_TARGET_TCP_TLS))
>> + return nvme_keyring_id();
>> +
>> return 0;
>> }
>> -static inline int nvme_keyring_init(void)
>> +
>> +static inline int nvme_target_keyring_init(void)
>> {
>> + if (IS_ENABLED(CONFIG_NVME_TCP_TLS))
>> + return nvme_keyring_init();
>> +
>> return 0;
>> }
>> -static inline void nvme_keyring_exit(void) {}
>>
>> -#endif /* !CONFIG_NVME_KEYRING */
>> +static inline void nvme_target_keyring_exit(void)
>> +{
>> + if (IS_ENABLED(CONFIG_NVME_TARGET_TCP_TLS))
>> + nvme_keyring_exit();
>> +}
>> +
>> #endif /* _NVME_KEYRING_H */
>
> I guess the right way is to make 'keyring' a 'real' module, and move
> 'nvme_keyring_init()' and 'nvme_keyring_exit()' as the modules init/exit
> functions. I'll prepare a patch.
That's probably a good idea, but you still need to address
the link failure for nvme_keyring_id() and nvme_tls_psk_default()
when the caller is built-in and the definition is in a loadable
module.
Arnd
prev parent reply other threads:[~2023-10-25 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 20:54 [PATCH] [v2] nvme: keyring: fix conditional compilation Arnd Bergmann
2023-10-25 7:02 ` Hannes Reinecke
2023-10-25 7:36 ` Arnd Bergmann [this message]
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=d89d139e-744f-4bf2-bdd7-5bfaab1cc7fb@app.fastmail.com \
--to=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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