]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
firmware: arm_scmi: Simplify printks with pOF format
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 12 Sep 2025 09:24:24 +0000 (11:24 +0200)
committerSudeep Holla <sudeep.holla@arm.com>
Fri, 12 Sep 2025 10:32:21 +0000 (11:32 +0100)
Print full device node name with %pOF format, so the code will be a bit
simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Message-Id: <20250912092423.162497-2-krzysztof.kozlowski@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/bus.c
drivers/firmware/arm_scmi/transports/mailbox.c

index 24e59ddf85e7c774ee2827d7457a565d2624ca41..c7698cfaa4e8340befdebb3cf14d50509f8c7d29 100644 (file)
@@ -401,8 +401,8 @@ static void scmi_device_release(struct device *dev)
 
 static void __scmi_device_destroy(struct scmi_device *scmi_dev)
 {
-       pr_debug("(%s) Destroying SCMI device '%s' for protocol 0x%x (%s)\n",
-                of_node_full_name(scmi_dev->dev.parent->of_node),
+       pr_debug("(%pOF) Destroying SCMI device '%s' for protocol 0x%x (%s)\n",
+                scmi_dev->dev.parent->of_node,
                 dev_name(&scmi_dev->dev), scmi_dev->protocol_id,
                 scmi_dev->name);
 
@@ -474,9 +474,8 @@ __scmi_device_create(struct device_node *np, struct device *parent,
        if (retval)
                goto put_dev;
 
-       pr_debug("(%s) Created SCMI device '%s' for protocol 0x%x (%s)\n",
-                of_node_full_name(parent->of_node),
-                dev_name(&scmi_dev->dev), protocol, name);
+       pr_debug("(%pOF) Created SCMI device '%s' for protocol 0x%x (%s)\n",
+                parent->of_node, dev_name(&scmi_dev->dev), protocol, name);
 
        return scmi_dev;
 put_dev:
@@ -493,8 +492,8 @@ _scmi_device_create(struct device_node *np, struct device *parent,
 
        sdev = __scmi_device_create(np, parent, protocol, name);
        if (!sdev)
-               pr_err("(%s) Failed to create device for protocol 0x%x (%s)\n",
-                      of_node_full_name(parent->of_node), protocol, name);
+               pr_err("(%pOF) Failed to create device for protocol 0x%x (%s)\n",
+                      parent->of_node, protocol, name);
 
        return sdev;
 }
index bd041c99b92bd32d724140b8c6952b21651f1534..ae0f67e6cc45fe19326a0a53730cd0163d1e0a05 100644 (file)
@@ -127,8 +127,8 @@ static int mailbox_chan_validate(struct device *cdev, int *a2p_rx_chan,
            (num_mb == 1 && num_sh != 1) || (num_mb == 3 && num_sh != 2) ||
            (num_mb == 4 && num_sh != 2)) {
                dev_warn(cdev,
-                        "Invalid channel descriptor for '%s' - mbs:%d  shm:%d\n",
-                        of_node_full_name(np), num_mb, num_sh);
+                        "Invalid channel descriptor for '%pOF' - mbs:%d  shm:%d\n",
+                        np, num_mb, num_sh);
                return -EINVAL;
        }
 
@@ -140,8 +140,7 @@ static int mailbox_chan_validate(struct device *cdev, int *a2p_rx_chan,
                                        of_parse_phandle(np, "shmem", 1);
 
                if (!np_tx || !np_rx || np_tx == np_rx) {
-                       dev_warn(cdev, "Invalid shmem descriptor for '%s'\n",
-                                of_node_full_name(np));
+                       dev_warn(cdev, "Invalid shmem descriptor for '%pOF'\n", np);
                        ret = -EINVAL;
                }
        }