memory: Convert to using %pOFn instead of device_node.name
authorRob Herring <robh@kernel.org>
Tue, 28 Aug 2018 00:57:23 +0000 (19:57 -0500)
committerRob Herring <robh@kernel.org>
Tue, 27 Nov 2018 16:54:39 +0000 (10:54 -0600)
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Roger Quadros <rogerq@ti.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/memory/omap-gpmc.c
drivers/memory/samsung/exynos-srom.c
drivers/memory/tegra/mc.c
drivers/memory/tegra/tegra124-emc.c

index c215287e80cf3bbff8d452f53bf097fba39148dd..8abb9e94916ad1e91c949ecb5c2d6afbc5fcb425 100644 (file)
@@ -2145,8 +2145,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
                        gpmc_s.device_width = GPMC_DEVWIDTH_16BIT;
                        break;
                default:
-                       dev_err(&pdev->dev, "%s: invalid 'nand-bus-width'\n",
-                               child->name);
+                       dev_err(&pdev->dev, "%pOFn: invalid 'nand-bus-width'\n",
+                               child);
                        ret = -EINVAL;
                        goto err;
                }
@@ -2186,8 +2186,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
 
        ret = gpmc_cs_set_timings(cs, &gpmc_t, &gpmc_s);
        if (ret) {
-               dev_err(&pdev->dev, "failed to set gpmc timings for: %s\n",
-                       child->name);
+               dev_err(&pdev->dev, "failed to set gpmc timings for: %pOFn\n",
+                       child);
                goto err_cs;
        }
 
@@ -2215,7 +2215,7 @@ no_timings:
 
 err_child_fail:
 
-       dev_err(&pdev->dev, "failed to create gpmc child %s\n", child->name);
+       dev_err(&pdev->dev, "failed to create gpmc child %pOFn\n", child);
        ret = -ENODEV;
 
 err_cs:
@@ -2265,14 +2265,10 @@ static void gpmc_probe_dt_children(struct platform_device *pdev)
        struct device_node *child;
 
        for_each_available_child_of_node(pdev->dev.of_node, child) {
-
-               if (!child->name)
-                       continue;
-
                ret = gpmc_probe_generic_child(pdev, child);
                if (ret) {
-                       dev_err(&pdev->dev, "failed to probe DT child '%s': %d\n",
-                               child->name, ret);
+                       dev_err(&pdev->dev, "failed to probe DT child '%pOFn': %d\n",
+                               child, ret);
                }
        }
 }
index 7edd7fb540f25a90dfe2a8b3185f22ae9ff504b1..c27c6105c66d8a44f6c1712ca176d985abc155fe 100644 (file)
@@ -139,8 +139,8 @@ static int exynos_srom_probe(struct platform_device *pdev)
        for_each_child_of_node(np, child) {
                if (exynos_srom_configure_bank(srom, child)) {
                        dev_err(dev,
-                               "Could not decode bank configuration for %s\n",
-                               child->name);
+                               "Could not decode bank configuration for %pOFn\n",
+                               child);
                        bad_bank_config = true;
                }
        }
index bd25faf6d13d319db73d399b98f7163332dbd895..24afc36833bf56a92916b3ca99bda88bd0472d8b 100644 (file)
@@ -345,7 +345,7 @@ static int load_one_timing(struct tegra_mc *mc,
        err = of_property_read_u32(node, "clock-frequency", &tmp);
        if (err) {
                dev_err(mc->dev,
-                       "timing %s: failed to read rate\n", node->name);
+                       "timing %pOFn: failed to read rate\n", node);
                return err;
        }
 
@@ -360,8 +360,8 @@ static int load_one_timing(struct tegra_mc *mc,
                                         mc->soc->num_emem_regs);
        if (err) {
                dev_err(mc->dev,
-                       "timing %s: failed to read EMEM configuration\n",
-                       node->name);
+                       "timing %pOFn: failed to read EMEM configuration\n",
+                       node);
                return err;
        }
 
index 392dc8dd481f3c68a52efb5aa9756e8c64bd3f5e..eedb7d48e2ea76586458bf4abaa92ce45247478b 100644 (file)
@@ -888,8 +888,8 @@ static int load_one_timing_from_dt(struct tegra_emc *emc,
 
        err = of_property_read_u32(node, "clock-frequency", &value);
        if (err) {
-               dev_err(emc->dev, "timing %s: failed to read rate: %d\n",
-                       node->name, err);
+               dev_err(emc->dev, "timing %pOFn: failed to read rate: %d\n",
+                       node, err);
                return err;
        }
 
@@ -900,16 +900,16 @@ static int load_one_timing_from_dt(struct tegra_emc *emc,
                                         ARRAY_SIZE(timing->emc_burst_data));
        if (err) {
                dev_err(emc->dev,
-                       "timing %s: failed to read emc burst data: %d\n",
-                       node->name, err);
+                       "timing %pOFn: failed to read emc burst data: %d\n",
+                       node, err);
                return err;
        }
 
 #define EMC_READ_PROP(prop, dtprop) { \
        err = of_property_read_u32(node, dtprop, &timing->prop); \
        if (err) { \
-               dev_err(emc->dev, "timing %s: failed to read " #prop ": %d\n", \
-                       node->name, err); \
+               dev_err(emc->dev, "timing %pOFn: failed to read " #prop ": %d\n", \
+                       node, err); \
                return err; \
        } \
 }