Skip to content

Commit

Permalink
netapp: avoid sprinkling ifdefs
Browse files Browse the repository at this point in the history
Use empty json functions instead without json.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t committed Dec 21, 2024
1 parent 0250ca0 commit 1b7ebe9
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions plugins/netapp/netapp-nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 1b7ebe9

Please sign in to comment.