LF-1897 trusty: Fix extra argument to printf format specifier
authorJi Luo <ji.luo@nxp.com>
Mon, 3 Aug 2020 14:44:11 +0000 (22:44 +0800)
committerJi Luo <ji.luo@nxp.com>
Wed, 19 May 2021 12:07:14 +0000 (20:07 +0800)
Fix Coverity Issue 10473659 and 10473672. Pass correct parameter
to fix the extra argument issue.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I72e30250827ad0c48e079a7048bdb40773c17a96
(cherry picked from commit ed061b4a21a24d8deb36561e0bfe2343e2ce45c8)

lib/trusty/ql-tipc/keymaster.c

index 4880510..90a34e5 100644 (file)
@@ -247,7 +247,7 @@ static int km_get_version(int32_t *version)
 
     rc = km_send_request(KM_GET_VERSION, NULL, 0);
     if (rc < 0) {
-        trusty_error("failed to send km version request", rc);
+        trusty_error("failed (%d) to send km version request", rc);
         return rc;
     }
 
@@ -524,7 +524,7 @@ int trusty_get_mppubk(uint8_t *mppubk, uint32_t *size)
 
     rc = km_send_request(KM_GET_MPPUBK, NULL, 0);
     if (rc < 0) {
-        trusty_error("failed to send km mppubk request\n", rc);
+        trusty_error("%s: failed (%d) to send km mppubk request\n", __func__, rc);
         return rc;
     }