On 11/9/22 12:44, Keith Busch wrote:
On Tue, Nov 08, 2022 at 04:02:42PM +0100, Christoph Hellwig wrote:
quoted
-#ifdef CONFIG_BLK_SED_OPAL
-int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
+static int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
bool send)
{
struct nvme_ctrl *ctrl = data;@@ -2198,8 +2197,21 @@ int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
return __nvme_submit_sync_cmd(ctrl->admin_q, &cmd, NULL, buffer, len,
NVME_QID_ANY, 1, 0);
}
-EXPORT_SYMBOL_GPL(nvme_sec_submit);
-#endif /* CONFIG_BLK_SED_OPAL */
It looks like you need to keep the #ifdef. The compiler knows it's not
used without it:
drivers/nvme/host/core.c:2183:12: warning: 'nvme_sec_submit' defined but not used [-Wunused-function]
static int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
why not move the sed-opal-code into its own file ?
and remove that #ifdefs altogether and conditionally compile the
file like zns?
-ck
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel