From: Stefan Wahren Date: Mon, 31 Oct 2016 14:39:28 +0000 (+0000) Subject: staging: vchiq_core: fix format strings in vchiq_dump_service_state X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=396e92544ee3d4ee52575d852f1351c0dfe77585;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: vchiq_core: fix format strings in vchiq_dump_service_state The member localport and remoteport are unsigned. So fix the format string accordingly. The issue has been found by Cppcheck. Signed-off-by: Stefam Wahren Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 7984ff9fad87..27738cadeb0a 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -3740,7 +3740,7 @@ vchiq_dump_service_state(void *dump_context, VCHIQ_SERVICE_T *service) char buf[80]; int len; - len = snprintf(buf, sizeof(buf), "Service %d: %s (ref %u)", + len = snprintf(buf, sizeof(buf), "Service %u: %s (ref %u)", service->localport, srvstate_names[service->srvstate], service->ref_count - 1); /*Don't include the lock just taken*/ @@ -3752,7 +3752,7 @@ vchiq_dump_service_state(void *dump_context, VCHIQ_SERVICE_T *service) int tx_pending, rx_pending; if (service->remoteport != VCHIQ_PORT_FREE) { int len2 = snprintf(remoteport, sizeof(remoteport), - "%d", service->remoteport); + "%u", service->remoteport); if (service->public_fourcc != VCHIQ_FOURCC_INVALID) snprintf(remoteport + len2, sizeof(remoteport) - len2,