From: Tokunori Ikegami Date: Sat, 21 Dec 2024 13:16:34 +0000 (+0900) Subject: netapp: avoid sprinkling ifdefs X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7da1a332e5a4d8031770d4d55cd21ffc55d6f486;p=users%2Fsagi%2Fnvme-cli.git netapp: avoid sprinkling ifdefs Use empty json functions instead without json. Signed-off-by: Tokunori Ikegami --- diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c index 88473127..1acc97d4 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 @@ out: 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 @@ out: 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) {