[dpdk-dev,1/5] bus/dpaa: fix compilation warnings with clang
Checks
Commit Message
fman.c:570:15: error: format specifies type 'unsigned short' but the
argument has type 'int' [-Werror,-Wformat] __FILE__, __LINE__, __func__,
fman/netcfg_layer.c:80:1: error: unused function 'get_num_netcfg_interfaces
' [-Werror,-Wunused-function] get_num_netcfg_interfaces(char *str)
Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/dpaa/base/fman/fman.c | 2 +-
drivers/bus/dpaa/base/fman/netcfg_layer.c | 16 ----------------
2 files changed, 1 insertion(+), 17 deletions(-)
Comments
On Thursday 25 January 2018 03:23 PM, Hemant Agrawal wrote:
> fman.c:570:15: error: format specifies type 'unsigned short' but the
> argument has type 'int' [-Werror,-Wformat] __FILE__, __LINE__, __func__,
>
> fman/netcfg_layer.c:80:1: error: unused function 'get_num_netcfg_interfaces
> ' [-Werror,-Wunused-function] get_num_netcfg_interfaces(char *str)
>
> Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations")
> Cc: stable@dpdk.org
>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
@@ -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);
@@ -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)
{