From: Hemant Agrawal Date: Thu, 25 Jan 2018 09:53:27 +0000 (+0530) Subject: bus/dpaa: fix clang warnings X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d309d48aeee4512e53d3d8e8e6eb626bb79f5c22;p=dpdk.git bus/dpaa: fix clang warnings fman.c:570:15: error: format specifies type 'unsigned short' but the argument has type 'int' fman/netcfg_layer.c:80:1: error: unused function 'get_num_netcfg_interfaces' Fixes: 919eeaccb2ba ("bus/dpaa: introduce NXP DPAA bus driver skeleton") Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index 1dd1f91d99..bda62e0110 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -566,7 +566,7 @@ fman_finish(void) /* release the mapping */ _errno = munmap(__if->ccsr_map, __if->regs_size); if (unlikely(_errno < 0)) - fprintf(stderr, "%s:%hu:%s(): munmap() = %d (%s)\n", + fprintf(stderr, "%s:%d:%s(): munmap() = %d (%s)\n", __FILE__, __LINE__, __func__, -errno, strerror(errno)); printf("Tearing down %s\n", __if->node_path); diff --git a/drivers/bus/dpaa/base/fman/netcfg_layer.c b/drivers/bus/dpaa/base/fman/netcfg_layer.c index 24186c9adb..3e956ce129 100644 --- a/drivers/bus/dpaa/base/fman/netcfg_layer.c +++ b/drivers/bus/dpaa/base/fman/netcfg_layer.c @@ -76,22 +76,6 @@ dump_netcfg(struct netcfg_info *cfg_ptr) } #endif /* RTE_LIBRTE_DPAA_DEBUG_DRIVER */ -static inline int -get_num_netcfg_interfaces(char *str) -{ - char *pch; - uint8_t count = 0; - - if (str == NULL) - return -EINVAL; - pch = strtok(str, ","); - while (pch != NULL) { - count++; - pch = strtok(NULL, ","); - } - return count; -} - struct netcfg_info * netcfg_acquire(void) { diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index f5840de778..41ee640e24 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -64,12 +64,6 @@ dpaa_add_to_device_list(struct rte_dpaa_device *dev) TAILQ_INSERT_TAIL(&rte_dpaa_bus.device_list, dev, next); } -static inline void -dpaa_remove_from_device_list(struct rte_dpaa_device *dev) -{ - TAILQ_INSERT_TAIL(&rte_dpaa_bus.device_list, dev, next); -} - /* * Reads the SEC device from DTS * Returns -1 if SEC devices not available, 0 otherwise