soc: qcom: smem: use %*ph to print small buffer
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 30 Jul 2020 15:32:20 +0000 (18:32 +0300)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 28 Dec 2020 20:15:09 +0000 (14:15 -0600)
Use %*ph format to print small buffer as hex string.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200730153220.39466-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/soc/qcom/smem.c

index 7251827..cc4e065 100644 (file)
@@ -732,9 +732,7 @@ qcom_smem_partition_header(struct qcom_smem *smem,
        header = smem->regions[0].virt_base + le32_to_cpu(entry->offset);
 
        if (memcmp(header->magic, SMEM_PART_MAGIC, sizeof(header->magic))) {
-               dev_err(smem->dev, "bad partition magic %02x %02x %02x %02x\n",
-                       header->magic[0], header->magic[1],
-                       header->magic[2], header->magic[3]);
+               dev_err(smem->dev, "bad partition magic %4ph\n", header->magic);
                return NULL;
        }