From 1b7ebe9b4510bc98acd80c991a4176f8412dd197 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sat, 21 Dec 2024 22:16:34 +0900 Subject: [PATCH] netapp: avoid sprinkling ifdefs Use empty json functions instead without json. Signed-off-by: Tokunori Ikegami --- plugins/netapp/netapp-nvme.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c index 884731279a..1acc97d437 100644 --- a/plugins/netapp/netapp-nvme.c +++ b/plugins/netapp/netapp-nvme.c @@ -248,7 +248,6 @@ static void netapp_get_ontap_labels(char *vsname, char *nspath, } } -#ifdef CONFIG_JSONC static void netapp_smdevice_json(struct json_object *devices, char *devname, char *arrayname, char *volname, int nsid, char *nguid, char *ctrl, char *astate, char *version, unsigned long long lba, @@ -294,7 +293,6 @@ static void netapp_ontapdevice_json(struct json_object *devices, char *devname, json_array_add_value_object(devices, device_attrs); } -#endif /* CONFIG_JSONC */ static void netapp_smdevices_print_verbose(struct smdevice_info *devices, int count, int format, const char *devname) @@ -442,7 +440,6 @@ static void netapp_smdevices_print_regular(struct smdevice_info *devices, } } -#ifdef CONFIG_JSONC static void netapp_smdevices_print_json(struct smdevice_info *devices, int count, const char *devname) { @@ -511,9 +508,6 @@ static void netapp_smdevices_print_json(struct smdevice_info *devices, printf("\n"); json_free_object(root); } -#else /* CONFIG_JSONC */ -#define netapp_smdevices_print_json(devices, count, devname) -#endif /* CONFIG_JSONC */ static void netapp_ontapdevices_print_verbose(struct ontapdevice_info *devices, int count, int format, const char *devname) @@ -629,7 +623,6 @@ static void netapp_ontapdevices_print_regular(struct ontapdevice_info *devices, } } -#ifdef CONFIG_JSONC static void netapp_ontapdevices_print_json(struct ontapdevice_info *devices, int count, const char *devname) { @@ -686,9 +679,6 @@ static void netapp_ontapdevices_print_json(struct ontapdevice_info *devices, printf("\n"); json_free_object(root); } -#else /* CONFIG_JSONC */ -#define netapp_ontapdevices_print_json(devices, count, devname) -#endif /* CONFIG_JSONC */ static int nvme_get_ontap_c2_log(int fd, __u32 nsid, void *buf, __u32 buflen) {