[dpdk-dev] [PATCH 2/4] bus/fslmc: fix printf of null pointer

Bruce Richardson bruce.richardson at intel.com
Wed May 1 21:50:12 CEST 2019


Printing a null pointer with %s is flagged as a warning by GCC 9, and
should not be done. Replace the %s with the word "null" itself.

Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")
Cc: shreyansh.jain at nxp.com

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index eaa39a209..f6e66d22c 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -197,7 +197,7 @@ scan_one_fslmc_device(char *dev_name)
 
 	t_ptr = strtok(NULL, ".");
 	if (!t_ptr) {
-		DPAA2_BUS_ERR("Incorrect device string observed (%s)", t_ptr);
+		DPAA2_BUS_ERR("Incorrect device string observed (null)");
 		goto cleanup;
 	}
 
-- 
2.21.0



More information about the dev mailing list