* [PATCH] nvme: don't always build constants.o
@ 2022-07-18 5:12 Christoph Hellwig
2022-07-18 20:18 ` Keith Busch
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-07-18 5:12 UTC (permalink / raw)
To: linux-nvme; +Cc: sagi, kbusch
The entire content of constants.c if guarded by an ifdef, so switch to
just building the file conditionally instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/nvme/host/Makefile | 3 ++-
drivers/nvme/host/constants.c | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/host/Makefile b/drivers/nvme/host/Makefile
index a3e88f32f560b..e27202d22c7d9 100644
--- a/drivers/nvme/host/Makefile
+++ b/drivers/nvme/host/Makefile
@@ -10,7 +10,8 @@ obj-$(CONFIG_NVME_FC) += nvme-fc.o
obj-$(CONFIG_NVME_TCP) += nvme-tcp.o
obj-$(CONFIG_NVME_APPLE) += nvme-apple.o
-nvme-core-y := core.o ioctl.o constants.o
+nvme-core-y += core.o ioctl.o
+nvme-core-$(CONFIG_NVME_VERBOSE_ERRORS) += constants.o
nvme-core-$(CONFIG_TRACING) += trace.o
nvme-core-$(CONFIG_NVME_MULTIPATH) += multipath.o
nvme-core-$(CONFIG_BLK_DEV_ZONED) += zns.o
diff --git a/drivers/nvme/host/constants.c b/drivers/nvme/host/constants.c
index 4910543f00ff9..6973c2a17c13d 100644
--- a/drivers/nvme/host/constants.c
+++ b/drivers/nvme/host/constants.c
@@ -6,7 +6,6 @@
#include "nvme.h"
-#ifdef CONFIG_NVME_VERBOSE_ERRORS
static const char * const nvme_ops[] = {
[nvme_cmd_flush] = "Flush",
[nvme_cmd_write] = "Write",
@@ -185,4 +184,3 @@ const unsigned char *nvme_get_admin_opcode_str(u8 opcode)
return nvme_admin_ops[opcode];
return "Unknown";
}
-#endif /* CONFIG_NVME_VERBOSE_ERRORS */
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] nvme: don't always build constants.o
2022-07-18 5:12 [PATCH] nvme: don't always build constants.o Christoph Hellwig
@ 2022-07-18 20:18 ` Keith Busch
2022-07-18 21:11 ` Chaitanya Kulkarni
2022-07-21 22:19 ` Sagi Grimberg
2 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2022-07-18 20:18 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-nvme, sagi
On Mon, Jul 18, 2022 at 07:12:52AM +0200, Christoph Hellwig wrote:
> The entire content of constants.c if guarded by an ifdef, so switch to
> just building the file conditionally instead.
Looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvme: don't always build constants.o
2022-07-18 5:12 [PATCH] nvme: don't always build constants.o Christoph Hellwig
2022-07-18 20:18 ` Keith Busch
@ 2022-07-18 21:11 ` Chaitanya Kulkarni
2022-07-21 22:19 ` Sagi Grimberg
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2022-07-18 21:11 UTC (permalink / raw)
To: Christoph Hellwig, linux-nvme; +Cc: sagi, kbusch
On 7/17/22 22:12, Christoph Hellwig wrote:
> The entire content of constants.c if guarded by an ifdef, so switch to
> just building the file conditionally instead.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvme: don't always build constants.o
2022-07-18 5:12 [PATCH] nvme: don't always build constants.o Christoph Hellwig
2022-07-18 20:18 ` Keith Busch
2022-07-18 21:11 ` Chaitanya Kulkarni
@ 2022-07-21 22:19 ` Sagi Grimberg
2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2022-07-21 22:19 UTC (permalink / raw)
To: Christoph Hellwig, linux-nvme; +Cc: kbusch
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-21 22:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18 5:12 [PATCH] nvme: don't always build constants.o Christoph Hellwig
2022-07-18 20:18 ` Keith Busch
2022-07-18 21:11 ` Chaitanya Kulkarni
2022-07-21 22:19 ` Sagi Grimberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.