ARM: omap: Convert to using %pOFn instead of device_node.name
Subsystems (121)
PATCH 1/1 ARM: omap: Convert to using %pOFn instead of device_node.name
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- arch/arm/mach-omap2/omap_hwmod.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +11 -11
@@ -738,7 +738,7 @@ static int __init _setup_clkctrl_provider(struct device_node *np) provider->size = size |0xff ; provider->node = np; -pr_debug ("%s: %s: %x...%x [+%x]\n" , __func__, np->parent->name, +pr_debug ("%pOF: %s: %x...%x [+%x]\n" , __func__, np->parent, provider->addr, provider->addr + provider->size, provider->offset);
@@ -799,9 +799,9 @@ static struct clk *_lookup_clkctrl_clk(struct omap_hwmod *oh) clk =of_clk_get_from_provider (&clkspec); -pr_debug ("%s: %s got %p (offset=%x, provider=%s)\n" , +pr_debug ("%s: %s got %p (offset=%x, provider=%pOFn)\n" , __func__, oh->name, clk, clkspec.args[0 ], - provider->node->parent->name); + provider->node->parent);return clk; }
@@ -2107,8 +2107,8 @@ static int of_dev_find_hwmod(struct device_node *np,if (res)continue ;if (!strcmp (p, oh->name)) { -pr_debug ("omap_hwmod: dt %s[%i] uses hwmod %s\n" , - np->name, i, oh->name); +pr_debug ("omap_hwmod: dt %pOFn[%i] uses hwmod %s\n" , + np, i, oh->name);return i; } }
@@ -2210,8 +2210,8 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh,return -ENOENT ;if (nr_addr !=1 || nr_size !=1 ) { -pr_err ("%s: invalid range for %s->%s\n" , __func__, - oh->name, np->name); +pr_err ("%s: invalid range for %s->%pOFn\n" , __func__, + oh->name, np);return -EINVAL ; }
@@ -2219,8 +2219,8 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh, base =of_translate_address (np, ranges++); size =be32_to_cpup (ranges); -pr_debug ("omap_hwmod: %s %s at 0x%llx size 0x%llx\n" , - oh->name, np->name, base, size); +pr_debug ("omap_hwmod: %s %pOFn at 0x%llx size 0x%llx\n" , + oh->name, np, base, size); res->start = base; res->end = base + size -1 ;
@@ -2322,8 +2322,8 @@ static int __init _init(struct omap_hwmod *oh, void *data)if (r)pr_debug ("omap_hwmod: %s missing dt data\n" , oh->name);else if (np && index) -pr_warn ("omap_hwmod: %s using broken dt data from %s\n" , - oh->name, np->name); +pr_warn ("omap_hwmod: %s using broken dt data from %pOFn\n" , + oh->name, np); r =_init_mpu_rt_base (oh,NULL , index, np);if (r <0 ) {
Signature · 1 line
2.17.1
PATCH 1/1 ARM: shmobile: Convert to using %pOFn instead of device_node.name
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- arch/arm/mach-shmobile/pm-rmobile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-shmobile/pm-rmobile.c +1 -1
@@ -189,7 +189,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)return ; } -pr_debug ("Special PM domain %s type %d for %pOF\n" , pd->name, type, np); +pr_debug ("Special PM domain %pOFn type %d for %pOF\n" , pd, type, np); special_pds[num_special_pds].pd = pd; special_pds[num_special_pds].type = type;
Signature · 1 line
2.17.1
Re: [PATCH] ARM: shmobile: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-renesas-soc at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsRe: [PATCH] ARM: shmobile: Convert to using %pOFn instead of device_node.name
Quoted 11 lines · Geert Uytterhoeven
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Simon Horman <[email protected]>Cc Magnus Damm <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-renesas-soc at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Thanks Rob, thanks Geert, applied for v4.20.
PATCH 1/1 ARM: zynq: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- arch/arm/mach-zynq/slcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-zynq/slcr.c +1 -1
@@ -233,7 +233,7 @@ int __init zynq_early_slcr_init(void)register_restart_handler (&zynq_slcr_restart_nb); -pr_info ("%s mapped to %p\n" , np->name, zynq_slcr_base); +pr_info ("%pOFn mapped to %p\n" , np, zynq_slcr_base);of_node_put (np);
Signature · 1 line
2.17.1
Michal Simek
AppliedRe: [PATCH] ARM: zynq: Convert to using %pOFn instead of device_node.name
Quoted 16 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Michal Simek <[email protected]>Cc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>--- arch/arm/mach-zynq/slcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-zynq/slcr.c +0
-0
arch/arm/mach-zynq/slcr.c int __init zynq_early_slcr_init(void) · line 239
Quoted 8 lines
arch/arm/mach-zynq/slcr.c +1
-1@@ -233,7 +233,7 @@ int __init zynq_early_slcr_init(void)register_restart_handler (&zynq_slcr_restart_nb); -pr_info ("%s mapped to %p\n" , np->name, zynq_slcr_base); +pr_info ("%pOFn mapped to %p\n" , np, zynq_slcr_base);of_node_put (np);
Applied.
M
PATCH 1/1 sparc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- arch/sparc/kernel/auxio_64.c | 4 +-- arch/sparc/kernel/power.c | 4 +-- arch/sparc/kernel/prom_32.c | 26 +++++++------- arch/sparc/kernel/prom_64.c | 68 ++++++++++++++++++------------------ 4 files changed, 51 insertions(+), 51 deletions(-)
arch/sparc/kernel/auxio_64.c +2 -2
@@ -115,8 +115,8 @@ static int auxio_probe(struct platform_device *dev) auxio_devtype =AUXIO_TYPE_SBUS ; size =1 ; }else { -printk ("auxio: Unknown parent bus type [%s]\n" , - dp->parent->name); +printk ("auxio: Unknown parent bus type [%pOFn]\n" , + dp->parent);return -ENODEV ; } auxio_register =of_ioremap (&dev->resource[0 ],0 , size,"auxio" );
arch/sparc/kernel/power.c +2 -2
@@ -41,8 +41,8 @@ static int power_probe(struct platform_device *op) power_reg =of_ioremap (res,0 ,0x4 ,"power" ); -printk (KERN_INFO "%s: Control reg at %llx\n" , - op->dev.of_node->name, res->start); +printk (KERN_INFO "%pOFn: Control reg at %llx\n" , + op->dev.of_node, res->start);if (has_button_interrupt (irq, op->dev.of_node)) { if (request_irq(irq,
arch/sparc/kernel/prom_32.c +13 -13
@@ -68,8 +68,8 @@ static void __init sparc32_path_component(struct device_node *dp, char *tmp_buf)return ; regs = rprop->value; -sprintf (tmp_buf,"%s@%x,%x" , - dp->name, +sprintf (tmp_buf,"%pOFn@%x,%x" , + dp, regs->which_io, regs->phys_addr); }
@@ -84,8 +84,8 @@ static void __init sbus_path_component(struct device_node *dp, char *tmp_buf)return ; regs = prop->value; -sprintf (tmp_buf,"%s@%x,%x" , - dp->name, +sprintf (tmp_buf,"%pOFn@%x,%x" , + dp, regs->which_io, regs->phys_addr); }
@@ -104,13 +104,13 @@ static void __init pci_path_component(struct device_node *dp, char *tmp_buf) regs = prop->value; devfn = (regs->phys_hi >>8 ) &0xff ;if (devfn &0x07 ) { -sprintf (tmp_buf,"%s@%x,%x" , - dp->name, +sprintf (tmp_buf,"%pOFn@%x,%x" , + dp, devfn >>3 , devfn &0x07 ); }else { -sprintf (tmp_buf,"%s@%x" , - dp->name, +sprintf (tmp_buf,"%pOFn@%x" , + dp, devfn >>3 ); } }
@@ -127,8 +127,8 @@ static void __init ebus_path_component(struct device_node *dp, char *tmp_buf) regs = prop->value; -sprintf (tmp_buf,"%s@%x,%x" , - dp->name, +sprintf (tmp_buf,"%pOFn@%x,%x" , + dp, regs->which_io, regs->phys_addr); }
@@ -167,8 +167,8 @@ static void __init ambapp_path_component(struct device_node *dp, char *tmp_buf)return ; device = prop->value; -sprintf (tmp_buf,"%s:%d:%d@%x,%x" , - dp->name, *vendor, *device, +sprintf (tmp_buf,"%pOFn:%d:%d@%x,%x" , + dp, *vendor, *device, *intr, reg0); }
@@ -201,7 +201,7 @@ char * __init build_path_component(struct device_node *dp) tmp_buf[0 ] ='\0' ;__build_path_component (dp, tmp_buf);if (tmp_buf[0 ] ='\0' ) -strcpy (tmp_buf, dp->name); +snprint (tmp_buf,sizeof (tmp_buf),"%pOFn" , dp); n =prom_early_alloc (strlen (tmp_buf) +1 );strcpy (n, tmp_buf);
arch/sparc/kernel/prom_64.c +34 -34
156 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [PATCH] sparc: Convert to using %pOFn instead of device_node.name
Quoted 10 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc "David S. Miller" <[email protected]>Signed-off-by Rob Herring <[email protected]>---
arch/sparc/kernel/prom_32.c char * __init build_path_component(struct device_node *dp) · line 204
Quoted 5 lines
arch/sparc/kernel/prom_32.c +1
-1@@ -201,7 +201,7 @@ char * __init build_path_component(struct device_node *dp) tmp_buf[0 ] ='\0' ;__build_path_component (dp, tmp_buf);if (tmp_buf[0 ] ='\0' ) -strcpy (tmp_buf, dp->name); +snprint (tmp_buf,sizeof (tmp_buf),"%pOFn" , dp);
Ugg, v2 coming soon.
Rob
PATCH 1/1 ata: ahci: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/ata/libahci_platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/ata/libahci_platform.c +4 -4
@@ -303,8 +303,8 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port,/* No PHY support. Check if PHY is required. */ if (of_find_property (node,"phys" ,NULL )) {dev_err (dev, -"couldn't get PHY in node %s: ENOSYS\n" , - node->name); +"couldn't get PHY in node %pOFn: ENOSYS\n" , + node);break ; }/* fall through */
@@ -316,8 +316,8 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port,default :dev_err (dev, -"couldn't get PHY in node %s: %d\n" , - node->name, rc); +"couldn't get PHY in node %pOFn: %d\n" , + node, rc);break ; }
Signature · 1 line
2.17.1
Re: [PATCH] ata: ahci: Convert to using %pOFn instead of device_node.name
Quoted 2 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Applied for 4.20, thanks.
Signature · 1 line
Jens Axboe
PATCH 1/1 clk: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/clk/axs10x/pll_clock.c | 4 ++-- drivers/clk/bcm/clk-kona-setup.c | 22 +++++++++++----------- drivers/clk/clk-asm9260.c | 4 ++-- drivers/clk/clk-cdce925.c | 10 +++++----- drivers/clk/clk-fixed-factor.c | 8 ++++---- drivers/clk/clk-gpio.c | 8 ++++---- drivers/clk/clk-hsdk-pll.c | 4 ++-- drivers/clk/clk-nomadik.c | 4 ++-- drivers/clk/clk-npcm7xx.c | 2 +- drivers/clk/clk-palmas.c | 4 ++-- drivers/clk/clk-qoriq.c | 14 +++++++------- drivers/clk/clk-scmi.c | 2 +- drivers/clk/clk-scpi.c | 6 +++--- drivers/clk/clk-si5351.c | 4 ++-- drivers/clk/clk-stm32f4.c | 2 +- drivers/clk/clk-stm32h7.c | 2 +- drivers/clk/clk-stm32mp1.c | 2 +- drivers/clk/clk-tango4.c | 10 +++++----- drivers/clk/keystone/gate.c | 2 +- drivers/clk/keystone/pll.c | 2 +- drivers/clk/renesas/clk-div6.c | 12 ++++++------ drivers/clk/renesas/clk-emev2.c | 8 ++++---- drivers/clk/renesas/clk-mstp.c | 8 ++++---- drivers/clk/renesas/clk-r8a73a4.c | 4 ++-- drivers/clk/renesas/clk-r8a7740.c | 4 ++-- drivers/clk/renesas/clk-r8a7778.c | 4 ++-- drivers/clk/renesas/clk-r8a7779.c | 4 ++-- drivers/clk/renesas/clk-rcar-gen2.c | 4 ++-- drivers/clk/renesas/clk-rz.c | 4 ++-- drivers/clk/renesas/clk-sh73a0.c | 4 ++-- drivers/clk/st/clkgen-fsyn.c | 2 +- drivers/clk/sunxi/clk-mod0.c | 6 +++--- drivers/clk/sunxi/clk-sun9i-core.c | 20 ++++++++++---------- drivers/clk/sunxi/clk-sunxi.c | 4 ++-- drivers/clk/ti/apll.c | 18 +++++++++--------- drivers/clk/ti/clk-dra7-atl.c | 4 ++-- drivers/clk/ti/clk.c | 10 +++++----- drivers/clk/ti/clkctrl.c | 14 ++++++-------- drivers/clk/ti/composite.c | 14 +++++++------- drivers/clk/ti/divider.c | 4 ++-- drivers/clk/ti/dpll.c | 12 ++++++------ drivers/clk/ti/fapll.c | 8 ++++---- drivers/clk/ti/fixed-factor.c | 4 ++-- drivers/clk/ti/gate.c | 2 +- drivers/clk/ti/interface.c | 2 +- drivers/clk/ti/mux.c | 4 ++-- drivers/clk/zynq/clkc.c | 4 ++-- 47 files changed, 151 insertions(+), 153 deletions(-)
drivers/clk/axs10x/pll_clock.c +2 -2
@@ -301,13 +301,13 @@ static void __init of_axs10x_pll_clk_setup(struct device_node *node) ret =clk_hw_register (NULL , &pll_clk->hw);if (ret) { -pr_err ("failed to register %s clock\n" , node->name); +pr_err ("failed to register %pOFn clock\n" , node); goto err_unmap_lock; } ret =of_clk_add_hw_provider (node, of_clk_hw_simple_get, &pll_clk->hw);if (ret) { -pr_err ("failed to add hw provider for %s clock\n" , node->name); +pr_err ("failed to add hw provider for %pOFn clock\n" , node); goto err_unregister_clk; }
drivers/clk/bcm/clk-kona-setup.c +11 -11
@@ -808,29 +808,29 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu, ret =of_address_to_resource (node,0 , &res);if (ret) { -pr_err ("%s: no valid CCU registers found for %s\n" , __func__, - node->name); +pr_err ("%s: no valid CCU registers found for %pOFn\n" , __func__, + node); goto out_err; } range =resource_size (&res);if (range > (resource_size_t )U32_MAX ) { -pr_err ("%s: address range too large for %s\n" , __func__, - node->name); +pr_err ("%s: address range too large for %pOFn\n" , __func__, + node); goto out_err; } ccu->range = (u32 )range;if (!ccu_data_valid (ccu)) { -pr_err ("%s: ccu data not valid for %s\n" , __func__, node->name); +pr_err ("%s: ccu data not valid for %pOFn\n" , __func__, node); goto out_err; } ccu->base =ioremap (res.start, ccu->range);if (!ccu->base) { -pr_err ("%s: unable to map CCU registers for %s\n" , __func__, - node->name); +pr_err ("%s: unable to map CCU registers for %pOFn\n" , __func__, + node); goto out_err; } ccu->node =of_node_get (node);
@@ -848,16 +848,16 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu, ret =of_clk_add_hw_provider (node, of_clk_kona_onecell_get, ccu);if (ret) { -pr_err ("%s: error adding ccu %s as provider (%d)\n" , __func__, - node->name, ret); +pr_err ("%s: error adding ccu %pOFn as provider (%d)\n" , __func__, + node, ret); goto out_err; }if (!kona_ccu_init (ccu)) -pr_err ("Broadcom %s initialization had errors\n" , node->name); +pr_err ("Broadcom %pOFn initialization had errors\n" , node);return ; out_err:kona_ccu_teardown (ccu); -pr_err ("Broadcom %s setup aborted\n" , node->name); +pr_err ("Broadcom %pOFn setup aborted\n" , node); }
drivers/clk/clk-asm9260.c +2 -2
@@ -281,7 +281,7 @@ static void __init asm9260_acc_init(struct device_node *np) base =of_io_request_and_map (np,0 , np->name);if (IS_ERR (base)) -panic ("%s: unable to map resource" , np->name); +panic ("%pOFn: unable to map resource" , np);/* register pll */ rate = (ioread32 (base +HW_SYSPLLCTRL ) &0xffff ) *1000000 ;
@@ -292,7 +292,7 @@ static void __init asm9260_acc_init(struct device_node *np) ref_clk, 0, rate, accuracy);if (IS_ERR (hw)) -panic ("%s: can't register REFCLK. Check DT!" , np->name); +panic ("%pOFn: can't register REFCLK. Check DT!" , np);for (n =0 ; n <ARRAY_SIZE (asm9260_mux_clks); n++) {const struct asm9260_mux_clock *mc = &asm9260_mux_clks[n];
drivers/clk/clk-cdce925.c +5 -5
@@ -669,8 +669,8 @@ static int cdce925_probe(struct i2c_client *client,/* Register PLL clocks */ for (i =0 ; i < data->chip_info->num_plls; ++i) { - pll_clk_name[i] =kasprintf (GFP_KERNEL ,"%s.pll%d" , - client->dev.of_node->name, i); + pll_clk_name[i] =kasprintf (GFP_KERNEL ,"%pOFn.pll%d" , + client->dev.of_node, i); init.name = pll_clk_name[i]; data->pll[i].chip = data; data->pll[i].hw.init = &init;
@@ -710,7 +710,7 @@ static int cdce925_probe(struct i2c_client *client, init.flags =0 ; init.num_parents =1 ; init.parent_names = &parent_name;/* Mux Y1 to input */ - init.name =kasprintf (GFP_KERNEL ,"%s.Y1" , client->dev.of_node->name); + init.name =kasprintf (GFP_KERNEL ,"%pOFn.Y1" , client->dev.of_node); data->clk[0 ].chip = data; data->clk[0 ].hw.init = &init; data->clk[0 ].index =0 ;
@@ -727,8 +727,8 @@ static int cdce925_probe(struct i2c_client *client, init.flags =CLK_SET_RATE_PARENT ; init.num_parents =1 ;for (i =1 ; i < data->chip_info->num_outputs; ++i) { - init.name =kasprintf (GFP_KERNEL ,"%s.Y%d" , - client->dev.of_node->name, i+1 ); + init.name =kasprintf (GFP_KERNEL ,"%pOFn.Y%d" , + client->dev.of_node, i+1 ); data->clk[i].chip = data; data->clk[i].hw.init = &init; data->clk[i].index = i;
drivers/clk/clk-fixed-factor.c +4 -4
@@ -158,14 +158,14 @@ static struct clk *_of_fixed_factor_clk_setup(struct device_node *node)int ret;if (of_property_read_u32 (node,"clock-div" , &div)) { -pr_err ("%s Fixed factor clock <%s> must have a clock-div property\n" , - __func__, node->name); +pr_err ("%s Fixed factor clock <%pOFn> must have a clock-div property\n" , + __func__, node);return ERR_PTR (-EIO ); }if (of_property_read_u32 (node,"clock-mult" , &mult)) { -pr_err ("%s Fixed factor clock <%s> must have a clock-mult property\n" , - __func__, node->name); +pr_err ("%s Fixed factor clock <%pOFn> must have a clock-mult property\n" , + __func__, node);return ERR_PTR (-EIO ); }
drivers/clk/clk-gpio.c +4 -4
@@ -233,11 +233,11 @@ static int gpio_clk_driver_probe(struct platform_device *pdev)if (IS_ERR (gpiod)) { ret =PTR_ERR (gpiod);if (ret == -EPROBE_DEFER ) -pr_debug ("%s: %s: GPIOs not yet available, retry later\n" , - node->name, __func__); +pr_debug ("%pOFn: %s: GPIOs not yet available, retry later\n" , + node, __func__);else -pr_err ("%s: %s: Can't get '%s' named GPIO property\n" , - node->name, __func__, +pr_err ("%pOFn: %s: Can't get '%s' named GPIO property\n" , + node, __func__, gpio_name);return ret; }
drivers/clk/clk-hsdk-pll.c +2 -2
@@ -390,13 +390,13 @@ static void __init of_hsdk_pll_clk_setup(struct device_node *node) ret =clk_hw_register (NULL , &pll_clk->hw);if (ret) { -pr_err ("failed to register %s clock\n" , node->name); +pr_err ("failed to register %pOFn clock\n" , node); goto err_unmap_spec_regs; } ret =of_clk_add_hw_provider (node, of_clk_hw_simple_get, &pll_clk->hw);if (ret) { -pr_err ("failed to add hw provider for %s clock\n" , node->name); +pr_err ("failed to add hw provider for %pOFn clock\n" , node); goto err_unmap_spec_regs; }
drivers/clk/clk-nomadik.c +2 -2
@@ -97,8 +97,8 @@ static void __init nomadik_src_init(void) } src_base =of_iomap (np,0 );if (!src_base) { -pr_err ("%s: must have src parent node with REGS (%s)\n" , - __func__, np->name); +pr_err ("%s: must have src parent node with REGS (%pOFn)\n" , + __func__, np);return ; }
drivers/clk/clk-npcm7xx.c +1 -1
@@ -549,7 +549,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np) ret =of_address_to_resource (clk_np,0 , &res);if (ret) { -pr_err ("%s: failed to get resource, ret %d\n" , clk_np->name, +pr_err ("%pOFn: failed to get resource, ret %d\n" , clk_np, ret);return ; }
drivers/clk/clk-palmas.c +2 -2
@@ -195,8 +195,8 @@ static void palmas_clks_get_clk_data(struct platform_device *pdev, prop =PALMAS_EXT_CONTROL_NSLEEP ;break ;default : -dev_warn (&pdev->dev,"%s: Invalid ext control option: %u\n" , - node->name, prop); +dev_warn (&pdev->dev,"%pOFn: Invalid ext control option: %u\n" , + node, prop); prop =0 ;break ; }
drivers/clk/clk-qoriq.c +7 -7
@@ -945,8 +945,8 @@ static void __init core_mux_init(struct device_node *np) rc =of_clk_add_provider (np, of_clk_src_simple_get, clk);if (rc) { -pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , - __func__, np->name, rc); +pr_err ("%s: Couldn't register clk provider for node %pOFn: %d\n" , + __func__, np, rc);return ; } }
@@ -1199,8 +1199,8 @@ static void __init legacy_pll_init(struct device_node *np, int idx) rc =of_clk_add_provider (np, of_clk_src_onecell_get, onecell_data);if (rc) { -pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , - __func__, np->name, rc); +pr_err ("%s: Couldn't register clk provider for node %pOFn: %d\n" , + __func__, np, rc); goto err_cell; }
@@ -1360,7 +1360,7 @@ static void __init clockgen_init(struct device_node *np) is_old_ls1021a = true; }if (!clockgen.regs) { -pr_err ("%s(): %s: of_iomap() failed\n" , __func__, np->name); +pr_err ("%s(): %pOFn: of_iomap() failed\n" , __func__, np);return ; }
@@ -1406,8 +1406,8 @@ static void __init clockgen_init(struct device_node *np) ret =of_clk_add_provider (np, clockgen_clk_get, &clockgen);if (ret) { -pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , - __func__, np->name, ret); +pr_err ("%s: Couldn't register clk provider for node %pOFn: %d\n" , + __func__, np, ret); }return ;
drivers/clk/clk-scmi.c +1 -1
@@ -132,7 +132,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev) count = handle->clk_ops->count_get (handle);if (count <0 ) { -dev_err (dev,"%s: invalid clock output count\n" , np->name); +dev_err (dev,"%pOFn: invalid clock output count\n" , np);return -EINVAL ; }
drivers/clk/clk-scpi.c +3 -3
@@ -207,7 +207,7 @@ static int scpi_clk_add(struct device *dev, struct device_node *np, count =of_property_count_strings (np,"clock-output-names" );if (count <0 ) { -dev_err (dev,"%s: invalid clock output count\n" , np->name); +dev_err (dev,"%pOFn: invalid clock output count\n" , np);return -EINVAL ; }
@@ -232,13 +232,13 @@ static int scpi_clk_add(struct device *dev, struct device_node *np,if (of_property_read_string_index (np,"clock-output-names" , idx, &name)) { -dev_err (dev,"invalid clock name @ %s\n" , np->name); +dev_err (dev,"invalid clock name @ %pOFn\n" , np);return -EINVAL ; }if (of_property_read_u32_index (np,"clock-indices" , idx, &val)) { -dev_err (dev,"invalid clock index @ %s\n" , np->name); +dev_err (dev,"invalid clock index @ %pOFn\n" , np);return -EINVAL ; }
drivers/clk/clk-si5351.c +2 -2
@@ -1215,8 +1215,8 @@ static int si5351_dt_parse(struct i2c_client *client,/* per clkout properties */ for_each_child_of_node (np, child) {if (of_property_read_u32 (child,"reg" , &num)) { -dev_err (&client->dev,"missing reg property of %s\n" , - child->name); +dev_err (&client->dev,"missing reg property of %pOFn\n" , + child); goto put_child; }
drivers/clk/clk-stm32f4.c +1 -1
@@ -1433,7 +1433,7 @@ static void __init stm32f4_rcc_init(struct device_node *np) base =of_iomap (np,0 );if (!base) { -pr_err ("%s: unable to map resource\n" , np->name); +pr_err ("%pOFn: unable to map resource\n" , np);return ; }
drivers/clk/clk-stm32h7.c +1 -1
@@ -1216,7 +1216,7 @@ static void __init stm32h7_rcc_init(struct device_node *np)/* get RCC base @ from DT */ base =of_iomap (np,0 );if (!base) { -pr_err ("%s: unable to map resource" , np->name); +pr_err ("%pOFn: unable to map resource" , np); goto err_free_clks; }
drivers/clk/clk-stm32mp1.c +1 -1
@@ -2088,7 +2088,7 @@ static void stm32mp1_rcc_init(struct device_node *np) base =of_iomap (np,0 );if (!base) { -pr_err ("%s: unable to map resource" , np->name); +pr_err ("%pOFn: unable to map resource" , np);of_node_put (np);return ; }
drivers/clk/clk-tango4.c +5 -5
@@ -54,13 +54,13 @@ static void __init tango4_clkgen_setup(struct device_node *np)const char *parent =of_clk_get_parent_name (np,0 );if (!base) -panic ("%s: invalid address\n" , np->name); +panic ("%pOFn: invalid address\n" , np);if (readl (base +CPUCLK_DIV ) &DIV_BYPASS ) -panic ("%s: unsupported cpuclk setup\n" , np->name); +panic ("%pOFn: unsupported cpuclk setup\n" , np);if (readl (base +SYSCLK_DIV ) &DIV_BYPASS ) -panic ("%s: unsupported sysclk setup\n" , np->name); +panic ("%pOFn: unsupported sysclk setup\n" , np);writel (0x100 , base +CPUCLK_DIV );/* disable frequency ramping */
@@ -77,9 +77,9 @@ static void __init tango4_clkgen_setup(struct device_node *np) pp[3 ] =clk_register_fixed_factor (NULL ,"sdio_clk" ,"cd6" ,0 ,1 ,2 );if (IS_ERR (pp[0 ]) ||IS_ERR (pp[1 ]) ||IS_ERR (pp[2 ]) ||IS_ERR (pp[3 ])) -panic ("%s: clk registration failed\n" , np->name); +panic ("%pOFn: clk registration failed\n" , np);if (of_clk_add_provider (np, of_clk_src_onecell_get, &clk_data)) -panic ("%s: clk provider registration failed\n" , np->name); +panic ("%pOFn: clk provider registration failed\n" , np); }CLK_OF_DECLARE (tango4_clkgen,"sigma,tango4-clkgen" , tango4_clkgen_setup);
drivers/clk/keystone/gate.c +1 -1
@@ -245,7 +245,7 @@ static void __init of_psc_clk_init(struct device_node *node, spinlock_t *lock)return ; } -pr_err ("%s: error registering clk %s\n" , __func__, node->name); +pr_err ("%s: error registering clk %pOFn\n" , __func__, node); unmap_domain:iounmap (data->domain_base);
drivers/clk/keystone/pll.c +1 -1
@@ -219,7 +219,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl) } out: -pr_err ("%s: error initializing pll %s\n" , __func__, node->name); +pr_err ("%s: error initializing pll %pOFn\n" , __func__, node);kfree (pll_data); }
drivers/clk/renesas/clk-div6.c +6 -6
@@ -312,8 +312,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) num_parents =of_clk_get_parent_count (np);if (num_parents <1 ) { -pr_err ("%s: no parent found for %s DIV6 clock\n" , - __func__, np->name); +pr_err ("%s: no parent found for %pOFn DIV6 clock\n" , + __func__, np);return ; }
@@ -324,8 +324,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) reg =of_iomap (np,0 );if (reg ==NULL ) { -pr_err ("%s: failed to map %s DIV6 clock register\n" , - __func__, np->name); +pr_err ("%s: failed to map %pOFn DIV6 clock register\n" , + __func__, np); goto error; }
@@ -337,8 +337,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) clk =cpg_div6_register (clk_name, num_parents, parent_names, reg,NULL );if (IS_ERR (clk)) { -pr_err ("%s: failed to register %s DIV6 clock (%ld)\n" , - __func__, np->name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn DIV6 clock (%ld)\n" , + __func__, np,PTR_ERR (clk)); goto error; }
drivers/clk/renesas/clk-emev2.c +4 -4
@@ -86,8 +86,8 @@ static void __init emev2_smu_clkdiv_init(struct device_node *np) clk =clk_register_divider (NULL , np->name, parent_name,0 , smu_base + reg[0 ], reg[1 ],8 ,0 , &lock);of_clk_add_provider (np, of_clk_src_simple_get, clk); -clk_register_clkdev (clk, np->name,NULL ); -pr_debug ("## %s %s %p\n" , __func__, np->name, clk); +clk_register_clkdev (clk, np->full_name,NULL ); +pr_debug ("## %s %pOFn %p\n" , __func__, np, clk); }CLK_OF_DECLARE (emev2_smu_clkdiv,"renesas,emev2-smu-clkdiv" , emev2_smu_clkdiv_init);
@@ -104,7 +104,7 @@ static void __init emev2_smu_gclk_init(struct device_node *np) clk =clk_register_gate (NULL , np->name, parent_name,0 , smu_base + reg[0 ], reg[1 ],0 , &lock);of_clk_add_provider (np, of_clk_src_simple_get, clk); -clk_register_clkdev (clk, np->name,NULL ); -pr_debug ("## %s %s %p\n" , __func__, np->name, clk); +clk_register_clkdev (clk, np->full_name,NULL ); +pr_debug ("## %s %pOFn %p\n" , __func__, np, clk); }CLK_OF_DECLARE (emev2_smu_gclk,"renesas,emev2-smu-gclk" , emev2_smu_gclk_init);
drivers/clk/renesas/clk-mstp.c +4 -4
@@ -239,8 +239,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)break ;if (clkidx >=MSTP_MAX_CLOCKS ) { -pr_err ("%s: invalid clock %s %s index %u\n" , - __func__, np->name, name, clkidx); +pr_err ("%s: invalid clock %pOFn %s index %u\n" , + __func__, np, name, clkidx);continue ; }
@@ -259,8 +259,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)*/ clk_register_clkdev (clks[clkidx], name,NULL ); }else { -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clks[clkidx])); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clks[clkidx])); } }
drivers/clk/renesas/clk-r8a73a4.c +2 -2
@@ -228,8 +228,8 @@ static void __init r8a73a4_cpg_clocks_init(struct device_node *np) clk =r8a73a4_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-r8a7740.c +2 -2
@@ -187,8 +187,8 @@ static void __init r8a7740_cpg_clocks_init(struct device_node *np) clk =r8a7740_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-r8a7778.c +2 -2
@@ -130,8 +130,8 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np) clk =r8a7778_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-r8a7779.c +2 -2
@@ -164,8 +164,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np) clk =r8a7779_cpg_register_clock (np, cpg, config, plla_mult, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-rcar-gen2.c +2 -2
@@ -445,8 +445,8 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np) clk =rcar_gen2_cpg_register_clock (np, cpg, config, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-rz.c +2 -2
@@ -113,8 +113,8 @@ static void __init rz_cpg_clocks_init(struct device_node *np) clk =rz_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-sh73a0.c +2 -2
@@ -206,8 +206,8 @@ static void __init sh73a0_cpg_clocks_init(struct device_node *np) clk =sh73a0_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/st/clkgen-fsyn.c +1 -1
@@ -936,7 +936,7 @@ static void __init st_of_quadfs_setup(struct device_node *np,if (!clk_parent_name)return ; - pll_name =kasprintf (GFP_KERNEL ,"%s.pll" , np->name); + pll_name =kasprintf (GFP_KERNEL ,"%pOFn.pll" , np);if (!pll_name)return ;
drivers/clk/sunxi/clk-mod0.c +3 -3
@@ -140,8 +140,8 @@ static void __init sun9i_a80_mod0_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for mod0-clk: %s\n" , - node->name); +pr_err ("Could not get registers for mod0-clk: %pOFn\n" , + node);return ; }
@@ -306,7 +306,7 @@ static void __init sunxi_mmc_setup(struct device_node *node, reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Couldn't map the %s clock registers\n" , node->name); +pr_err ("Couldn't map the %pOFn clock registers\n" , node);return ; }
drivers/clk/sunxi/clk-sun9i-core.c +10 -10
@@ -88,8 +88,8 @@ static void __init sun9i_a80_pll4_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-pll4-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-pll4-clk: %pOFn\n" , + node);return ; }
@@ -142,8 +142,8 @@ static void __init sun9i_a80_gt_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-gt-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-gt-clk: %pOFn\n" , + node);return ; }
@@ -197,8 +197,8 @@ static void __init sun9i_a80_ahb_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-ahb-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-ahb-clk: %pOFn\n" , + node);return ; }
@@ -223,8 +223,8 @@ static void __init sun9i_a80_apb0_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-apb0-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-apb0-clk: %pOFn\n" , + node);return ; }
@@ -280,8 +280,8 @@ static void __init sun9i_a80_apb1_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-apb1-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-apb1-clk: %pOFn\n" , + node);return ; }
drivers/clk/sunxi/clk-sunxi.c +2 -2
@@ -568,8 +568,8 @@ static struct clk * __init sunxi_factors_clk_setup(struct device_node *node, reg =of_iomap (node,0 );if (!reg) { -pr_err ("Could not get registers for factors-clk: %s\n" , - node->name); +pr_err ("Could not get registers for factors-clk: %pOFn\n" , + node);return NULL ; }
drivers/clk/ti/apll.c +9 -9
@@ -143,8 +143,8 @@ static void __init omap_clk_register_apll(void *user, clk =of_clk_get (node,0 );if (IS_ERR (clk)) { -pr_debug ("clk-ref for %s not ready, retry\n" , - node->name); +pr_debug ("clk-ref for %pOFn not ready, retry\n" , + node);if (!ti_clk_retry_init (node, hw, omap_clk_register_apll))return ;
@@ -155,8 +155,8 @@ static void __init omap_clk_register_apll(void *user, clk =of_clk_get (node,1 );if (IS_ERR (clk)) { -pr_debug ("clk-bypass for %s not ready, retry\n" , - node->name); +pr_debug ("clk-bypass for %pOFn not ready, retry\n" , + node);if (!ti_clk_retry_init (node, hw, omap_clk_register_apll))return ;
@@ -202,7 +202,7 @@ static void __init of_dra7_apll_setup(struct device_node *node) init->num_parents =of_clk_get_parent_count (node);if (init->num_parents <1 ) { -pr_err ("dra7 apll %s must have parent(s)\n" , node->name); +pr_err ("dra7 apll %pOFn must have parent(s)\n" , node); goto cleanup; }
@@ -366,7 +366,7 @@ static void __init of_omap2_apll_setup(struct device_node *node) init->num_parents =of_clk_get_parent_count (node);if (init->num_parents !=1 ) { -pr_err ("%s must have one parent\n" , node->name); +pr_err ("%pOFn must have one parent\n" , node); goto cleanup; }
@@ -374,13 +374,13 @@ static void __init of_omap2_apll_setup(struct device_node *node) init->parent_names = &parent_name;if (of_property_read_u32 (node,"ti,clock-frequency" , &val)) { -pr_err ("%s missing clock-frequency\n" , node->name); +pr_err ("%pOFn missing clock-frequency\n" , node); goto cleanup; } clk_hw->fixed_rate = val;if (of_property_read_u32 (node,"ti,bit-shift" , &val)) { -pr_err ("%s missing bit-shift\n" , node->name); +pr_err ("%pOFn missing bit-shift\n" , node); goto cleanup; }
@@ -389,7 +389,7 @@ static void __init of_omap2_apll_setup(struct device_node *node) ad->autoidle_mask =0x3 << val;if (of_property_read_u32 (node,"ti,idlest-shift" , &val)) { -pr_err ("%s missing idlest-shift\n" , node->name); +pr_err ("%pOFn missing idlest-shift\n" , node); goto cleanup; }
drivers/clk/ti/clk-dra7-atl.c +2 -2
@@ -190,8 +190,8 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node) init.num_parents =of_clk_get_parent_count (node);if (init.num_parents !=1 ) { -pr_err ("%s: atl clock %s must have 1 parent\n" , __func__, - node->name); +pr_err ("%s: atl clock %pOFn must have 1 parent\n" , __func__, + node); goto cleanup; }
drivers/clk/ti/clk.c +5 -5
@@ -223,7 +223,7 @@ int __init ti_clk_retry_init(struct device_node *node, void *user, {struct clk_init_item *retry; -pr_debug ("%s: adding to retry list...\n" , node->name); +pr_debug ("%pOFn: adding to retry list...\n" , node); retry =kzalloc (sizeof (*retry),GFP_KERNEL );if (!retry)return -ENOMEM ;
@@ -258,14 +258,14 @@ int ti_clk_get_reg_addr(struct device_node *node, int index, }if (i ==CLK_MAX_MEMMAPS ) { -pr_err ("clk-provider not found for %s!\n" , node->name); +pr_err ("clk-provider not found for %pOFn!\n" , node);return -ENOENT ; } reg->index = i;if (of_property_read_u32_index (node,"reg" , index, &val)) { -pr_err ("%s must have reg[%d]!\n" , node->name, index); +pr_err ("%pOFn must have reg[%d]!\n" , node, index);return -EINVAL ; }
@@ -312,7 +312,7 @@ int __init omap2_clk_provider_init(struct device_node *parent, int index,/* get clocks for this parent */ clocks =of_get_child_by_name (parent,"clocks" );if (!clocks) { -pr_err ("%s missing 'clocks' child node.\n" , parent->name); +pr_err ("%pOFn missing 'clocks' child node.\n" , parent);return -EINVAL ; }
@@ -365,7 +365,7 @@ void ti_dt_clk_init_retry_clks(void)while (!list_empty (&retry_list) && retries) {list_for_each_entry_safe (retry, tmp, &retry_list, link) { -pr_debug ("retry-init: %s\n" , retry->node->name); +pr_debug ("retry-init: %pOFn\n" , retry->node); retry->func (retry->user, retry->node);list_del (&retry->link);kfree (retry);
drivers/clk/ti/clkctrl.c +6 -8
@@ -259,8 +259,8 @@ _ti_clkctrl_clk_register(struct omap_clkctrl_provider *provider,struct omap_clkctrl_clk *clkctrl_clk;int ret =0 ; - init.name =kasprintf (GFP_KERNEL ,"%s:%s:%04x:%d" , node->parent->name, - node->name, offset, bit); + init.name =kasprintf (GFP_KERNEL ,"%pOFn:%pOFn:%04x:%d" , node->parent, + node, offset, bit); clkctrl_clk =kzalloc (sizeof (*clkctrl_clk),GFP_KERNEL );if (!init.name || !clkctrl_clk) { ret = -ENOMEM ;
@@ -492,8 +492,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) provider->base =of_iomap (node,0 ); - provider->clkdm_name =kmalloc (strlen (node->parent->name) +3 , -GFP_KERNEL ); + provider->clkdm_name =kasprintf (GFP_KERNEL ,"%pOFnxxx" , node->parent);if (!provider->clkdm_name) {kfree (provider);return ;
@@ -503,8 +502,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)* Create default clkdm name, replace _cm from end of parent node * name with _clkdm */ -strcpy (provider->clkdm_name, node->parent->name); - provider->clkdm_name[strlen (provider->clkdm_name) -2 ] =0 ; + provider->clkdm_name[strlen (provider->clkdm_name) -5 ] =0 ;strcat (provider->clkdm_name,"clkdm" );INIT_LIST_HEAD (&provider->clocks);
@@ -539,8 +537,8 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) init.flags =0 ;if (reg_data->flags &CLKF_SET_RATE_PARENT ) init.flags |=CLK_SET_RATE_PARENT ; - init.name =kasprintf (GFP_KERNEL ,"%s:%s:%04x:%d" , - node->parent->name, node->name, + init.name =kasprintf (GFP_KERNEL ,"%pOFn:%pOFn:%04x:%d" , + node->parent, node, reg_data->offset,0 ); clkctrl_clk =kzalloc (sizeof (*clkctrl_clk),GFP_KERNEL );if (!init.name || !clkctrl_clk)
drivers/clk/ti/composite.c +7 -7
@@ -135,8 +135,8 @@ static void __init _register_composite(void *user, comp =_lookup_component (cclk->comp_nodes[i]);if (!comp) { -pr_debug ("component %s not ready for %s, retry\n" , - cclk->comp_nodes[i]->name, node->name); +pr_debug ("component %s not ready for %pOFn, retry\n" , + cclk->comp_nodes[i], node);if (!ti_clk_retry_init (node, hw, _register_composite))return ;
@@ -144,8 +144,8 @@ static void __init _register_composite(void *user, goto cleanup; }if (cclk->comp_clks[comp->type] !=NULL ) { -pr_err ("duplicate component types for %s (%s)!\n" , - node->name, component_clk_types[comp->type]); +pr_err ("duplicate component types for %pOFn (%s)!\n" , + node, component_clk_types[comp->type]); goto cleanup; }
@@ -168,7 +168,7 @@ static void __init _register_composite(void *user, }if (!num_parents) { -pr_err ("%s: no parents found for %s!\n" , __func__, node->name); +pr_err ("%s: no parents found for %pOFn!\n" , __func__, node); goto cleanup; }
@@ -212,7 +212,7 @@ static void __init of_ti_composite_clk_setup(struct device_node *node) num_clks =of_clk_get_parent_count (node);if (!num_clks) { -pr_err ("composite clk %s must have component(s)\n" , node->name); +pr_err ("composite clk %pOFn must have component(s)\n" , node);return ; }
@@ -248,7 +248,7 @@ int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw, num_parents =of_clk_get_parent_count (node);if (!num_parents) { -pr_err ("component-clock %s must have parent(s)\n" , node->name); +pr_err ("component-clock %pOFn must have parent(s)\n" , node);return -EINVAL ; }
drivers/clk/ti/divider.c +2 -2
@@ -492,7 +492,7 @@ __init ti_clk_get_div_table(struct device_node *node) }if (!valid_div) { -pr_err ("no valid dividers for %s table\n" , node->name); +pr_err ("no valid dividers for %pOFn table\n" , node);return ERR_PTR (-EINVAL ); }
@@ -530,7 +530,7 @@ static int _get_divider_width(struct device_node *node, min_div =1 ;if (of_property_read_u32 (node,"ti,max-div" , &max_div)) { -pr_err ("no max-div for %s!\n" , node->name); +pr_err ("no max-div for %pOFn!\n" , node);return -EINVAL ; }
drivers/clk/ti/dpll.c +6 -6
@@ -162,8 +162,8 @@ static void __init _register_dpll(void *user, clk =of_clk_get (node,0 );if (IS_ERR (clk)) { -pr_debug ("clk-ref missing for %s, retry later\n" , - node->name); +pr_debug ("clk-ref missing for %pOFn, retry later\n" , + node);if (!ti_clk_retry_init (node, hw, _register_dpll))return ;
@@ -175,8 +175,8 @@ static void __init _register_dpll(void *user, clk =of_clk_get (node,1 );if (IS_ERR (clk)) { -pr_debug ("clk-bypass missing for %s, retry later\n" , - node->name); +pr_debug ("clk-bypass missing for %pOFn, retry later\n" , + node);if (!ti_clk_retry_init (node, hw, _register_dpll))return ;
@@ -226,7 +226,7 @@ static void _register_dpll_x2(struct device_node *node, parent_name =of_clk_get_parent_name (node,0 );if (!parent_name) { -pr_err ("%s must have parent\n" , node->name); +pr_err ("%pOFn must have parent\n" , node);return ; }
@@ -305,7 +305,7 @@ static void __init of_ti_dpll_setup(struct device_node *node, init->num_parents =of_clk_get_parent_count (node);if (!init->num_parents) { -pr_err ("%s must have parent(s)\n" , node->name); +pr_err ("%pOFn must have parent(s)\n" , node); goto cleanup; }
drivers/clk/ti/fapll.c +4 -4
@@ -555,7 +555,7 @@ static void __init ti_fapll_setup(struct device_node *node) init->num_parents =of_clk_get_parent_count (node);if (init->num_parents !=2 ) { -pr_err ("%s must have two parents\n" , node->name); +pr_err ("%pOFn must have two parents\n" , node); goto free; }
@@ -564,19 +564,19 @@ static void __init ti_fapll_setup(struct device_node *node) fd->clk_ref =of_clk_get (node,0 );if (IS_ERR (fd->clk_ref)) { -pr_err ("%s could not get clk_ref\n" , node->name); +pr_err ("%pOFn could not get clk_ref\n" , node); goto free; } fd->clk_bypass =of_clk_get (node,1 );if (IS_ERR (fd->clk_bypass)) { -pr_err ("%s could not get clk_bypass\n" , node->name); +pr_err ("%pOFn could not get clk_bypass\n" , node); goto free; } fd->base =of_iomap (node,0 );if (!fd->base) { -pr_err ("%s could not get IO base\n" , node->name); +pr_err ("%pOFn could not get IO base\n" , node); goto free; }
drivers/clk/ti/fixed-factor.c +2 -2
@@ -42,12 +42,12 @@ static void __init of_ti_fixed_factor_clk_setup(struct device_node *node)u32 flags =0 ;if (of_property_read_u32 (node,"ti,clock-div" , &div)) { -pr_err ("%s must have a clock-div property\n" , node->name); +pr_err ("%pOFn must have a clock-div property\n" , node);return ; }if (of_property_read_u32 (node,"ti,clock-mult" , &mult)) { -pr_err ("%s must have a clock-mult property\n" , node->name); +pr_err ("%pOFn must have a clock-mult property\n" , node);return ; }
drivers/clk/ti/gate.c +1 -1
@@ -179,7 +179,7 @@ static void __init _of_ti_gate_clk_setup(struct device_node *node, }if (of_clk_get_parent_count (node) !=1 ) { -pr_err ("%s must have 1 parent\n" , node->name); +pr_err ("%pOFn must have 1 parent\n" , node);return ; }
drivers/clk/ti/interface.c +1 -1
@@ -84,7 +84,7 @@ static void __init _of_ti_interface_clk_setup(struct device_node *node, parent_name =of_clk_get_parent_name (node,0 );if (!parent_name) { -pr_err ("%s must have a parent\n" , node->name); +pr_err ("%pOFn must have a parent\n" , node);return ; }
drivers/clk/ti/mux.c +2 -2
@@ -186,7 +186,7 @@ static void of_mux_clk_setup(struct device_node *node) num_parents =of_clk_get_parent_count (node);if (num_parents <2 ) { -pr_err ("mux-clock %s must have parents\n" , node->name); +pr_err ("mux-clock %pOFn must have parents\n" , node);return ; } parent_names =kzalloc ((sizeof (char *) * num_parents),GFP_KERNEL );
@@ -278,7 +278,7 @@ static void __init of_ti_composite_mux_clk_setup(struct device_node *node) num_parents =of_clk_get_parent_count (node);if (num_parents <2 ) { -pr_err ("%s must have parents\n" , node->name); +pr_err ("%pOFn must have parents\n" , node); goto cleanup; }
drivers/clk/zynq/clkc.c +2 -2
@@ -602,7 +602,7 @@ void __init zynq_clock_init(void) }if (of_address_to_resource (np,0 , &res)) { -pr_err ("%s: failed to get resource\n" , np->name); +pr_err ("%pOFn: failed to get resource\n" , np); goto np_err; }
@@ -611,7 +611,7 @@ void __init zynq_clock_init(void)if (slcr->data) { zynq_clkc_base = (__force void __iomem *)slcr->data + res.start; }else { -pr_err ("%s: Unable to get I/O memory\n" , np->name); +pr_err ("%pOFn: Unable to get I/O memory\n" , np);of_node_put (slcr); goto np_err; }
Signature · 1 line
2.17.1
Re: [PATCH] clk: Convert to using %pOFn instead of device_node.name
Quoted 12 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Eugeniy Paltsev <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc linux-clk at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-renesas-soc at vger.kernel.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 5 lines
---
drivers/clk/sunxi/clk-mod0.c | 6 +++--- drivers/clk/sunxi/clk-sun9i-core.c | 20 ++++++++++---------- drivers/clk/sunxi/clk-sunxi.c | 4 ++--
For the sunxi bits,
Re: [PATCH] clk: Convert to using %pOFn instead of device_node.name
In reply to Rob Herringdrivers/clk/ti/clkctrl.c static void __init _ti_omap4_clkctrl_setup(struct device_node *node) · line 495
Quoted 12 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.drivers/clk/ti/clkctrl.c +1
-2@@ -492,8 +492,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) provider->base =of_iomap (node,0 ); - provider->clkdm_name =kmalloc (strlen (node->parent->name) +3 , -GFP_KERNEL ); + provider->clkdm_name =kasprintf (GFP_KERNEL ,"%pOFnxxx" , node->parent);
Turns out xxx was a bad choice as the %p handler eats all alphanumeric characters. Looks like this has already been applied, so I will send a fix.
Rob
PATCH 1/1 clocksource: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/clocksource/asm9260_timer.c | 2 +- drivers/clocksource/cadence_ttc_timer.c | 2 +- drivers/clocksource/dw_apb_timer_of.c | 8 ++++---- drivers/clocksource/pxa_timer.c | 6 +++--- drivers/clocksource/time-orion.c | 8 ++++---- drivers/clocksource/timer-integrator-ap.c | 2 +- drivers/clocksource/timer-sp804.c | 2 +- drivers/clocksource/zevio-timer.c | 8 ++++---- 8 files changed, 19 insertions(+), 19 deletions(-)
drivers/clocksource/asm9260_timer.c +1 -1
@@ -193,7 +193,7 @@ static int __init asm9260_timer_init(struct device_node *np) priv.base =of_io_request_and_map (np,0 , np->name);if (IS_ERR (priv.base)) { -pr_err ("%s: unable to map resource\n" , np->name); +pr_err ("%pOFn: unable to map resource\n" , np);return PTR_ERR (priv.base); }
drivers/clocksource/cadence_ttc_timer.c +1 -1
@@ -535,7 +535,7 @@ static int __init ttc_timer_init(struct device_node *timer)if (ret)return ret; -pr_info ("%s #0 at %p, irq=%d\n" , timer->name, timer_baseaddr, irq); +pr_info ("%pOFn #0 at %p, irq=%d\n" , timer, timer_baseaddr, irq);return 0 ; }
drivers/clocksource/dw_apb_timer_of.c +4 -4
@@ -33,7 +33,7 @@ static void __init timer_get_base_and_rate(struct device_node *np, *base =of_iomap (np,0 );if (!*base) -panic ("Unable to map regs for %s" , np->name); +panic ("Unable to map regs for %pOFn" , np);/* * Not all implementations use a periphal clock, so don't panic
@@ -42,8 +42,8 @@ static void __init timer_get_base_and_rate(struct device_node *np, pclk =of_clk_get_by_name (np,"pclk" );if (!IS_ERR (pclk))if (clk_prepare_enable (pclk)) -pr_warn ("pclk for %s is present, but could not be activated\n" , - np->name); +pr_warn ("pclk for %pOFn is present, but could not be activated\n" , + np); timer_clk =of_clk_get_by_name (np,"timer" );if (IS_ERR (timer_clk))
@@ -57,7 +57,7 @@ static void __init timer_get_base_and_rate(struct device_node *np, try_clock_freq:if (of_property_read_u32 (np,"clock-freq" , rate) &&of_property_read_u32 (np,"clock-frequency" , rate)) -panic ("No clock nor clock-frequency property for %s" , np->name); +panic ("No clock nor clock-frequency property for %pOFn" , np); }static void __init add_clockevent (struct device_node *event_timer)
drivers/clocksource/pxa_timer.c +3 -3
@@ -191,13 +191,13 @@ static int __init pxa_timer_dt_init(struct device_node *np)/* timer registers are shared with watchdog timer */ timer_base =of_iomap (np,0 );if (!timer_base) { -pr_err ("%s: unable to map resource\n" , np->name); +pr_err ("%pOFn: unable to map resource\n" , np);return -ENXIO ; } clk =of_clk_get (np,0 );if (IS_ERR (clk)) { -pr_crit ("%s: unable to get clk\n" , np->name); +pr_crit ("%pOFn: unable to get clk\n" , np);return PTR_ERR (clk); }
@@ -210,7 +210,7 @@ static int __init pxa_timer_dt_init(struct device_node *np)/* we are only interested in OS-timer0 irq */ irq =irq_of_parse_and_map (np,0 );if (irq <=0 ) { -pr_crit ("%s: unable to parse OS-timer0 irq\n" , np->name); +pr_crit ("%pOFn: unable to parse OS-timer0 irq\n" , np);return -EINVAL ; }
drivers/clocksource/time-orion.c +4 -4
@@ -129,13 +129,13 @@ static int __init orion_timer_init(struct device_node *np)/* timer registers are shared with watchdog timer */ timer_base =of_iomap (np,0 );if (!timer_base) { -pr_err ("%s: unable to map resource\n" , np->name); +pr_err ("%pOFn: unable to map resource\n" , np);return -ENXIO ; } clk =of_clk_get (np,0 );if (IS_ERR (clk)) { -pr_err ("%s: unable to get clk\n" , np->name); +pr_err ("%pOFn: unable to get clk\n" , np);return PTR_ERR (clk); }
@@ -148,7 +148,7 @@ static int __init orion_timer_init(struct device_node *np)/* we are only interested in timer1 irq */ irq =irq_of_parse_and_map (np,1 );if (irq <=0 ) { -pr_err ("%s: unable to parse timer1 irq\n" , np->name); +pr_err ("%pOFn: unable to parse timer1 irq\n" , np);return -EINVAL ; }
@@ -174,7 +174,7 @@ static int __init orion_timer_init(struct device_node *np)/* setup timer1 as clockevent timer */ ret =setup_irq (irq, &orion_clkevt_irq);if (ret) { -pr_err ("%s: unable to setup irq\n" , np->name); +pr_err ("%pOFn: unable to setup irq\n" , np);return ret; }
drivers/clocksource/timer-integrator-ap.c +1 -1
@@ -190,7 +190,7 @@ static int __init integrator_ap_timer_init_of(struct device_node *node) clk =of_clk_get (node,0 );if (IS_ERR (clk)) { -pr_err ("No clock for %s\n" , node->name); +pr_err ("No clock for %pOFn\n" , node);return PTR_ERR (clk); }clk_prepare_enable (clk);
drivers/clocksource/timer-sp804.c +1 -1
@@ -249,7 +249,7 @@ static int __init sp804_of_init(struct device_node *np)if (of_clk_get_parent_count (np) ==3 ) { clk2 =of_clk_get (np,1 );if (IS_ERR (clk2)) { -pr_err ("sp804: %s clock not found: %d\n" , np->name, +pr_err ("sp804: %pOFn clock not found: %d\n" , np, (int )PTR_ERR (clk2)); clk2 =NULL ; }
drivers/clocksource/zevio-timer.c +4 -4
@@ -148,12 +148,12 @@ static int __init zevio_timer_add(struct device_node *node)of_address_to_resource (node,0 , &res);scnprintf (timer->clocksource_name,sizeof (timer->clocksource_name), -"%llx.%s_clocksource" , - (unsigned long long )res.start, node->name); +"%llx.%pOFn_clocksource" , + (unsigned long long )res.start, node);scnprintf (timer->clockevent_name,sizeof (timer->clockevent_name), -"%llx.%s_clockevent" , - (unsigned long long )res.start, node->name); +"%llx.%pOFn_clockevent" , + (unsigned long long )res.start, node);if (timer->interrupt_regs && irqnr) { timer->clkevt.name = timer->clockevent_name;
Signature · 1 line
2.17.1
Re: [PATCH] clocksource: Convert to using %pOFn instead of device_node.name
Quoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Michal Simek <[email protected]>Cc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>---
Applied for 4.20
Thanks!
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 1/1 cpufreq: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/cpufreq/s5pv210-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/s5pv210-cpufreq.c +2 -2
@@ -611,8 +611,8 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)for_each_compatible_node (np,NULL ,"samsung,s5pv210-dmc" ) { id =of_alias_get_id (np,"dmc" );if (id <0 || id >=ARRAY_SIZE (dmc_base)) { -pr_err ("%s: failed to get alias of dmc node '%s'\n" , - __func__, np->name); +pr_err ("%s: failed to get alias of dmc node '%pOFn'\n" , + __func__, np);of_node_put (np);return id; }
Signature · 1 line
2.17.1
Re: [PATCH] cpufreq: Convert to using %pOFn instead of device_node.name
Quoted 18 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc "Rafael J. Wysocki" <[email protected]>Cc Viresh Kumar <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-samsung-soc at vger.kernel.orgCc linux-pm at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>--- drivers/cpufreq/s5pv210-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/s5pv210-cpufreq.c +0
-0
drivers/cpufreq/s5pv210-cpufreq.c static int s5pv210_cpufreq_probe(struct platform_device *pdev) · line 618
Quoted 10 lines
drivers/cpufreq/s5pv210-cpufreq.c +2
-2@@ -611,8 +611,8 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)for_each_compatible_node (np,NULL ,"samsung,s5pv210-dmc" ) { id =of_alias_get_id (np,"dmc" );if (id <0 || id >=ARRAY_SIZE (dmc_base)) { -pr_err ("%s: failed to get alias of dmc node '%s'\n" , - __func__, np->name); +pr_err ("%s: failed to get alias of dmc node '%pOFn'\n" , + __func__, np);of_node_put (np);return id; }
Signature · 1 line
viresh
Rafael J. Wysocki
AppliedRe: [PATCH] cpufreq: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 19 lines · CEST Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc "Rafael J. Wysocki" <[email protected]>Cc Viresh Kumar <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-samsung-soc at vger.kernel.orgCc linux-pm at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>--- drivers/cpufreq/s5pv210-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/cpufreq/s5pv210-cpufreq.c +0
-0
drivers/cpufreq/s5pv210-cpufreq.c static int s5pv210_cpufreq_probe(struct platform_device *pdev) · line 618
Quoted 10 lines
drivers/cpufreq/s5pv210-cpufreq.c +2
-2@@ -611,8 +611,8 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)for_each_compatible_node (np,NULL ,"samsung,s5pv210-dmc" ) { id =of_alias_get_id (np,"dmc" );if (id <0 || id >=ARRAY_SIZE (dmc_base)) { -pr_err ("%s: failed to get alias of dmc node '%s'\n" , - __func__, np->name); +pr_err ("%s: failed to get alias of dmc node '%pOFn'\n" , + __func__, np);of_node_put (np);return id; }
Applied, thanks!
PATCH 1/1 devfreq: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/devfreq/event/exynos-ppmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/devfreq/event/exynos-ppmu.c +2 -2
@@ -535,8 +535,8 @@ static int of_get_devfreq_events(struct device_node *np,if (i ==ARRAY_SIZE (ppmu_events)) {dev_warn (dev, -"don't know how to configure events : %s\n" , - node->name); +"don't know how to configure events : %pOFn\n" , + node);continue ; }
Signature · 1 line
2.17.1
Re: [PATCH] devfreq: Convert to using %pOFn instead of device_node.name
Dear Rob,
Quoted 22 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Chanwoo Choi <[email protected]>Cc MyungJoo Ham <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc linux-pm at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-samsung-soc at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>--- drivers/devfreq/event/exynos-ppmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/devfreq/event/exynos-ppmu.c +0
-0
drivers/devfreq/event/exynos-ppmu.c static int of_get_devfreq_events(struct device_node *np, · line 542
Quoted 10 lines
drivers/devfreq/event/exynos-ppmu.c +2
-2@@ -535,8 +535,8 @@ static int of_get_devfreq_events(struct device_node *np,if (i ==ARRAY_SIZE (ppmu_events)) {dev_warn (dev, -"don't know how to configure events : %s\n" , - node->name); +"don't know how to configure events : %pOFn\n" , + node);continue ; }
Signature · 3 lines
Best Regards, Chanwoo Choi Samsung Electronics
RE: Re: [PATCH] devfreq: Convert to using %pOFn instead of device_node.name
Quoted 19 lines
Dear Rob,
Quoted 16 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Chanwoo Choi <[email protected]>Cc MyungJoo Ham <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc linux-pm at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-samsung-soc at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>--- drivers/devfreq/event/exynos-ppmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[]
Quoted 2 lines
Acked-by Chanwoo Choi <[email protected]>
PATCH 1/1 dmaengine: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/dma/nbpfaxi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/nbpfaxi.c +2 -2
@@ -1095,8 +1095,8 @@ static struct dma_chan *nbpf_of_xlate(struct of_phandle_args *dma_spec,if (!dchan)return NULL ; -dev_dbg (dchan->device->dev,"Entry %s(%s)\n" , __func__, - dma_spec->np->name); +dev_dbg (dchan->device->dev,"Entry %s(%pOFn)\n" , __func__, + dma_spec->np); chan =nbpf_to_chan (dchan);
Vinod
maintainerRe: [PATCH] dmaengine: Convert to using %pOFn instead of device_node.name
Quoted 6 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Applied after dropping CC list. thanks
PATCH 1/1 gpio: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/gpio/gpiolib-of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpiolib-of.c +2 -2
@@ -348,8 +348,8 @@ static struct gpio_desc *of_parse_own_gpio(struct device_node *np,else if (of_property_read_bool (np,"output-high" )) *dflags |=GPIOD_OUT_HIGH ;else { -pr_warn ("GPIO line %d (%s): no hogging state specified, bailing out\n" , -desc_to_gpio (desc), np->name); +pr_warn ("GPIO line %d (%pOFn): no hogging state specified, bailing out\n" , +desc_to_gpio (desc), np);return ERR_PTR (-EINVAL ); }
Signature · 1 line
2.17.1
Re: [PATCH] gpio: Convert to using %pOFn instead of device_node.name
Quoted 6 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Linus Walleij <[email protected]>Signed-off-by Rob Herring <[email protected]>
Patch applied.
Yours,
Linus Walleij
PATCH 1/1 drm: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/gpu/drm/drm_modes.c | 4 ++-- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_modes.c +2 -2
@@ -716,8 +716,8 @@ int of_get_drm_display_mode(struct device_node *np,if (bus_flags)drm_bus_flags_from_videomode (&vm, bus_flags); -pr_debug ("%pOF: got %dx%d display mode from %s\n" , - np, vm.hactive, vm.vactive, np->name); +pr_debug ("%pOF: got %dx%d display mode\n" , + np, vm.hactive, vm.vactive);drm_mode_debug_printmodeline (dmode);return 0 ;
drivers/gpu/drm/msm/hdmi/hdmi.c +1 -1
@@ -579,7 +579,7 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) hdmi_cfg = (struct hdmi_platform_config *)of_device_get_match_data (dev);if (!hdmi_cfg) { -dev_err (dev,"unknown hdmi_cfg: %s\n" , of_node->name); +dev_err (dev,"unknown hdmi_cfg: %pOFn\n" , of_node);return -ENXIO ; }
Signature · 6 lines
2.17.1 _______________________________________________ Freedreno mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/freedreno
Maarten Lankhorst
maintainerRe: [PATCH] drm: Convert to using %pOFn instead of device_node.name
Op 28-08-18 om 03:52 schreef Rob Herring:
Quoted 22 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Gustavo Padovan <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Rob Clark <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/gpu/drm/drm_modes.c | 4 ++-- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/drm_modes.c +0
-0
drivers/gpu/drm/drm_modes.c int of_get_drm_display_mode(struct device_node *np, · line 720
Quoted 7 lines
drivers/gpu/drm/drm_modes.c +2
-2@@ -716,8 +716,8 @@ int of_get_drm_display_mode(struct device_node *np,if (bus_flags)drm_bus_flags_from_videomode (&vm, bus_flags); -pr_debug ("%pOF: got %dx%d display mode from %s\n" , - np, vm.hactive, vm.vactive, np->name); +pr_debug ("%pOF: got %dx%d display mode\n" , + np, vm.hactive, vm.vactive);
Aren't you removing it here instead of converting?
~Maarten
Quoted 8 lines
drivers/gpu/drm/drm_modes.c +0
-0drm_mode_debug_printmodeline (dmode);return 0 ;drivers/gpu/drm/msm/hdmi/hdmi.c +0
-0
drivers/gpu/drm/msm/hdmi/hdmi.c static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) · line 585
Quoted 8 lines
drivers/gpu/drm/msm/hdmi/hdmi.c +1
-1@@ -579,7 +579,7 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) hdmi_cfg = (struct hdmi_platform_config *)of_device_get_match_data (dev);if (!hdmi_cfg) { -dev_err (dev,"unknown hdmi_cfg: %s\n" , of_node->name); +dev_err (dev,"unknown hdmi_cfg: %pOFn\n" , of_node);return -ENXIO ; }
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm: Convert to using %pOFn instead of device_node.name
Quoted 27 lines · Maarten Lankhorst
Op 28-08-18 om 03:52 schreef Rob Herring:
Quoted 25 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Gustavo Padovan <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Rob Clark <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/gpu/drm/drm_modes.c | 4 ++-- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/drm_modes.c +0
-0@@ -716,8 +716,8 @@ int of_get_drm_display_mode(struct device_node *np,if (bus_flags)drm_bus_flags_from_videomode (&vm, bus_flags);
Quoted 5 lines
drivers/gpu/drm/drm_modes.c int of_get_drm_display_mode(struct device_node *np, · line 720
Quoted 4 lines
drivers/gpu/drm/drm_modes.c +2
-2-pr_debug ("%pOF: got %dx%d display mode from %s\n" , - np, vm.hactive, vm.vactive, np->name); +pr_debug ("%pOF: got %dx%d display mode\n" , + np, vm.hactive, vm.vactive);Aren't you removing it here instead of converting?
Well, yes. The full path and name are already printed so the node name alone was pretty redundant.
Rob
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno
Re: [PATCH] drm: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 4 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Quoted 9 lines
Cc Gustavo Padovan <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Sean Paul <[email protected]>Cc David Airlie <[email protected]>Cc Rob Clark <[email protected]>Signed-off-by Rob Herring <[email protected]>
for msm part,
(for drm_modes part, I guess there is no harm removing the redundant name)
BR,
-R
Quoted 36 lines
--- drivers/gpu/drm/drm_modes.c | 4 ++-- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/drm_modes.c +2
-2@@ -716,8 +716,8 @@ int of_get_drm_display_mode(struct device_node *np,if (bus_flags)drm_bus_flags_from_videomode (&vm, bus_flags); -pr_debug ("%pOF: got %dx%d display mode from %s\n" , - np, vm.hactive, vm.vactive, np->name); +pr_debug ("%pOF: got %dx%d display mode\n" , + np, vm.hactive, vm.vactive);drm_mode_debug_printmodeline (dmode);return 0 ;drivers/gpu/drm/msm/hdmi/hdmi.c +1
-2@@ -579,7 +579,7 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) hdmi_cfg = (struct hdmi_platform_config *)of_device_get_match_data (dev);if (!hdmi_cfg) { -dev_err (dev,"unknown hdmi_cfg: %s\n" , of_node->name); +dev_err (dev,"unknown hdmi_cfg: %pOFn\n" , of_node);return -ENXIO ; } --2.17.1
PATCH 1/1 hwmon: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/hwmon/aspeed-pwm-tacho.c | 2 +- drivers/hwmon/ibmpowernv.c | 4 ++-- drivers/hwmon/iio_hwmon.c | 9 ++++----- drivers/hwmon/npcm750-pwm-fan.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-)
drivers/hwmon/aspeed-pwm-tacho.c +1 -1
@@ -852,7 +852,7 @@ static int aspeed_create_pwm_cooling(struct device *dev,dev_err (dev,"Property 'cooling-levels' cannot be read.\n" );return ret; } -snprintf (cdev->name,MAX_CDEV_NAME_LEN ,"%s%d" , child->name, pwm_port); +snprintf (cdev->name,MAX_CDEV_NAME_LEN ,"%pOFn%d" , child, pwm_port); cdev->tcdev = thermal_of_cooling_device_register(child, cdev->name,
drivers/hwmon/ibmpowernv.c +2 -2
@@ -603,8 +603,8 @@ static int create_device_attrs(struct platform_device *pdev)if (of_property_read_u32 (np,"sensor-id" , &sensor_id) &&of_property_read_u32 (np,"sensor-data" , &sensor_id)) {dev_info (&pdev->dev, -"'sensor-id' missing in the node '%s'\n" , - np->name); +"'sensor-id' missing in the node '%pOFn'\n" , + np);continue ; }
drivers/hwmon/iio_hwmon.c +4 -5
@@ -65,13 +65,9 @@ static int iio_hwmon_probe(struct platform_device *pdev)int in_i =1 , temp_i =1 , curr_i =1 , humidity_i =1 ;enum iio_chan_type type;struct iio_channel *channels; -const char *name ="iio_hwmon" ;struct device *hwmon_dev;char *sname; -if (dev->of_node && dev->of_node->name) - name = dev->of_node->name; - channels =devm_iio_channel_get_all (dev);if (IS_ERR (channels)) {if (PTR_ERR (channels) == -ENODEV )
@@ -141,7 +137,10 @@ static int iio_hwmon_probe(struct platform_device *pdev) st->attr_group.attrs = st->attrs; st->groups[0 ] = &st->attr_group; - sname =devm_kstrdup (dev, name,GFP_KERNEL ); +if (dev->of_node) + sname =devm_kasprintf (dev,GFP_KERNEL ,"%pOFn" , dev->of_node); +else + sname =devm_kstrdup (dev,"iio_hwmon" ,GFP_KERNEL );if (!sname)return -ENOMEM ;
drivers/hwmon/npcm750-pwm-fan.c +1 -1
@@ -861,7 +861,7 @@ static int npcm7xx_create_pwm_cooling(struct device *dev,dev_err (dev,"Property 'cooling-levels' cannot be read.\n" );return ret; } -snprintf (cdev->name,THERMAL_NAME_LENGTH ,"%s%d" , child->name, +snprintf (cdev->name,THERMAL_NAME_LENGTH ,"%pOFn%d" , child, pwm_port); cdev->tcdev = thermal_of_cooling_device_register(child,
Signature · 1 line
2.17.1
Re: [PATCH] hwmon: Convert to using %pOFn instead of device_node.name
Quoted 7 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Jean Delvare <[email protected]>Cc Guenter Roeck <[email protected]>Signed-off-by Rob Herring <[email protected]>
The devm_kstrdup((..., "iio_hwmon") is getting a bit ridiculous and is asking for a rewrite, but that can be done in a separate patch.
Other than that, do you want this taken through hwmon or as a series on its own ?
For the latter case,
otherwise please let me know.
Guenter
Quoted 79 lines
--- drivers/hwmon/aspeed-pwm-tacho.c | 2 +- drivers/hwmon/ibmpowernv.c | 4 ++-- drivers/hwmon/iio_hwmon.c | 9 ++++----- drivers/hwmon/npcm750-pwm-fan.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-)drivers/hwmon/aspeed-pwm-tacho.c +1
-1@@ -852,7 +852,7 @@ static int aspeed_create_pwm_cooling(struct device *dev,dev_err (dev,"Property 'cooling-levels' cannot be read.\n" );return ret; } -snprintf (cdev->name,MAX_CDEV_NAME_LEN ,"%s%d" , child->name, pwm_port); +snprintf (cdev->name,MAX_CDEV_NAME_LEN ,"%pOFn%d" , child, pwm_port); cdev->tcdev = thermal_of_cooling_device_register(child, cdev->name,drivers/hwmon/ibmpowernv.c +2
-2@@ -603,8 +603,8 @@ static int create_device_attrs(struct platform_device *pdev)if (of_property_read_u32 (np,"sensor-id" , &sensor_id) &&of_property_read_u32 (np,"sensor-data" , &sensor_id)) {dev_info (&pdev->dev, -"'sensor-id' missing in the node '%s'\n" , - np->name); +"'sensor-id' missing in the node '%pOFn'\n" , + np);continue ; }drivers/hwmon/iio_hwmon.c +4
-5@@ -65,13 +65,9 @@ static int iio_hwmon_probe(struct platform_device *pdev)int in_i =1 , temp_i =1 , curr_i =1 , humidity_i =1 ;enum iio_chan_type type;struct iio_channel *channels; -const char *name ="iio_hwmon" ;struct device *hwmon_dev;char *sname; -if (dev->of_node && dev->of_node->name) - name = dev->of_node->name; - channels =devm_iio_channel_get_all (dev);if (IS_ERR (channels)) {if (PTR_ERR (channels) == -ENODEV )@@ -141,7 +137,10 @@ static int iio_hwmon_probe(struct platform_device *pdev) st->attr_group.attrs = st->attrs; st->groups[0 ] = &st->attr_group; - sname =devm_kstrdup (dev, name,GFP_KERNEL ); +if (dev->of_node) + sname =devm_kasprintf (dev,GFP_KERNEL ,"%pOFn" , dev->of_node); +else + sname =devm_kstrdup (dev,"iio_hwmon" ,GFP_KERNEL );if (!sname)return -ENOMEM ;drivers/hwmon/npcm750-pwm-fan.c +1
-1@@ -861,7 +861,7 @@ static int npcm7xx_create_pwm_cooling(struct device *dev,dev_err (dev,"Property 'cooling-levels' cannot be read.\n" );return ret; } -snprintf (cdev->name,THERMAL_NAME_LENGTH ,"%s%d" , child->name, +snprintf (cdev->name,THERMAL_NAME_LENGTH ,"%pOFn%d" , child, pwm_port); cdev->tcdev = thermal_of_cooling_device_register(child,
Re: [PATCH] hwmon: Convert to using %pOFn instead of device_node.name
Quoted 5 lines · Guenter Roeck
Quoted 3 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Quoted 7 lines
Quoted 4 lines
Cc Jean Delvare <[email protected]>Cc Guenter Roeck <[email protected]>Signed-off-by Rob Herring <[email protected]>The devm_kstrdup((..., "
iio_hwmon") is getting a bit ridiculous and is asking for a rewrite, but that can be done in a separate patch.
Yeah, I tend to think the drivers should just set a name rather than pass thru whatever is in DT. If the DT follows good practice then the node name is just going to reflect the generic class of device.
Quoted 1 line
Other than that, do you want this taken through hwmon or as a series on its own ?
You can take it.
Rob
Re: [PATCH] hwmon: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 7 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Jean Delvare <[email protected]>Cc Guenter Roeck <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied to hwmon-next.
Thanks,
Guenter
Quoted 78 lines
--- drivers/hwmon/aspeed-pwm-tacho.c | 2 +- drivers/hwmon/ibmpowernv.c | 4 ++-- drivers/hwmon/iio_hwmon.c | 9 ++++----- drivers/hwmon/npcm750-pwm-fan.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-)drivers/hwmon/aspeed-pwm-tacho.c +1
-1@@ -852,7 +852,7 @@ static int aspeed_create_pwm_cooling(struct device *dev,dev_err (dev,"Property 'cooling-levels' cannot be read.\n" );return ret; } -snprintf (cdev->name,MAX_CDEV_NAME_LEN ,"%s%d" , child->name, pwm_port); +snprintf (cdev->name,MAX_CDEV_NAME_LEN ,"%pOFn%d" , child, pwm_port); cdev->tcdev = thermal_of_cooling_device_register(child, cdev->name,drivers/hwmon/ibmpowernv.c +2
-2@@ -603,8 +603,8 @@ static int create_device_attrs(struct platform_device *pdev)if (of_property_read_u32 (np,"sensor-id" , &sensor_id) &&of_property_read_u32 (np,"sensor-data" , &sensor_id)) {dev_info (&pdev->dev, -"'sensor-id' missing in the node '%s'\n" , - np->name); +"'sensor-id' missing in the node '%pOFn'\n" , + np);continue ; }drivers/hwmon/iio_hwmon.c +4
-5@@ -65,13 +65,9 @@ static int iio_hwmon_probe(struct platform_device *pdev)int in_i =1 , temp_i =1 , curr_i =1 , humidity_i =1 ;enum iio_chan_type type;struct iio_channel *channels; -const char *name ="iio_hwmon" ;struct device *hwmon_dev;char *sname; -if (dev->of_node && dev->of_node->name) - name = dev->of_node->name; - channels =devm_iio_channel_get_all (dev);if (IS_ERR (channels)) {if (PTR_ERR (channels) == -ENODEV )@@ -141,7 +137,10 @@ static int iio_hwmon_probe(struct platform_device *pdev) st->attr_group.attrs = st->attrs; st->groups[0 ] = &st->attr_group; - sname =devm_kstrdup (dev, name,GFP_KERNEL ); +if (dev->of_node) + sname =devm_kasprintf (dev,GFP_KERNEL ,"%pOFn" , dev->of_node); +else + sname =devm_kstrdup (dev,"iio_hwmon" ,GFP_KERNEL );if (!sname)return -ENOMEM ;drivers/hwmon/npcm750-pwm-fan.c +1
-1@@ -861,7 +861,7 @@ static int npcm7xx_create_pwm_cooling(struct device *dev,dev_err (dev,"Property 'cooling-levels' cannot be read.\n" );return ret; } -snprintf (cdev->name,THERMAL_NAME_LENGTH ,"%s%d" , child->name, +snprintf (cdev->name,THERMAL_NAME_LENGTH ,"%pOFn%d" , child, pwm_port); cdev->tcdev = thermal_of_cooling_device_register(child,
PATCH 1/1 i2c: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/i2c/busses/i2c-powermac.c | 15 ++++++++------- drivers/i2c/muxes/i2c-mux-gpmux.c | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-)
drivers/i2c/busses/i2c-powermac.c +8 -7
@@ -390,7 +390,6 @@ static int i2c_powermac_probe(struct platform_device *dev)struct pmac_i2c_bus *bus =dev_get_platdata (&dev->dev);struct device_node *parent =NULL ;struct i2c_adapter *adapter; -const char *basename;int rc;if (bus ==NULL )
@@ -407,23 +406,25 @@ static int i2c_powermac_probe(struct platform_device *dev) parent =of_get_parent (pmac_i2c_get_controller (bus));if (parent ==NULL )return -EINVAL ; - basename = parent->name; +snprintf (adapter->name,sizeof (adapter->name),"%pOFn %d" , + parent, +pmac_i2c_get_channel (bus)); +of_node_put (parent);break ;case pmac_i2c_bus_pmu: - basename ="pmu" ; +snprintf (adapter->name,sizeof (adapter->name),"pmu %d" , +pmac_i2c_get_channel (bus));break ;case pmac_i2c_bus_smu:/* This is not what we used to do but I'm fixing drivers at * the same time as this change */ - basename ="smu" ; +snprintf (adapter->name,sizeof (adapter->name),"smu %d" , +pmac_i2c_get_channel (bus));break ;default :return -EINVAL ; } -snprintf (adapter->name,sizeof (adapter->name),"%s %d" , basename, -pmac_i2c_get_channel (bus)); -of_node_put (parent);platform_set_drvdata (dev, adapter); adapter->algo = &i2c_powermac_algorithm;
drivers/i2c/muxes/i2c-mux-gpmux.c +2 -2
@@ -120,8 +120,8 @@ static int i2c_mux_probe(struct platform_device *pdev) ret =of_property_read_u32 (child,"reg" , &chan);if (ret <0 ) { -dev_err (dev,"no reg property for node '%s'\n" , - child->name); +dev_err (dev,"no reg property for node '%pOFn'\n" , + child); goto err_children; }
Signature · 1 line
2.17.1
Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name
Quoted 20 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Cc Peter Rosin <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/i2c/busses/i2c-powermac.c | 15 ++++++++------- drivers/i2c/muxes/i2c-mux-gpmux.c | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-)drivers/i2c/busses/i2c-powermac.c +0
-0
drivers/i2c/busses/i2c-powermac.c static int i2c_powermac_probe(struct platform_device *dev) · line 391
Quoted 2 lines
drivers/i2c/busses/i2c-powermac.c +0
-0@@ -390,7 +390,6 @@ static int i2c_powermac_probe(struct platform_device *dev)struct pmac_i2c_bus *bus =dev_get_platdata (&dev->dev);struct device_node *parent =NULL ;
Lose the initializer...
drivers/i2c/busses/i2c-powermac.c static int i2c_powermac_probe(struct platform_device *dev) · line 411
Quoted 13 lines
drivers/i2c/busses/i2c-powermac.c +3
-2struct i2c_adapter *adapter; -const char *basename;int rc;if (bus ==NULL )@@ -407,23 +406,25 @@ static int i2c_powermac_probe(struct platform_device *dev) parent =of_get_parent (pmac_i2c_get_controller (bus));if (parent ==NULL )return -EINVAL ; - basename = parent->name; +snprintf (adapter->name,sizeof (adapter->name),"%pOFn %d" , + parent, +pmac_i2c_get_channel (bus));
...and I would have written "parent, pmac_i2c_get_channel(bus));" on one line, but maybe that's just me.
Anyway, with the initializer fix,
(Wolfram, no need to split this, just take it in full.)
Cheers,
Peter
Quoted 40 lines
drivers/i2c/busses/i2c-powermac.c +5
-5+of_node_put (parent);break ;case pmac_i2c_bus_pmu: - basename ="pmu" ; +snprintf (adapter->name,sizeof (adapter->name),"pmu %d" , +pmac_i2c_get_channel (bus));break ;case pmac_i2c_bus_smu:/* This is not what we used to do but I'm fixing drivers at * the same time as this change */ - basename ="smu" ; +snprintf (adapter->name,sizeof (adapter->name),"smu %d" , +pmac_i2c_get_channel (bus));break ;default :return -EINVAL ; } -snprintf (adapter->name,sizeof (adapter->name),"%s %d" , basename, -pmac_i2c_get_channel (bus)); -of_node_put (parent);platform_set_drvdata (dev, adapter); adapter->algo = &i2c_powermac_algorithm;drivers/i2c/muxes/i2c-mux-gpmux.c +2
-2@@ -120,8 +120,8 @@ static int i2c_mux_probe(struct platform_device *pdev) ret =of_property_read_u32 (child,"reg" , &chan);if (ret <0 ) { -dev_err (dev,"no reg property for node '%s'\n" , - child->name); +dev_err (dev,"no reg property for node '%pOFn'\n" , + child); goto err_children; }
Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name
Quoted 17 lines · Peter Rosin
Quoted 15 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Cc Peter Rosin <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/i2c/busses/i2c-powermac.c | 15 ++++++++------- drivers/i2c/muxes/i2c-mux-gpmux.c | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-)
Quoted 9 lines
drivers/i2c/busses/i2c-powermac.c static int i2c_powermac_probe(struct platform_device *dev) · line 391
Quoted 7 lines
drivers/i2c/busses/i2c-powermac.c +0
-0@@ -390,7 +390,6 @@ static int i2c_powermac_probe(struct platform_device *dev)struct pmac_i2c_bus *bus =dev_get_platdata (&dev->dev);struct device_node *parent =NULL ;Lose the initializer...
That's pretty much unrelated though. I'd have to write "Also, remove the unnecessary parent pointer init" in the commit message and we all know "Also" is a clue for belongs in a separate patch.
Rob
Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name
Quoted 28 lines · Rob Herring
Quoted 17 lines · Peter Rosin
Quoted 15 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Cc Peter Rosin <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/i2c/busses/i2c-powermac.c | 15 ++++++++------- drivers/i2c/muxes/i2c-mux-gpmux.c | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-)Quoted 9 lines
drivers/i2c/busses/i2c-powermac.c static int i2c_powermac_probe(struct platform_device *dev) · line 391
Quoted 7 lines
drivers/i2c/busses/i2c-powermac.c +0
-0@@ -390,7 +390,6 @@ static int i2c_powermac_probe(struct platform_device *dev)struct pmac_i2c_bus *bus =dev_get_platdata (&dev->dev);struct device_node *parent =NULL ;Lose the initializer...
Quoted 1 line
That's pretty much unrelated though.
I disagree. If you remove the need for the initializer, it's very much related to also remove the initializer.
Quoted 3 lines
I'd have to write "Also, remove
the unnecessary parent pointer init" in the commit message and we all know "Also" is a clue for belongs in a separate patch.
How about: "This makes the parent pointer initializer redundant, lose it."
See, no "Also" in there, and no separate patch needed. Or don't mention it at all.
Cheers,
Peter
Re: [PATCH] i2c: Convert to using %pOFn instead of device_node.name
Quoted 30 lines · Peter Rosin
Quoted 28 lines · Rob Herring
Quoted 26 lines · Peter Rosin
Quoted 20 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Cc Peter Rosin <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/i2c/busses/i2c-powermac.c | 15 ++++++++------- drivers/i2c/muxes/i2c-mux-gpmux.c | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-)drivers/i2c/busses/i2c-powermac.c +0
-0drivers/i2c/busses/i2c-powermac.c static int i2c_powermac_probe(struct platform_device *dev) · line 391
Quoted 2 lines
drivers/i2c/busses/i2c-powermac.c +0
-0@@ -390,7 +390,6 @@ static int i2c_powermac_probe(struct platform_device *dev)struct pmac_i2c_bus *bus =dev_get_platdata (&dev->dev);struct device_node *parent =NULL ;Lose the initializer...
Quoted 4 lines
Quoted 1 line
That's pretty much unrelated though.
I disagree. If you remove the need for the initializer, it's very much related to also remove the initializer.
You're right. I'd stared at it a bit and missed that in fact parent is only accessed within the case statement.
Rob
PATCH 1/1 iio: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/iio/adc/qcom-pm8xxx-xoadc.c | 4 ++-- drivers/iio/adc/rcar-gyroadc.c | 12 ++++++------ drivers/iio/frequency/adf4350.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/iio/adc/qcom-pm8xxx-xoadc.c +2 -2
@@ -708,8 +708,8 @@ static int pm8xxx_of_xlate(struct iio_dev *indio_dev,* mux. */ if (iiospec->args_count !=2 ) { -dev_err (&indio_dev->dev,"wrong number of arguments for %s need 2 got %d\n" , - iiospec->np->name, +dev_err (&indio_dev->dev,"wrong number of arguments for %pOFn need 2 got %d\n" , + iiospec->np, iiospec->args_count);return -EINVAL ; }
drivers/iio/adc/rcar-gyroadc.c +6 -6
@@ -343,8 +343,8 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev)for_each_child_of_node (np, child) { of_id =of_match_node (rcar_gyroadc_child_match, child);if (!of_id) { -dev_err (dev,"Ignoring unsupported ADC \"%s\"." , - child->name); +dev_err (dev,"Ignoring unsupported ADC \"%pOFn\"." , + child);continue ; }
@@ -381,16 +381,16 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev) ret =of_property_read_u32 (child,"reg" , ®);if (ret) {dev_err (dev, -"Failed to get child reg property of ADC \"%s\".\n" , - child->name); +"Failed to get child reg property of ADC \"%pOFn\".\n" , + child);return ret; }/* Channel number is too high. */ if (reg >= num_channels) {dev_err (dev, -"Only %i channels supported with %s, but reg = <%i>.\n" , - num_channels, child->name, reg); +"Only %i channels supported with %pOFn, but reg = <%i>.\n" , + num_channels, child, reg);return ret; } }
drivers/iio/frequency/adf4350.c +1 -1
@@ -388,7 +388,7 @@ static struct adf4350_platform_data *adf4350_parse_dt(struct device *dev)if (!pdata)return NULL ; -strncpy (&pdata->name[0 ], np->name,SPI_NAME_SIZE -1 ); +snprintf (&pdata->name[0 ],SPI_NAME_SIZE -1 ,"%pOFn" , np); tmp =10000 ;of_property_read_u32 (np,"adi,channel-spacing" , &tmp);
Signature · 1 line
2.17.1
Jonathan Cameron
maintainerRe: [PATCH] iio: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · On Mon, 27 Aug 2018 20:52:23 -0500 Rob Herring <[email protected]> wrote:
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Jonathan Cameron <[email protected]>Cc Hartmut Knaack <[email protected]>Cc Lars-Peter Clausen <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
Quoted 70 lines
--- drivers/iio/adc/qcom-pm8xxx-xoadc.c | 4 ++-- drivers/iio/adc/rcar-gyroadc.c | 12 ++++++------ drivers/iio/frequency/adf4350.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)drivers/iio/adc/qcom-pm8xxx-xoadc.c +2
-2@@ -708,8 +708,8 @@ static int pm8xxx_of_xlate(struct iio_dev *indio_dev,* mux. */ if (iiospec->args_count !=2 ) { -dev_err (&indio_dev->dev,"wrong number of arguments for %s need 2 got %d\n" , - iiospec->np->name, +dev_err (&indio_dev->dev,"wrong number of arguments for %pOFn need 2 got %d\n" , + iiospec->np, iiospec->args_count);return -EINVAL ; }drivers/iio/adc/rcar-gyroadc.c +6
-6@@ -343,8 +343,8 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev)for_each_child_of_node (np, child) { of_id =of_match_node (rcar_gyroadc_child_match, child);if (!of_id) { -dev_err (dev,"Ignoring unsupported ADC \"%s\"." , - child->name); +dev_err (dev,"Ignoring unsupported ADC \"%pOFn\"." , + child);continue ; }@@ -381,16 +381,16 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev) ret =of_property_read_u32 (child,"reg" , ®);if (ret) {dev_err (dev, -"Failed to get child reg property of ADC \"%s\".\n" , - child->name); +"Failed to get child reg property of ADC \"%pOFn\".\n" , + child);return ret; }/* Channel number is too high. */ if (reg >= num_channels) {dev_err (dev, -"Only %i channels supported with %s, but reg = <%i>.\n" , - num_channels, child->name, reg); +"Only %i channels supported with %pOFn, but reg = <%i>.\n" , + num_channels, child, reg);return ret; } }drivers/iio/frequency/adf4350.c +1
-1@@ -388,7 +388,7 @@ static struct adf4350_platform_data *adf4350_parse_dt(struct device *dev)if (!pdata)return NULL ; -strncpy (&pdata->name[0 ], np->name,SPI_NAME_SIZE -1 ); +snprintf (&pdata->name[0 ],SPI_NAME_SIZE -1 ,"%pOFn" , np); tmp =10000 ;of_property_read_u32 (np,"adi,channel-spacing" , &tmp);
PATCH 1/1 input: sun4i-lradc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/input/keyboard/sun4i-lradc-keys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/keyboard/sun4i-lradc-keys.c +3 -3
@@ -185,19 +185,19 @@ static int sun4i_lradc_load_dt_keymap(struct device *dev, error =of_property_read_u32 (pp,"channel" , &channel);if (error || channel !=0 ) { -dev_err (dev,"%s: Inval channel prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval channel prop\n" , pp);return -EINVAL ; } error =of_property_read_u32 (pp,"voltage" , &map->voltage);if (error) { -dev_err (dev,"%s: Inval voltage prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval voltage prop\n" , pp);return -EINVAL ; } error =of_property_read_u32 (pp,"linux,code" , &map->keycode);if (error) { -dev_err (dev,"%s: Inval linux,code prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval linux,code prop\n" , pp);return -EINVAL ; }
Signature · 1 line
2.17.1
Re: [PATCH] input: sun4i-lradc: Convert to using %pOFn instead of device_node.name
Quoted 4 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Quoted 8 lines
Cc Hans de Goede <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc Maxime Ripard <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/input/keyboard/sun4i-lradc-keys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Ping.
Quoted 31 lines
drivers/input/keyboard/sun4i-lradc-keys.c +3
-4@@ -185,19 +185,19 @@ static int sun4i_lradc_load_dt_keymap(struct device *dev, error =of_property_read_u32 (pp,"channel" , &channel);if (error || channel !=0 ) { -dev_err (dev,"%s: Inval channel prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval channel prop\n" , pp);return -EINVAL ; } error =of_property_read_u32 (pp,"voltage" , &map->voltage);if (error) { -dev_err (dev,"%s: Inval voltage prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval voltage prop\n" , pp);return -EINVAL ; } error =of_property_read_u32 (pp,"linux,code" , &map->keycode);if (error) { -dev_err (dev,"%s: Inval linux,code prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval linux,code prop\n" , pp);return -EINVAL ; } --2.17.1
Re: [PATCH] input: sun4i-lradc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Hans de Goede <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc Maxime Ripard <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied, thank you.
Quoted 34 lines
--- drivers/input/keyboard/sun4i-lradc-keys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/input/keyboard/sun4i-lradc-keys.c +3
-3@@ -185,19 +185,19 @@ static int sun4i_lradc_load_dt_keymap(struct device *dev, error =of_property_read_u32 (pp,"channel" , &channel);if (error || channel !=0 ) { -dev_err (dev,"%s: Inval channel prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval channel prop\n" , pp);return -EINVAL ; } error =of_property_read_u32 (pp,"voltage" , &map->voltage);if (error) { -dev_err (dev,"%s: Inval voltage prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval voltage prop\n" , pp);return -EINVAL ; } error =of_property_read_u32 (pp,"linux,code" , &map->keycode);if (error) { -dev_err (dev,"%s: Inval linux,code prop\n" , pp->name); +dev_err (dev,"%pOFn: Inval linux,code prop\n" , pp);return -EINVAL ; }Signature · 1 line
2.17.1
Signature · 1 line
Dmitry
PATCH 1/1 irqchip: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/irqchip/irq-gic-v3.c | 4 ++-- drivers/irqchip/irq-mscc-ocelot.c | 6 +++--- drivers/irqchip/irq-orion.c | 22 +++++++++++----------- drivers/irqchip/irq-stm32-exti.c | 6 +++--- drivers/irqchip/irq-tango.c | 10 +++++----- drivers/irqchip/irq-tb10x.c | 18 +++++++++--------- 6 files changed, 33 insertions(+), 33 deletions(-)
drivers/irqchip/irq-gic-v3.c +2 -2
@@ -1183,8 +1183,8 @@ static void __init gic_populate_ppi_partitions(struct device_node *gic_node) part->partition_id =of_node_to_fwnode (child_part); -pr_info ("GIC: PPI partition %s[%d] { " , - child_part->name, part_idx); +pr_info ("GIC: PPI partition %pOFn[%d] { " , + child_part, part_idx); n =of_property_count_elems_of_size (child_part,"affinity" ,sizeof (u32));
drivers/irqchip/irq-mscc-ocelot.c +3 -3
@@ -72,7 +72,7 @@ static int __init ocelot_irq_init(struct device_node *node, domain =irq_domain_add_linear (node,OCELOT_NR_IRQ , &irq_generic_chip_ops,NULL );if (!domain) { -pr_err ("%s: unable to add irq domain\n" , node->name); +pr_err ("%pOFn: unable to add irq domain\n" , node);return -ENOMEM ; }
@@ -80,14 +80,14 @@ static int __init ocelot_irq_init(struct device_node *node,"icpu" , handle_level_irq, 0, 0, 0);if (ret) { -pr_err ("%s: unable to alloc irq domain gc\n" , node->name); +pr_err ("%pOFn: unable to alloc irq domain gc\n" , node); goto err_domain_remove; } gc =irq_get_domain_generic_chip (domain,0 ); gc->reg_base =of_iomap (node,0 );if (!gc->reg_base) { -pr_err ("%s: unable to map resource\n" , node->name); +pr_err ("%pOFn: unable to map resource\n" , node); ret = -ENOMEM ; goto err_gc_free; }
drivers/irqchip/irq-orion.c +11 -11
@@ -64,14 +64,14 @@ static int __init orion_irq_init(struct device_node *np, num_chips *ORION_IRQS_PER_CHIP , &irq_generic_chip_ops, NULL);if (!orion_irq_domain) -panic ("%s: unable to add irq domain\n" , np->name); +panic ("%pOFn: unable to add irq domain\n" , np); ret =irq_alloc_domain_generic_chips (orion_irq_domain, -ORION_IRQS_PER_CHIP ,1 , np->name, +ORION_IRQS_PER_CHIP ,1 , np->full_name, handle_level_irq, clr,0 ,IRQ_GC_INIT_MASK_CACHE );if (ret) -panic ("%s: unable to alloc irq domain gc\n" , np->name); +panic ("%pOFn: unable to alloc irq domain gc\n" , np);for (n =0 , base =0 ; n < num_chips; n++, base +=ORION_IRQS_PER_CHIP ) { struct irq_chip_generic *gc =
@@ -80,12 +80,12 @@ static int __init orion_irq_init(struct device_node *np,of_address_to_resource (np, n, &r);if (!request_mem_region (r.start,resource_size (&r), np->name)) -panic ("%s: unable to request mem region %d" , - np->name, n); +panic ("%pOFn: unable to request mem region %d" , + np, n); gc->reg_base =ioremap (r.start,resource_size (&r));if (!gc->reg_base) -panic ("%s: unable to map resource %d" , np->name, n); +panic ("%pOFn: unable to map resource %d" , np, n); gc->chip_types[0 ].regs.mask =ORION_IRQ_MASK ; gc->chip_types[0 ].chip.irq_mask = irq_gc_mask_clr_bit;
@@ -150,20 +150,20 @@ static int __init orion_bridge_irq_init(struct device_node *np, domain =irq_domain_add_linear (np, nrirqs, &irq_generic_chip_ops,NULL );if (!domain) { -pr_err ("%s: unable to add irq domain\n" , np->name); +pr_err ("%pOFn: unable to add irq domain\n" , np);return -ENOMEM ; } ret =irq_alloc_domain_generic_chips (domain, nrirqs,1 , np->name, handle_edge_irq, clr,0 ,IRQ_GC_INIT_MASK_CACHE );if (ret) { -pr_err ("%s: unable to alloc irq domain gc\n" , np->name); +pr_err ("%pOFn: unable to alloc irq domain gc\n" , np);return ret; } ret =of_address_to_resource (np,0 , &r);if (ret) { -pr_err ("%s: unable to get resource\n" , np->name); +pr_err ("%pOFn: unable to get resource\n" , np);return ret; }
@@ -175,14 +175,14 @@ static int __init orion_bridge_irq_init(struct device_node *np,/* Map the parent interrupt for the chained handler */ irq =irq_of_parse_and_map (np,0 );if (irq <=0 ) { -pr_err ("%s: unable to parse irq\n" , np->name); +pr_err ("%pOFn: unable to parse irq\n" , np);return -EINVAL ; } gc =irq_get_domain_generic_chip (domain,0 ); gc->reg_base =ioremap (r.start,resource_size (&r));if (!gc->reg_base) { -pr_err ("%s: unable to map resource\n" , np->name); +pr_err ("%pOFn: unable to map resource\n" , np);return -ENOMEM ; }
drivers/irqchip/irq-stm32-exti.c +3 -3
@@ -678,8 +678,8 @@ static int __init stm32_exti_init(const struct stm32_exti_drv_data *drv_data, domain =irq_domain_add_linear (node, drv_data->bank_nr *IRQS_PER_BANK , &irq_exti_domain_ops,NULL );if (!domain) { -pr_err ("%s: Could not register interrupt domain.\n" , - node->name); +pr_err ("%pOFn: Could not register interrupt domain.\n" , + node); ret = -ENOMEM ; goto out_unmap; }
@@ -768,7 +768,7 @@ __init stm32_exti_hierarchy_init(const struct stm32_exti_drv_data *drv_data, host_data);if (!domain) { -pr_err ("%s: Could not register exti domain.\n" , node->name); +pr_err ("%pOFn: Could not register exti domain.\n" , node); ret = -ENOMEM ; goto out_unmap; }
drivers/irqchip/irq-tango.c +5 -5
@@ -184,11 +184,11 @@ static int __init tangox_irq_init(void __iomem *base, struct resource *baseres, irq =irq_of_parse_and_map (node,0 );if (!irq) -panic ("%s: failed to get IRQ" , node->name); +panic ("%pOFn: failed to get IRQ" , node); err =of_address_to_resource (node,0 , &res);if (err) -panic ("%s: failed to get address" , node->name); +panic ("%pOFn: failed to get address" , node); chip =kzalloc (sizeof (*chip),GFP_KERNEL ); chip->ctl = res.start - baseres->start;
@@ -196,12 +196,12 @@ static int __init tangox_irq_init(void __iomem *base, struct resource *baseres, dom =irq_domain_add_linear (node,64 , &irq_generic_chip_ops, chip);if (!dom) -panic ("%s: failed to create irqdomain" , node->name); +panic ("%pOFn: failed to create irqdomain" , node); err =irq_alloc_domain_generic_chips (dom,32 ,2 , node->name, handle_level_irq,0 ,0 ,0 );if (err) -panic ("%s: failed to allocate irqchip" , node->name); +panic ("%pOFn: failed to allocate irqchip" , node);tangox_irq_domain_init (dom);
@@ -219,7 +219,7 @@ static int __init tangox_of_irq_init(struct device_node *node, base =of_iomap (node,0 );if (!base) -panic ("%s: of_iomap failed" , node->name); +panic ("%pOFn: of_iomap failed" , node);of_address_to_resource (node,0 , &res);
drivers/irqchip/irq-tb10x.c +9 -9
@@ -115,21 +115,21 @@ static int __init of_tb10x_init_irq(struct device_node *ictl,void __iomem *reg_base;if (of_address_to_resource (ictl,0 , &mem)) { -pr_err ("%s: No registers declared in DeviceTree.\n" , - ictl->name); +pr_err ("%pOFn: No registers declared in DeviceTree.\n" , + ictl);return -EINVAL ; }if (!request_mem_region (mem.start,resource_size (&mem), - ictl->name)) { -pr_err ("%s: Request mem region failed.\n" , ictl->name); + ictl->full_name)) { +pr_err ("%pOFn: Request mem region failed.\n" , ictl);return -EBUSY ; } reg_base =ioremap (mem.start,resource_size (&mem));if (!reg_base) { ret = -EBUSY ; -pr_err ("%s: ioremap failed.\n" , ictl->name); +pr_err ("%pOFn: ioremap failed.\n" , ictl); goto ioremap_fail; }
@@ -137,8 +137,8 @@ static int __init of_tb10x_init_irq(struct device_node *ictl, &irq_generic_chip_ops, NULL);if (!domain) { ret = -ENOMEM ; -pr_err ("%s: Could not register interrupt domain.\n" , - ictl->name); +pr_err ("%pOFn: Could not register interrupt domain.\n" , + ictl); goto irq_domain_add_fail; }
@@ -147,8 +147,8 @@ static int __init of_tb10x_init_irq(struct device_node *ictl,IRQ_NOREQUEST ,IRQ_NOPROBE , IRQ_GC_INIT_MASK_CACHE);if (ret) { -pr_err ("%s: Could not allocate generic interrupt chip.\n" , - ictl->name); +pr_err ("%pOFn: Could not allocate generic interrupt chip.\n" , + ictl); goto gc_alloc_fail; }
Signature · 1 line
2.17.1
Re: [PATCH] irqchip: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Thomas Gleixner <[email protected]>Cc Jason Cooper <[email protected]>Cc Marc Zyngier <[email protected]>Cc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>
Should I take it or do you want to take it with others? If the latter, acked-by-me.
Thanks,
tglx
Re: [PATCH] irqchip: Convert to using %pOFn instead of device_node.name
Quoted 6 lines · Thomas Gleixner
Quoted 3 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Quoted 8 lines
Quoted 5 lines
Cc Thomas Gleixner <[email protected]>Cc Jason Cooper <[email protected]>Cc Marc Zyngier <[email protected]>Cc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>Should I take it or do you want to take it with others? If the latter, acked-by-me.
Please take it. There's no dependency.
Rob
PATCH 1/1 leds: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/leds/leds-as3645a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/leds/leds-as3645a.c +2 -2
@@ -529,7 +529,7 @@ static int as3645a_parse_node(struct as3645a *flash,strlcpy (names->flash, name,sizeof (names->flash)); else snprintf(names->flash, sizeof(names->flash), - "%s:flash", node->name); + "%pOFn:flash", node); rval =of_property_read_u32 (flash->flash_node,"flash-timeout-us" , &cfg->flash_timeout_us);
@@ -573,7 +573,7 @@ static int as3645a_parse_node(struct as3645a *flash,strlcpy (names->indicator, name,sizeof (names->indicator)); else snprintf(names->indicator, sizeof(names->indicator), - "%s:indicator", node->name); + "%pOFn:indicator", node); rval =of_property_read_u32 (flash->indicator_node,"led-max-microamp" , &cfg->indicator_max_ua);
Signature · 1 line
2.17.1
Re: [PATCH] leds: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Sakari Ailus <[email protected]>Cc Jacek Anaszewski <[email protected]>Cc Pavel Machek <[email protected]>Signed-off-by Rob Herring <[email protected]>
Signature · 2 lines
Sakari Ailus e-mail: [email protected]
Re: [PATCH] leds: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 5 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Sakari Ailus <[email protected]>Cc Jacek Anaszewski <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Jacek Anaszewski
AppliedRe: [PATCH] leds: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringHi Rob,
Thank you for the patch.
Quoted 27 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Sakari Ailus <[email protected]>Cc Jacek Anaszewski <[email protected]>Cc Pavel Machek <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/leds/leds-as3645a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/leds/leds-as3645a.c +1
-1@@ -529,7 +529,7 @@ static int as3645a_parse_node(struct as3645a *flash,strlcpy (names->flash, name,sizeof (names->flash)); else snprintf(names->flash, sizeof(names->flash), - "%s:flash", node->name); + "%pOFn:flash", node); rval =of_property_read_u32 (flash->flash_node,"flash-timeout-us" , &cfg->flash_timeout_us);
drivers/leds/leds-as3645a.c static int as3645a_parse_node(struct as3645a *flash, · line 579
Quoted 8 lines
drivers/leds/leds-as3645a.c +1
-1@@ -573,7 +573,7 @@ static int as3645a_parse_node(struct as3645a *flash,strlcpy (names->indicator, name,sizeof (names->indicator)); else snprintf(names->indicator, sizeof(names->indicator), - "%s:indicator", node->name); + "%pOFn:indicator", node); rval =of_property_read_u32 (flash->indicator_node,"led-max-microamp" , &cfg->indicator_max_ua);
Applied.
Signature · 2 lines
Best regards, Jacek Anaszewski
PATCH 1/1 memory: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/memory/omap-gpmc.c | 18 +++++++----------- drivers/memory/samsung/exynos-srom.c | 4 ++-- drivers/memory/tegra/mc.c | 6 +++--- drivers/memory/tegra/tegra124-emc.c | 12 ++++++------ 4 files changed, 18 insertions(+), 22 deletions(-)
drivers/memory/omap-gpmc.c +7 -11
@@ -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 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, 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); } } }
drivers/memory/samsung/exynos-srom.c +2 -2
@@ -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; } }
drivers/memory/tegra/mc.c +3 -3
@@ -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; }
drivers/memory/tegra/tegra124-emc.c +6 -6
@@ -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; \ } \ }
Signature · 1 line
2.17.1
Re: [PATCH] memory: Convert to using %pOFn instead of device_node.name
Quoted 14 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc linux-omap at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-samsung-soc at vger.kernel.orgCc linux-tegra at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 6 lines
--- drivers/memory/omap-gpmc.c | 18 +++++++----------- drivers/memory/samsung/exynos-srom.c | 4 ++-- drivers/memory/tegra/mc.c | 6 +++--- drivers/memory/tegra/tegra124-emc.c | 12 ++++++------ 4 files changed, 18 insertions(+), 22 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180828/105c2564/attachment-0001.sig>
Re: [PATCH] memory: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 2 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
...
Quoted 1 line
drivers/memory/omap-gpmc.c | 18 +++++++-----------
Looks good to me:
Re: [PATCH] memory: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 15 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc linux-omap at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-samsung-soc at vger.kernel.orgCc linux-tegra at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 3 lines
--- drivers/memory/omap-gpmc.c | 18 +++++++----------- drivers/memory/samsung/exynos-srom.c | 4 ++--
For Samsung:
Best regards,
Krzysztof
PATCH 1/1 mmc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/mmc/host/sdhci-xenon-phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-xenon-phy.c +2 -2
@@ -660,8 +660,8 @@ static int get_dt_pad_ctrl_data(struct sdhci_host *host,return 0 ;if (of_address_to_resource (np,1 , &iomem)) { -dev_err (mmc_dev (host->mmc),"Unable to find SoC PAD ctrl register address for %s\n" , - np->name); +dev_err (mmc_dev (host->mmc),"Unable to find SoC PAD ctrl register address for %pOFn\n" , + np);return -EINVAL ; }
Signature · 1 line
2.17.1
Re: [PATCH] mmc: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Adrian Hunter <[email protected]>Cc Hu Ziji <[email protected]>Cc Ulf Hansson <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 20 lines
--- drivers/mmc/host/sdhci-xenon-phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci-xenon-phy.c +2
-2@@ -660,8 +660,8 @@ static int get_dt_pad_ctrl_data(struct sdhci_host *host,return 0 ;if (of_address_to_resource (np,1 , &iomem)) { -dev_err (mmc_dev (host->mmc),"Unable to find SoC PAD ctrl register address for %s\n" , - np->name); +dev_err (mmc_dev (host->mmc),"Unable to find SoC PAD ctrl register address for %pOFn\n" , + np);return -EINVAL ; }
Re: [PATCH] mmc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Adrian Hunter <[email protected]>Cc Hu Ziji <[email protected]>Cc Ulf Hansson <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 22 lines
--- drivers/mmc/host/sdhci-xenon-phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/host/sdhci-xenon-phy.c +2
-3@@ -660,8 +660,8 @@ static int get_dt_pad_ctrl_data(struct sdhci_host *host,return 0 ;if (of_address_to_resource (np,1 , &iomem)) { -dev_err (mmc_dev (host->mmc),"Unable to find SoC PAD ctrl register address for %s\n" , - np->name); +dev_err (mmc_dev (host->mmc),"Unable to find SoC PAD ctrl register address for %pOFn\n" , + np);return -EINVAL ; } --2.17.1
PATCH 1/1 net: ethernet: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/net/ethernet/freescale/fsl_pq_mdio.c | 4 +- .../net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 8 ++-- drivers/net/ethernet/marvell/mv643xx_eth.c | 6 +-- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/sun/sunhme.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 22 ++++------ drivers/net/ethernet/ti/netcp_ethss.c | 42 +++++++++---------- 7 files changed, 40 insertions(+), 46 deletions(-)
drivers/net/ethernet/freescale/fsl_pq_mdio.c +2 -2
@@ -446,8 +446,8 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev) goto error; } -snprintf (new_bus->id,MII_BUS_ID_SIZE ,"%s@%llx" , np->name, - (unsigned long long )res.start); +snprintf (new_bus->id,MII_BUS_ID_SIZE ,"%pOFn@%llx" , np, + (unsigned long long )res.start); priv->map =of_iomap (np,0 );if (!priv->map) {
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +4 -4
@@ -807,8 +807,8 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)*/ put_device (&mac_cb->phy_dev->mdio.dev); -dev_dbg (mac_cb->dev,"mac%d phy_node: %s\n" , - mac_cb->mac_id, np->name); +dev_dbg (mac_cb->dev,"mac%d phy_node: %pOFn\n" , + mac_cb->mac_id, np); }of_node_put (np);
@@ -825,8 +825,8 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)* if the phy_dev is found */ put_device (&mac_cb->phy_dev->mdio.dev); -dev_dbg (mac_cb->dev,"mac%d phy_node: %s\n" , - mac_cb->mac_id, np->name); +dev_dbg (mac_cb->dev,"mac%d phy_node: %pOFn\n" , + mac_cb->mac_id, np); }of_node_put (np);
drivers/net/ethernet/marvell/mv643xx_eth.c +3 -3
@@ -2733,17 +2733,17 @@ static int mv643xx_eth_shared_of_add_port(struct platform_device *pdev,memset (&res,0 ,sizeof (res));if (of_irq_to_resource (pnp,0 , &res) <=0 ) { -dev_err (&pdev->dev,"missing interrupt on %s\n" , pnp->name); +dev_err (&pdev->dev,"missing interrupt on %pOFn\n" , pnp);return -EINVAL ; }if (of_property_read_u32 (pnp,"reg" , &ppd.port_number)) { -dev_err (&pdev->dev,"missing reg property on %s\n" , pnp->name); +dev_err (&pdev->dev,"missing reg property on %pOFn\n" , pnp);return -EINVAL ; }if (ppd.port_number >=3 ) { -dev_err (&pdev->dev,"invalid reg property on %s\n" , pnp->name); +dev_err (&pdev->dev,"invalid reg property on %pOFn\n" , pnp);return -EINVAL ; }
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -1
@@ -405,7 +405,7 @@ static int mtk_mdio_init(struct mtk_eth *eth) eth->mii_bus->priv = eth; eth->mii_bus->parent = eth->dev; -snprintf (eth->mii_bus->id,MII_BUS_ID_SIZE ,"%s" , mii_np->name); +snprintf (eth->mii_bus->id,MII_BUS_ID_SIZE ,"%pOFn" , mii_np); ret =of_mdiobus_register (eth->mii_bus, mii_np); err_put_node:
drivers/net/ethernet/sun/sunhme.c +1 -1
@@ -2999,7 +2999,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,/* Now make sure pci_dev cookie is there. */ #ifdef CONFIG_SPARC dp =pci_device_to_OF_node (pdev); -strcpy (prom_name, dp->name); +snprintf (prom_name,sizeof (prom_name),"%pOFn" , dp);#else if (is_quattro_p (pdev))strcpy (prom_name,"SUNW,qfe" );
drivers/net/ethernet/ti/netcp_core.c +8 -14
@@ -225,17 +225,6 @@ static int emac_arch_get_mac_addr(char *x, void __iomem *efuse_mac, u32 swap)return 0 ; } -static const char *netcp_node_name (struct device_node *node) -{ -const char *name; - -if (of_property_read_string (node,"label" , &name) <0 ) - name = node->name; -if (!name) - name ="unknown" ; -return name; -} -/* Module management routines */ static int netcp_register_interface (struct netcp_intf *netcp) {
@@ -267,7 +256,12 @@ static int netcp_module_probe(struct netcp_device *netcp_device, }for_each_available_child_of_node (devices, child) { -const char *name =netcp_node_name (child); +const char *name; +char node_name[32 ]; + +if (of_property_read_string (node,"label" , &name) <0 ) +snprintf (node_name,sizeof (node_name),"%pOFn" , child); + name = node_name;if (!strcasecmp (module->name, name))break ;
@@ -2209,8 +2203,8 @@ static int netcp_probe(struct platform_device *pdev)for_each_available_child_of_node (interfaces, child) { ret =netcp_create_interface (netcp_device, child);if (ret) { -dev_err (dev,"could not create interface(%s)\n" , - child->name); +dev_err (dev,"could not create interface(%pOFn)\n" , + child); goto probe_quit_interface; } }
drivers/net/ethernet/ti/netcp_ethss.c +21 -21
107 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 1/1 net: phy: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/net/phy/mdio-thunder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/mdio-thunder.c +2 -2
@@ -73,8 +73,8 @@ static int thunder_mdiobus_pci_probe(struct pci_dev *pdev, err =of_address_to_resource (node,0 , &r);if (err) {dev_err (&pdev->dev, -"Couldn't translate address for \"%s\"\n" , - node->name); +"Couldn't translate address for \"%pOFn\"\n" , + node);break ; }
Signature · 1 line
2.17.1
Re: [PATCH] net: phy: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Andrew Lunn <[email protected]>Cc Florian Fainelli <[email protected]>Cc "David S. Miller" <[email protected]>Signed-off-by Rob Herring <[email protected]>
Signature · 1 line
Florian
PATCH 1/1 net: wireless: ath: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/net/wireless/ath/ath6kl/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath6kl/init.c +2 -2
@@ -710,8 +710,8 @@ static bool check_device_tree(struct ath6kl *ar)for_each_compatible_node (node,NULL ,"atheros,ath6kl" ) { board_id =of_get_property (node, board_id_prop,NULL );if (board_id ==NULL ) { -ath6kl_warn ("No \"%s\" property on %s node.\n" , - board_id_prop, node->name); +ath6kl_warn ("No \"%s\" property on %pOFn node.\n" , + board_id_prop, node);continue ; } snprintf(board_filename, sizeof(board_filename),
Signature · 1 line
2.17.1
Re: [PATCH] net: wireless: ath: Convert to using %pOFn instead of device_node.name
Quoted 11 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Kalle Valo <[email protected]>Cc "David S. Miller" <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/net/wireless/ath/ath6kl/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The correct prefix is "ath6kl:" but I can fix that.
Signature · 1 line
Kalle Valo
Re: [PATCH] net: wireless: ath: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Kalle Valo <[email protected]>Cc "David S. Miller" <[email protected]>Signed-off-by Rob Herring <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
e12e643c1dfb ath6kl: convert to using %pOFn instead of device_node.name
Signature · 3 lines
https://patchwork.kernel.org/patch/10577811/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
PATCH 1/1 perf: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/perf/arm_pmu_platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/perf/arm_pmu_platform.c +3 -3
@@ -77,14 +77,14 @@ static int pmu_parse_irq_affinity(struct device_node *node, int i) dn =of_parse_phandle (node,"interrupt-affinity" , i);if (!dn) { -pr_warn ("failed to parse interrupt-affinity[%d] for %s\n" , - i, node->name); +pr_warn ("failed to parse interrupt-affinity[%d] for %pOFn\n" , + i, node);return -EINVAL ; } cpu =of_cpu_node_to_id (dn);if (cpu <0 ) { -pr_warn ("failed to find logical CPU for %s\n" , dn->name); +pr_warn ("failed to find logical CPU for %pOFn\n" , dn); cpu = nr_cpu_ids; }
Signature · 1 line
2.17.1
Re: [PATCH] perf: Convert to using %pOFn instead of device_node.name
Quoted 10 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Will Deacon <[email protected]>Cc Mark Rutland <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/perf/arm_pmu_platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Cheers, I can queue this up for 4.20. Let me know if you'd rather take it along with the name pointer removal instead.
Will
Quoted 25 lines
drivers/perf/arm_pmu_platform.c +3
-3@@ -77,14 +77,14 @@ static int pmu_parse_irq_affinity(struct device_node *node, int i) dn =of_parse_phandle (node,"interrupt-affinity" , i);if (!dn) { -pr_warn ("failed to parse interrupt-affinity[%d] for %s\n" , - i, node->name); +pr_warn ("failed to parse interrupt-affinity[%d] for %pOFn\n" , + i, node);return -EINVAL ; } cpu =of_cpu_node_to_id (dn);if (cpu <0 ) { -pr_warn ("failed to find logical CPU for %s\n" , dn->name); +pr_warn ("failed to find logical CPU for %pOFn\n" , dn); cpu = nr_cpu_ids; }Signature · 1 line
2.17.1
Re: [PATCH] perf: Convert to using %pOFn instead of device_node.name
Quoted 13 lines · Will Deacon
Quoted 10 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Will Deacon <[email protected]>Cc Mark Rutland <[email protected]>Cc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>--- drivers/perf/arm_pmu_platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 2 lines
Cheers, I can queue this up for 4.20. Let me know if you'd rather take it along with the name pointer removal instead.
I assumed you were going to take this since I didn't say otherwise, but looks like it is not in linux-next. Please take thru your tree.
Rob
Re: [PATCH] perf: Convert to using %pOFn instead of device_node.name
Quoted 14 lines · Rob Herring
Quoted 13 lines · Will Deacon
Quoted 10 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Will Deacon <[email protected]>Cc Mark Rutland <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/perf/arm_pmu_platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 5 lines
Quoted 2 lines
Cheers, I can queue this up for 4.20. Let me know if you'd rather take it along with the name pointer removal instead.
I assumed you were going to take this since I didn't say otherwise, but looks like it is not in linux-next. Please take thru your tree.
Sorry, slipped through the cracks. I'll get it queued asap for the merge window.
Will
PATCH 1/1 phy: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/phy/broadcom/phy-bcm-cygnus-pcie.c | 4 ++-- drivers/phy/broadcom/phy-brcm-sata.c | 4 ++-- drivers/phy/marvell/phy-berlin-sata.c | 6 +++--- drivers/phy/qualcomm/phy-qcom-qmp.c | 2 +- drivers/phy/rockchip/phy-rockchip-emmc.c | 4 ++-- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 8 ++++---- drivers/phy/rockchip/phy-rockchip-typec.c | 8 ++++---- drivers/phy/rockchip/phy-rockchip-usb.c | 4 ++-- drivers/phy/tegra/xusb.c | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-)
drivers/phy/broadcom/phy-bcm-cygnus-pcie.c +2 -2
@@ -153,8 +153,8 @@ static int cygnus_pcie_phy_probe(struct platform_device *pdev)struct cygnus_pcie_phy *p;if (of_property_read_u32 (child,"reg" , &id)) { -dev_err (dev,"missing reg property for %s\n" , - child->name); +dev_err (dev,"missing reg property for %pOFn\n" , + child); ret = -EINVAL ; goto put_child; }
drivers/phy/broadcom/phy-brcm-sata.c +2 -2
@@ -600,8 +600,8 @@ static int brcm_sata_phy_probe(struct platform_device *pdev)struct brcm_sata_port *port;if (of_property_read_u32 (child,"reg" , &id)) { -dev_err (dev,"missing reg property in node %s\n" , - child->name); +dev_err (dev,"missing reg property in node %pOFn\n" , + child); ret = -EINVAL ; goto put_child; }
drivers/phy/marvell/phy-berlin-sata.c +3 -3
@@ -231,14 +231,14 @@ static int phy_berlin_sata_probe(struct platform_device *pdev)struct phy_berlin_desc *phy_desc;if (of_property_read_u32 (child,"reg" , &phy_id)) { -dev_err (dev,"missing reg property in node %s\n" , - child->name); +dev_err (dev,"missing reg property in node %pOFn\n" , + child); ret = -EINVAL ; goto put_child; }if (phy_id >=ARRAY_SIZE (phy_berlin_power_down_bits)) { -dev_err (dev,"invalid reg in node %s\n" , child->name); +dev_err (dev,"invalid reg in node %pOFn\n" , child); ret = -EINVAL ; goto put_child; }
drivers/phy/qualcomm/phy-qcom-qmp.c +1 -1
@@ -1400,7 +1400,7 @@ static int phy_pipe_clk_register(struct qcom_qmp *qmp, struct device_node *np) ret =of_property_read_string (np,"clock-output-names" , &init.name);if (ret) { -dev_err (qmp->dev,"%s: No clock-output-names\n" , np->name); +dev_err (qmp->dev,"%pOFn: No clock-output-names\n" , np);return ret; }
drivers/phy/rockchip/phy-rockchip-emmc.c +2 -2
@@ -337,8 +337,8 @@ static int rockchip_emmc_phy_probe(struct platform_device *pdev)return -ENOMEM ;if (of_property_read_u32 (dev->of_node,"reg" , ®_offset)) { -dev_err (dev,"missing reg property in node %s\n" , - dev->of_node->name); +dev_err (dev,"missing reg property in node %pOFn\n" , + dev->of_node);return -EINVAL ; }
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +4 -4
@@ -1116,8 +1116,8 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) }if (of_property_read_u32 (np,"reg" , ®)) { -dev_err (dev,"the reg property is not assigned in %s node\n" , - np->name); +dev_err (dev,"the reg property is not assigned in %pOFn node\n" , + np);return -EINVAL ; }
@@ -1143,8 +1143,8 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) }if (!rphy->phy_cfg) { -dev_err (dev,"no phy-config can be matched with %s node\n" , - np->name); +dev_err (dev,"no phy-config can be matched with %pOFn node\n" , + np);return -EINVAL ; }
drivers/phy/rockchip/phy-rockchip-typec.c +4 -4
@@ -1145,8 +1145,8 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev) }if (!tcphy->port_cfgs) { -dev_err (dev,"no phy-config can be matched with %s node\n" , - np->name); +dev_err (dev,"no phy-config can be matched with %pOFn node\n" , + np);return -EINVAL ; }
@@ -1186,8 +1186,8 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)continue ;if (IS_ERR (phy)) { -dev_err (dev,"failed to create phy: %s\n" , - child_np->name); +dev_err (dev,"failed to create phy: %pOFn\n" , + child_np);pm_runtime_disable (dev);return PTR_ERR (phy); }
drivers/phy/rockchip/phy-rockchip-usb.c +2 -2
@@ -208,8 +208,8 @@ static int rockchip_usb_phy_init(struct rockchip_usb_phy_base *base, rk_phy->np = child;if (of_property_read_u32 (child,"reg" , ®_offset)) { -dev_err (base->dev,"missing reg property in node %s\n" , - child->name); +dev_err (base->dev,"missing reg property in node %pOFn\n" , + child);return -EINVAL ; }
drivers/phy/tegra/xusb.c +2 -2
@@ -115,8 +115,8 @@ int tegra_xusb_lane_parse_dt(struct tegra_xusb_lane *lane, err =match_string (lane->soc->funcs, lane->soc->num_funcs, function);if (err <0 ) { -dev_err (dev,"invalid function \"%s\" for lane \"%s\"\n" , - function, np->name); +dev_err (dev,"invalid function \"%s\" for lane \"%pOFn\"\n" , + function, np);return err; }
Signature · 1 line
2.17.1
Re: [PATCH] phy: Convert to using %pOFn instead of device_node.name
Hi Rob,
Quoted 2 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
I assume it should be okay to get this merged in the next merge window?
Thanks
Kishon
Quoted 179 lines
Cc Kishon Vijay Abraham I <[email protected]>Cc linux-arm-kernel at lists.infradead.orgSigned-off-by Rob Herring <[email protected]>--- drivers/phy/broadcom/phy-bcm-cygnus-pcie.c | 4 ++-- drivers/phy/broadcom/phy-brcm-sata.c | 4 ++-- drivers/phy/marvell/phy-berlin-sata.c | 6 +++--- drivers/phy/qualcomm/phy-qcom-qmp.c | 2 +- drivers/phy/rockchip/phy-rockchip-emmc.c | 4 ++-- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 8 ++++---- drivers/phy/rockchip/phy-rockchip-typec.c | 8 ++++---- drivers/phy/rockchip/phy-rockchip-usb.c | 4 ++-- drivers/phy/tegra/xusb.c | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-)drivers/phy/broadcom/phy-bcm-cygnus-pcie.c +2
-2@@ -153,8 +153,8 @@ static int cygnus_pcie_phy_probe(struct platform_device *pdev)struct cygnus_pcie_phy *p;if (of_property_read_u32 (child,"reg" , &id)) { -dev_err (dev,"missing reg property for %s\n" , - child->name); +dev_err (dev,"missing reg property for %pOFn\n" , + child); ret = -EINVAL ; goto put_child; }drivers/phy/broadcom/phy-brcm-sata.c +2
-2@@ -600,8 +600,8 @@ static int brcm_sata_phy_probe(struct platform_device *pdev)struct brcm_sata_port *port;if (of_property_read_u32 (child,"reg" , &id)) { -dev_err (dev,"missing reg property in node %s\n" , - child->name); +dev_err (dev,"missing reg property in node %pOFn\n" , + child); ret = -EINVAL ; goto put_child; }drivers/phy/marvell/phy-berlin-sata.c +3
-3@@ -231,14 +231,14 @@ static int phy_berlin_sata_probe(struct platform_device *pdev)struct phy_berlin_desc *phy_desc;if (of_property_read_u32 (child,"reg" , &phy_id)) { -dev_err (dev,"missing reg property in node %s\n" , - child->name); +dev_err (dev,"missing reg property in node %pOFn\n" , + child); ret = -EINVAL ; goto put_child; }if (phy_id >=ARRAY_SIZE (phy_berlin_power_down_bits)) { -dev_err (dev,"invalid reg in node %s\n" , child->name); +dev_err (dev,"invalid reg in node %pOFn\n" , child); ret = -EINVAL ; goto put_child; }drivers/phy/qualcomm/phy-qcom-qmp.c +1
-1@@ -1400,7 +1400,7 @@ static int phy_pipe_clk_register(struct qcom_qmp *qmp, struct device_node *np) ret =of_property_read_string (np,"clock-output-names" , &init.name);if (ret) { -dev_err (qmp->dev,"%s: No clock-output-names\n" , np->name); +dev_err (qmp->dev,"%pOFn: No clock-output-names\n" , np);return ret; }drivers/phy/rockchip/phy-rockchip-emmc.c +2
-2@@ -337,8 +337,8 @@ static int rockchip_emmc_phy_probe(struct platform_device *pdev)return -ENOMEM ;if (of_property_read_u32 (dev->of_node,"reg" , ®_offset)) { -dev_err (dev,"missing reg property in node %s\n" , - dev->of_node->name); +dev_err (dev,"missing reg property in node %pOFn\n" , + dev->of_node);return -EINVAL ; }drivers/phy/rockchip/phy-rockchip-inno-usb2.c +4
-4@@ -1116,8 +1116,8 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) }if (of_property_read_u32 (np,"reg" , ®)) { -dev_err (dev,"the reg property is not assigned in %s node\n" , - np->name); +dev_err (dev,"the reg property is not assigned in %pOFn node\n" , + np);return -EINVAL ; }@@ -1143,8 +1143,8 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) }if (!rphy->phy_cfg) { -dev_err (dev,"no phy-config can be matched with %s node\n" , - np->name); +dev_err (dev,"no phy-config can be matched with %pOFn node\n" , + np);return -EINVAL ; }drivers/phy/rockchip/phy-rockchip-typec.c +4
-4@@ -1145,8 +1145,8 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev) }if (!tcphy->port_cfgs) { -dev_err (dev,"no phy-config can be matched with %s node\n" , - np->name); +dev_err (dev,"no phy-config can be matched with %pOFn node\n" , + np);return -EINVAL ; }@@ -1186,8 +1186,8 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)continue ;if (IS_ERR (phy)) { -dev_err (dev,"failed to create phy: %s\n" , - child_np->name); +dev_err (dev,"failed to create phy: %pOFn\n" , + child_np);pm_runtime_disable (dev);return PTR_ERR (phy); }drivers/phy/rockchip/phy-rockchip-usb.c +2
-2@@ -208,8 +208,8 @@ static int rockchip_usb_phy_init(struct rockchip_usb_phy_base *base, rk_phy->np = child;if (of_property_read_u32 (child,"reg" , ®_offset)) { -dev_err (base->dev,"missing reg property in node %s\n" , - child->name); +dev_err (base->dev,"missing reg property in node %pOFn\n" , + child);return -EINVAL ; }drivers/phy/tegra/xusb.c +2
-2@@ -115,8 +115,8 @@ int tegra_xusb_lane_parse_dt(struct tegra_xusb_lane *lane, err =match_string (lane->soc->funcs, lane->soc->num_funcs, function);if (err <0 ) { -dev_err (dev,"invalid function \"%s\" for lane \"%s\"\n" , - function, np->name); +dev_err (dev,"invalid function \"%s\" for lane \"%pOFn\"\n" , + function, np);return err; }
Re: [PATCH] phy: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Kishon Vijay Abraham I
Hi Rob,
Quoted 2 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.I assume it should be okay to get this merged in the next merge window?
Yes, of course.
Rob
PATCH 1/1 pinctrl: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/pinctrl/berlin/berlin.c | 6 ++-- drivers/pinctrl/freescale/pinctrl-imx.c | 7 ++-- drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++---- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 +-- drivers/pinctrl/meson/pinctrl-meson.c | 2 +- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 4 +-- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 6 ++-- drivers/pinctrl/pinctrl-at91.c | 8 ++--- drivers/pinctrl/pinctrl-lantiq.c | 8 ++--- drivers/pinctrl/pinctrl-rockchip.c | 8 ++--- drivers/pinctrl/pinctrl-rza1.c | 8 ++--- drivers/pinctrl/pinctrl-single.c | 32 +++++++++---------- drivers/pinctrl/pinctrl-st.c | 6 ++-- drivers/pinctrl/sirf/pinctrl-atlas7.c | 4 +-- drivers/pinctrl/stm32/pinctrl-stm32.c | 4 +-- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 8 ++--- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 8 ++--- 17 files changed, 66 insertions(+), 69 deletions(-)
drivers/pinctrl/berlin/berlin.c +2 -4
@@ -64,16 +64,14 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev, ret =of_property_read_string (node,"function" , &function_name);if (ret) {dev_err (pctrl->dev, -"missing function property in node %s\n" , - node->name); +"missing function property in node %pOFn\n" , node);return -EINVAL ; } ngroups =of_property_count_strings (node,"groups" );if (ngroups <0 ) {dev_err (pctrl->dev, -"missing groups property in node %s\n" , - node->name); +"missing groups property in node %pOFn\n" , node);return -EINVAL ; }
drivers/pinctrl/freescale/pinctrl-imx.c +3 -4
@@ -69,8 +69,7 @@ static int imx_dt_node_to_map(struct pinctrl_dev *pctldev,*/ grp =imx_pinctrl_find_group_by_name (pctldev, np->name);if (!grp) { -dev_err (ipctl->dev,"unable to find group for node %s\n" , - np->name); +dev_err (ipctl->dev,"unable to find group for node %pOFn\n" , np);return -EINVAL ; }
@@ -434,7 +433,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np,int i;u32 config; -dev_dbg (ipctl->dev,"group(%d): %s\n" , index, np->name); +dev_dbg (ipctl->dev,"group(%d): %pOFn\n" , index, np);if (info->flags &SHARE_MUX_CONF_REG ) pin_size =FSL_PIN_SHARE_SIZE ;
@@ -544,7 +543,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,struct group_desc *grp;u32 i =0 ; -dev_dbg (pctl->dev,"parse function(%d): %s\n" , index, np->name); +dev_dbg (pctl->dev,"parse function(%d): %pOFn\n" , index, np); func =pinmux_generic_get_function (pctl, index);if (!func)
drivers/pinctrl/freescale/pinctrl-imx1-core.c +6 -6
@@ -233,8 +233,8 @@ static int imx1_dt_node_to_map(struct pinctrl_dev *pctldev,*/ grp =imx1_pinctrl_find_group_by_name (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }
@@ -466,7 +466,7 @@ static int imx1_pinctrl_parse_groups(struct device_node *np,const __be32 *list;int i; -dev_dbg (info->dev,"group(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"group(%d): %pOFn\n" , index, np);/* Initialise group */ grp->name = np->name;
@@ -477,8 +477,8 @@ static int imx1_pinctrl_parse_groups(struct device_node *np, list =of_get_property (np,"fsl,pins" , &size);/* we do not check return since it's safe node passed down */ if (!size || size %12 ) { -dev_notice (info->dev,"Not a valid fsl,pins property (%s)\n" , - np->name); +dev_notice (info->dev,"Not a valid fsl,pins property (%pOFn)\n" , + np);return -EINVAL ; }
@@ -513,7 +513,7 @@ static int imx1_pinctrl_parse_functions(struct device_node *np,static u32 grp_index;u32 i =0 ; -dev_dbg (info->dev,"parse function(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"parse function(%d): %pOFn\n" , index, np); func = &info->functions[index];
drivers/pinctrl/mediatek/pinctrl-mtk-common.c +2 -2
@@ -514,8 +514,8 @@ static int mtk_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, pins =of_find_property (node,"pinmux" ,NULL );if (!pins) { -dev_err (pctl->dev,"missing pins property in node %s .\n" , - node->name); +dev_err (pctl->dev,"missing pins property in node %pOFn .\n" , + node);return -EINVAL ; }
drivers/pinctrl/meson/pinctrl-meson.c +1 -1
@@ -451,7 +451,7 @@ static struct regmap *meson_map_resource(struct meson_pinctrl *pc, meson_regmap_config.max_register =resource_size (&res) -4 ; meson_regmap_config.name =devm_kasprintf (pc->dev,GFP_KERNEL , -"%s-%s" , node->name, +"%pOFn-%s" , node, name);if (!meson_regmap_config.name)return ERR_PTR (-ENOMEM );
drivers/pinctrl/mvebu/pinctrl-mvebu.c +2 -2
@@ -413,14 +413,14 @@ static int mvebu_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, ret =of_property_read_string (np,"marvell,function" , &function);if (ret) {dev_err (pctl->dev, -"missing marvell,function in node %s\n" , np->name); +"missing marvell,function in node %pOFn\n" , np);return 0 ; } nmaps =of_property_count_strings (np,"marvell,pins" );if (nmaps <0 ) {dev_err (pctl->dev, -"missing marvell,pins in node %s\n" , np->name); +"missing marvell,pins in node %pOFn\n" , np);return 0 ; }
drivers/pinctrl/nomadik/pinctrl-nomadik.c +3 -3
@@ -1051,7 +1051,7 @@ static struct nmk_gpio_chip *nmk_gpio_populate_chip(struct device_node *np, gpio_pdev =of_find_device_by_node (np);if (!gpio_pdev) { -pr_err ("populate \"%s\": device not found\n" , np->name); +pr_err ("populate \"%pOFn\": device not found\n" , np);return ERR_PTR (-ENODEV ); }if (of_property_read_u32 (np,"gpio-bank" , &id)) {
@@ -1904,8 +1904,8 @@ static int nmk_pinctrl_probe(struct platform_device *pdev) gpio_np =of_parse_phandle (np,"nomadik-gpio-chips" , i);if (gpio_np) {dev_info (&pdev->dev, -"populate NMK GPIO %d \"%s\"\n" , - i, gpio_np->name); +"populate NMK GPIO %d \"%pOFn\"\n" , + i, gpio_np); nmk_chip =nmk_gpio_populate_chip (gpio_np, pdev);if (IS_ERR (nmk_chip)) dev_err(&pdev->dev,
drivers/pinctrl/pinctrl-at91.c +4 -4
@@ -263,8 +263,8 @@ static int at91_dt_node_to_map(struct pinctrl_dev *pctldev,*/ grp =at91_pinctrl_find_group_by_name (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }
@@ -1071,7 +1071,7 @@ static int at91_pinctrl_parse_groups(struct device_node *np,const __be32 *list;int i, j; -dev_dbg (info->dev,"group(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"group(%d): %pOFn\n" , index, np);/* Initialise group */ grp->name = np->name;
@@ -1122,7 +1122,7 @@ static int at91_pinctrl_parse_functions(struct device_node *np,static u32 grp_index;u32 i =0 ; -dev_dbg (info->dev,"parse function(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"parse function(%d): %pOFn\n" , index, np); func = &info->functions[index];
drivers/pinctrl/pinctrl-lantiq.c +4 -4
@@ -80,14 +80,14 @@ static void ltq_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,int ret, i;if (!pins && !groups) { -dev_err (pctldev->dev,"%s defines neither pins nor groups\n" , - np->name); +dev_err (pctldev->dev,"%pOFn defines neither pins nor groups\n" , + np);return ; }if (pins && groups) { -dev_err (pctldev->dev,"%s defines both pins and groups\n" , - np->name); +dev_err (pctldev->dev,"%pOFn defines both pins and groups\n" , + np);return ; }
drivers/pinctrl/pinctrl-rockchip.c +4 -4
@@ -501,8 +501,8 @@ static int rockchip_dt_node_to_map(struct pinctrl_dev *pctldev,*/ grp =pinctrl_name_to_group (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }
@@ -2454,7 +2454,7 @@ static int rockchip_pinctrl_parse_groups(struct device_node *np,int i, j;int ret; -dev_dbg (info->dev,"group(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"group(%d): %pOFn\n" , index, np);/* Initialise group */ grp->name = np->name;
@@ -2519,7 +2519,7 @@ static int rockchip_pinctrl_parse_functions(struct device_node *np,static u32 grp_index;u32 i =0 ; -dev_dbg (info->dev,"parse function(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"parse function(%d): %pOFn\n" , index, np); func = &info->functions[index];
drivers/pinctrl/pinctrl-rza1.c +4 -4
@@ -930,8 +930,8 @@ static int rza1_parse_pinmux_node(struct rza1_pinctrl *rza1_pctl, &npin_configs);if (ret) {dev_err (rza1_pctl->dev, -"Unable to parse pin configuration options for %s\n" , - np->name); +"Unable to parse pin configuration options for %pOFn\n" , + np);return ret; }
@@ -1226,8 +1226,8 @@ static int rza1_parse_gpiochip(struct rza1_pinctrl *rza1_pctl, *chip = rza1_gpiochip_template; chip->base =-1 ; - chip->label =devm_kasprintf (rza1_pctl->dev,GFP_KERNEL ,"%s" , - np->name); + chip->label =devm_kasprintf (rza1_pctl->dev,GFP_KERNEL ,"%pOFn" , + np); chip->ngpio = of_args.args[2 ]; chip->of_node = np; chip->parent = rza1_pctl->dev;
drivers/pinctrl/pinctrl-single.c +16 -16
@@ -1022,14 +1022,14 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs, vals[found].reg = pcs->base + offset; vals[found].val = pinctrl_spec.args[1 ]; -dev_dbg (pcs->dev,"%s index: 0x%x value: 0x%x\n" , - pinctrl_spec.np->name, offset, pinctrl_spec.args[1 ]); +dev_dbg (pcs->dev,"%pOFn index: 0x%x value: 0x%x\n" , + pinctrl_spec.np, offset, pinctrl_spec.args[1 ]); pin =pcs_get_pin_by_offset (pcs, offset);if (pin <0 ) {dev_err (pcs->dev, -"could not add functions for %s %ux\n" , - np->name, offset); +"could not add functions for %pOFn %ux\n" , + np, offset);break ; } pins[found++] = pin;
@@ -1135,8 +1135,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs, val = pinctrl_spec.args[1 ]; mask = pinctrl_spec.args[2 ]; -dev_dbg (pcs->dev,"%s index: 0x%x value: 0x%x mask: 0x%x\n" , - pinctrl_spec.np->name, offset, val, mask); +dev_dbg (pcs->dev,"%pOFn index: 0x%x value: 0x%x mask: 0x%x\n" , + pinctrl_spec.np, offset, val, mask);/* Parse pins in each row from LSB */ while (mask) {
@@ -1148,8 +1148,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,if ((mask & mask_pos) ==0 ) {dev_err (pcs->dev, -"Invalid mask for %s at 0x%x\n" , - np->name, offset); +"Invalid mask for %pOFn at 0x%x\n" , + np, offset);break ; }
@@ -1157,8 +1157,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,if (submask != mask_pos) {dev_warn (pcs->dev, -"Invalid submask 0x%x for %s at 0x%x\n" , - submask, np->name, offset); +"Invalid submask 0x%x for %pOFn at 0x%x\n" , + submask, np, offset);continue ; }
@@ -1169,8 +1169,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs, pin =pcs_get_pin_by_offset (pcs, offset);if (pin <0 ) {dev_err (pcs->dev, -"could not add functions for %s %ux\n" , - np->name, offset); +"could not add functions for %pOFn %ux\n" , + np, offset);break ; } pins[found++] = pin + pin_num_from_lsb;
@@ -1254,16 +1254,16 @@ static int pcs_dt_node_to_map(struct pinctrl_dev *pctldev, ret =pcs_parse_bits_in_pinctrl_entry (pcs, np_config, map, num_maps, pgnames);if (ret <0 ) { -dev_err (pcs->dev,"no pins entries for %s\n" , - np_config->name); +dev_err (pcs->dev,"no pins entries for %pOFn\n" , + np_config); goto free_pgnames; } }else { ret =pcs_parse_one_pinctrl_entry (pcs, np_config, map, num_maps, pgnames);if (ret <0 ) { -dev_err (pcs->dev,"no pins entries for %s\n" , - np_config->name); +dev_err (pcs->dev,"no pins entries for %pOFn\n" , + np_config); goto free_pgnames; } }
drivers/pinctrl/pinctrl-st.c +3 -3
@@ -817,8 +817,8 @@ static int st_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, grp =st_pctl_find_group_by_name (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }
@@ -1184,7 +1184,7 @@ static int st_pctl_dt_parse_groups(struct device_node *np,if (pp->length /sizeof (__be32) >=OF_GPIO_ARGS_MIN ) { npins++; }else { -pr_warn ("Invalid st,pins in %s node\n" , np->name); +pr_warn ("Invalid st,pins in %pOFn node\n" , np);return -EINVAL ; } }
drivers/pinctrl/sirf/pinctrl-atlas7.c +2 -2
@@ -6058,8 +6058,8 @@ static int atlas7_gpio_probe(struct platform_device *pdev) ret =gpiochip_add_data (chip, a7gc);if (ret) {dev_err (&pdev->dev, -"%s: error in probe function with status %d\n" , - np->name, ret); +"%pOF: error in probe function with status %d\n" , + np, ret); goto failed; }
drivers/pinctrl/stm32/pinctrl-stm32.c +2 -2
@@ -416,8 +416,8 @@ static int stm32_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, pins =of_find_property (node,"pinmux" ,NULL );if (!pins) { -dev_err (pctl->dev,"missing pins property in node %s .\n" , - node->name); +dev_err (pctl->dev,"missing pins property in node %pOFn .\n" , + node);return -EINVAL ; }
drivers/pinctrl/sunxi/pinctrl-sunxi.c +4 -4
@@ -332,15 +332,15 @@ static int sunxi_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev, function =sunxi_pctrl_parse_function_prop (node);if (!function) { -dev_err (pctl->dev,"missing function property in node %s\n" , - node->name); +dev_err (pctl->dev,"missing function property in node %pOFn\n" , + node);return -EINVAL ; } pin_prop =sunxi_pctrl_find_pins_prop (node, &npins);if (!pin_prop) { -dev_err (pctl->dev,"missing pins property in node %s\n" , - node->name); +dev_err (pctl->dev,"missing pins property in node %pOFn\n" , + node);return -EINVAL ; }
drivers/pinctrl/ti/pinctrl-ti-iodelay.c +4 -4
@@ -452,8 +452,8 @@ static int ti_iodelay_node_iterator(struct pinctrl_dev *pctldev, pin =ti_iodelay_offset_to_pin (iod, cfg[pin_index].offset);if (pin <0 ) { -dev_err (iod->dev,"could not add functions for %s %ux\n" , - np->name, cfg[pin_index].offset); +dev_err (iod->dev,"could not add functions for %pOFn %ux\n" , + np, cfg[pin_index].offset);return -ENODEV ; } pins[pin_index] = pin;
@@ -461,8 +461,8 @@ static int ti_iodelay_node_iterator(struct pinctrl_dev *pctldev, pd = &iod->pa[pin]; pd->drv_data = &cfg[pin_index]; -dev_dbg (iod->dev,"%s offset=%x a_delay = %d g_delay = %d\n" , - np->name, cfg[pin_index].offset, cfg[pin_index].a_delay, +dev_dbg (iod->dev,"%pOFn offset=%x a_delay = %d g_delay = %d\n" , + np, cfg[pin_index].offset, cfg[pin_index].a_delay, cfg[pin_index].g_delay);return 0 ;
Signature · 1 line
2.17.1
RE: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
Quoted 62 lines
-----Original Message-----
From: Rob Herring [mailto:robh at kernel.org]
Sent: Tuesday, August 28, 2018 9:53 AM
To: linux-kernel at vger.kernel.org
Cc: Linus Walleij <[email protected]>; A.s. Dong <[email protected]>; Fabio Estevam <[email protected]>; Shawn Guo <[email protected]>; Stefan Agner <[email protected]>; Pengutronix Kernel Team <[email protected]>; Sean Wang <[email protected]>; Matthias Brugger <[email protected]>; Carlo Caione <[email protected]>; Kevin Hilman <[email protected]>; Jason Cooper <[email protected]>; Andrew Lunn <[email protected]>; Gregory Clement <[email protected]>; Sebastian Hesselbarth <[email protected]>; Jean-Christophe Plagniol-Villard <[email protected]>; Nicolas Ferre <[email protected]>; Alexandre Belloni <[email protected]>; Heiko Stuebner <[email protected]>; Tony Lindgren <[email protected]>; Haojian Zhuang <[email protected]>; Patrice Chotard <[email protected]>; Barry Song <[email protected]>; Maxime Coquelin <[email protected]>; Alexandre Torgue <[email protected]>; Maxime Ripard <[email protected]>; Chen-Yu Tsai <[email protected]>; linux-gpio at vger.kernel.org; linux-mediatek at lists.infradead.org; linux-arm-kernel at lists.infradead.org; linux-amlogic at lists.infradead.org; linux-rockchip at lists.infradead.org; linux-omap at vger.kernel.org
Subject: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.nameIn preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Linus Walleij <[email protected]>Cc Dong Aisheng <[email protected]>Cc Fabio Estevam <[email protected]>Cc Shawn Guo <[email protected]>Cc Stefan Agner <[email protected]>Cc Pengutronix Kernel Team <[email protected]>Cc Sean Wang <[email protected]>Cc Matthias Brugger <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Cc Gregory Clement <[email protected]>Cc Sebastian Hesselbarth <[email protected]>Cc Jean-Christophe Plagniol-Villard <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Tony Lindgren <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Patrice Chotard <[email protected]>Cc Barry Song <[email protected]>Cc Maxime Coquelin <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc linux-gpio at vger.kernel.orgCc linux-mediatek at lists.infradead.orgCc linux-arm-kernel at lists.infradead.orgCc linux-amlogic at lists.infradead.orgCc linux-rockchip at lists.infradead.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 4 lines
--- drivers/pinctrl/berlin/berlin.c | 6 ++-- drivers/pinctrl/freescale/pinctrl-imx.c | 7 ++-- drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++----
For i.MX,
Regards
Dong Aisheng
Re: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 28 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Linus Walleij <[email protected]>Cc Dong Aisheng <[email protected]>Cc Fabio Estevam <[email protected]>Cc Shawn Guo <[email protected]>Cc Stefan Agner <[email protected]>Cc Pengutronix Kernel Team <[email protected]>Cc Sean Wang <[email protected]>Cc Matthias Brugger <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Cc Gregory Clement <[email protected]>Cc Sebastian Hesselbarth <[email protected]>Cc Jean-Christophe Plagniol-Villard <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Tony Lindgren <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Patrice Chotard <[email protected]>Cc Barry Song <[email protected]>Cc Maxime Coquelin <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Maxime Ripard <[email protected]>
Quoted 8 lines
Cc Chen-Yu Tsai <[email protected]>Cc linux-gpio at vger.kernel.orgCc linux-mediatek at lists.infradead.orgCc linux-arm-kernel at lists.infradead.orgCc linux-amlogic at lists.infradead.orgCc linux-rockchip at lists.infradead.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
For at91:
Quoted 502 lines
--- drivers/pinctrl/berlin/berlin.c | 6 ++-- drivers/pinctrl/freescale/pinctrl-imx.c | 7 ++-- drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++---- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 +-- drivers/pinctrl/meson/pinctrl-meson.c | 2 +- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 4 +-- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 6 ++-- drivers/pinctrl/pinctrl-at91.c | 8 ++--- drivers/pinctrl/pinctrl-lantiq.c | 8 ++--- drivers/pinctrl/pinctrl-rockchip.c | 8 ++--- drivers/pinctrl/pinctrl-rza1.c | 8 ++--- drivers/pinctrl/pinctrl-single.c | 32 +++++++++---------- drivers/pinctrl/pinctrl-st.c | 6 ++-- drivers/pinctrl/sirf/pinctrl-atlas7.c | 4 +-- drivers/pinctrl/stm32/pinctrl-stm32.c | 4 +-- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 8 ++--- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 8 ++--- 17 files changed, 66 insertions(+), 69 deletions(-)drivers/pinctrl/berlin/berlin.c +2
-4@@ -64,16 +64,14 @@ static int berlin_pinctrl_dt_node_to_map(struct pinctrl_dev *pctrl_dev, ret =of_property_read_string (node,"function" , &function_name);if (ret) {dev_err (pctrl->dev, -"missing function property in node %s\n" , - node->name); +"missing function property in node %pOFn\n" , node);return -EINVAL ; } ngroups =of_property_count_strings (node,"groups" );if (ngroups <0 ) {dev_err (pctrl->dev, -"missing groups property in node %s\n" , - node->name); +"missing groups property in node %pOFn\n" , node);return -EINVAL ; }drivers/pinctrl/freescale/pinctrl-imx.c +3
-4@@ -69,8 +69,7 @@ static int imx_dt_node_to_map(struct pinctrl_dev *pctldev,*/ grp =imx_pinctrl_find_group_by_name (pctldev, np->name);if (!grp) { -dev_err (ipctl->dev,"unable to find group for node %s\n" , - np->name); +dev_err (ipctl->dev,"unable to find group for node %pOFn\n" , np);return -EINVAL ; }@@ -434,7 +433,7 @@ static int imx_pinctrl_parse_groups(struct device_node *np,int i;u32 config; -dev_dbg (ipctl->dev,"group(%d): %s\n" , index, np->name); +dev_dbg (ipctl->dev,"group(%d): %pOFn\n" , index, np);if (info->flags &SHARE_MUX_CONF_REG ) pin_size =FSL_PIN_SHARE_SIZE ;@@ -544,7 +543,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,struct group_desc *grp;u32 i =0 ; -dev_dbg (pctl->dev,"parse function(%d): %s\n" , index, np->name); +dev_dbg (pctl->dev,"parse function(%d): %pOFn\n" , index, np); func =pinmux_generic_get_function (pctl, index);if (!func)drivers/pinctrl/freescale/pinctrl-imx1-core.c +6
-6@@ -233,8 +233,8 @@ static int imx1_dt_node_to_map(struct pinctrl_dev *pctldev,*/ grp =imx1_pinctrl_find_group_by_name (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }@@ -466,7 +466,7 @@ static int imx1_pinctrl_parse_groups(struct device_node *np,const __be32 *list;int i; -dev_dbg (info->dev,"group(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"group(%d): %pOFn\n" , index, np);/* Initialise group */ grp->name = np->name;@@ -477,8 +477,8 @@ static int imx1_pinctrl_parse_groups(struct device_node *np, list =of_get_property (np,"fsl,pins" , &size);/* we do not check return since it's safe node passed down */ if (!size || size %12 ) { -dev_notice (info->dev,"Not a valid fsl,pins property (%s)\n" , - np->name); +dev_notice (info->dev,"Not a valid fsl,pins property (%pOFn)\n" , + np);return -EINVAL ; }@@ -513,7 +513,7 @@ static int imx1_pinctrl_parse_functions(struct device_node *np,static u32 grp_index;u32 i =0 ; -dev_dbg (info->dev,"parse function(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"parse function(%d): %pOFn\n" , index, np); func = &info->functions[index];drivers/pinctrl/mediatek/pinctrl-mtk-common.c +2
-2@@ -514,8 +514,8 @@ static int mtk_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, pins =of_find_property (node,"pinmux" ,NULL );if (!pins) { -dev_err (pctl->dev,"missing pins property in node %s .\n" , - node->name); +dev_err (pctl->dev,"missing pins property in node %pOFn .\n" , + node);return -EINVAL ; }drivers/pinctrl/meson/pinctrl-meson.c +1
-1@@ -451,7 +451,7 @@ static struct regmap *meson_map_resource(struct meson_pinctrl *pc, meson_regmap_config.max_register =resource_size (&res) -4 ; meson_regmap_config.name =devm_kasprintf (pc->dev,GFP_KERNEL , -"%s-%s" , node->name, +"%pOFn-%s" , node, name);if (!meson_regmap_config.name)return ERR_PTR (-ENOMEM );drivers/pinctrl/mvebu/pinctrl-mvebu.c +2
-2@@ -413,14 +413,14 @@ static int mvebu_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev, ret =of_property_read_string (np,"marvell,function" , &function);if (ret) {dev_err (pctl->dev, -"missing marvell,function in node %s\n" , np->name); +"missing marvell,function in node %pOFn\n" , np);return 0 ; } nmaps =of_property_count_strings (np,"marvell,pins" );if (nmaps <0 ) {dev_err (pctl->dev, -"missing marvell,pins in node %s\n" , np->name); +"missing marvell,pins in node %pOFn\n" , np);return 0 ; }drivers/pinctrl/nomadik/pinctrl-nomadik.c +3
-3@@ -1051,7 +1051,7 @@ static struct nmk_gpio_chip *nmk_gpio_populate_chip(struct device_node *np, gpio_pdev =of_find_device_by_node (np);if (!gpio_pdev) { -pr_err ("populate \"%s\": device not found\n" , np->name); +pr_err ("populate \"%pOFn\": device not found\n" , np);return ERR_PTR (-ENODEV ); }if (of_property_read_u32 (np,"gpio-bank" , &id)) {@@ -1904,8 +1904,8 @@ static int nmk_pinctrl_probe(struct platform_device *pdev) gpio_np =of_parse_phandle (np,"nomadik-gpio-chips" , i);if (gpio_np) {dev_info (&pdev->dev, -"populate NMK GPIO %d \"%s\"\n" , - i, gpio_np->name); +"populate NMK GPIO %d \"%pOFn\"\n" , + i, gpio_np); nmk_chip =nmk_gpio_populate_chip (gpio_np, pdev);if (IS_ERR (nmk_chip)) dev_err(&pdev->dev,drivers/pinctrl/pinctrl-at91.c +4
-4@@ -263,8 +263,8 @@ static int at91_dt_node_to_map(struct pinctrl_dev *pctldev,*/ grp =at91_pinctrl_find_group_by_name (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }@@ -1071,7 +1071,7 @@ static int at91_pinctrl_parse_groups(struct device_node *np,const __be32 *list;int i, j; -dev_dbg (info->dev,"group(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"group(%d): %pOFn\n" , index, np);/* Initialise group */ grp->name = np->name;@@ -1122,7 +1122,7 @@ static int at91_pinctrl_parse_functions(struct device_node *np,static u32 grp_index;u32 i =0 ; -dev_dbg (info->dev,"parse function(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"parse function(%d): %pOFn\n" , index, np); func = &info->functions[index];drivers/pinctrl/pinctrl-lantiq.c +4
-4@@ -80,14 +80,14 @@ static void ltq_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,int ret, i;if (!pins && !groups) { -dev_err (pctldev->dev,"%s defines neither pins nor groups\n" , - np->name); +dev_err (pctldev->dev,"%pOFn defines neither pins nor groups\n" , + np);return ; }if (pins && groups) { -dev_err (pctldev->dev,"%s defines both pins and groups\n" , - np->name); +dev_err (pctldev->dev,"%pOFn defines both pins and groups\n" , + np);return ; }drivers/pinctrl/pinctrl-rockchip.c +4
-4@@ -501,8 +501,8 @@ static int rockchip_dt_node_to_map(struct pinctrl_dev *pctldev,*/ grp =pinctrl_name_to_group (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }@@ -2454,7 +2454,7 @@ static int rockchip_pinctrl_parse_groups(struct device_node *np,int i, j;int ret; -dev_dbg (info->dev,"group(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"group(%d): %pOFn\n" , index, np);/* Initialise group */ grp->name = np->name;@@ -2519,7 +2519,7 @@ static int rockchip_pinctrl_parse_functions(struct device_node *np,static u32 grp_index;u32 i =0 ; -dev_dbg (info->dev,"parse function(%d): %s\n" , index, np->name); +dev_dbg (info->dev,"parse function(%d): %pOFn\n" , index, np); func = &info->functions[index];drivers/pinctrl/pinctrl-rza1.c +4
-4@@ -930,8 +930,8 @@ static int rza1_parse_pinmux_node(struct rza1_pinctrl *rza1_pctl, &npin_configs);if (ret) {dev_err (rza1_pctl->dev, -"Unable to parse pin configuration options for %s\n" , - np->name); +"Unable to parse pin configuration options for %pOFn\n" , + np);return ret; }@@ -1226,8 +1226,8 @@ static int rza1_parse_gpiochip(struct rza1_pinctrl *rza1_pctl, *chip = rza1_gpiochip_template; chip->base =-1 ; - chip->label =devm_kasprintf (rza1_pctl->dev,GFP_KERNEL ,"%s" , - np->name); + chip->label =devm_kasprintf (rza1_pctl->dev,GFP_KERNEL ,"%pOFn" , + np); chip->ngpio = of_args.args[2 ]; chip->of_node = np; chip->parent = rza1_pctl->dev;drivers/pinctrl/pinctrl-single.c +16
-16@@ -1022,14 +1022,14 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs, vals[found].reg = pcs->base + offset; vals[found].val = pinctrl_spec.args[1 ]; -dev_dbg (pcs->dev,"%s index: 0x%x value: 0x%x\n" , - pinctrl_spec.np->name, offset, pinctrl_spec.args[1 ]); +dev_dbg (pcs->dev,"%pOFn index: 0x%x value: 0x%x\n" , + pinctrl_spec.np, offset, pinctrl_spec.args[1 ]); pin =pcs_get_pin_by_offset (pcs, offset);if (pin <0 ) {dev_err (pcs->dev, -"could not add functions for %s %ux\n" , - np->name, offset); +"could not add functions for %pOFn %ux\n" , + np, offset);break ; } pins[found++] = pin;@@ -1135,8 +1135,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs, val = pinctrl_spec.args[1 ]; mask = pinctrl_spec.args[2 ]; -dev_dbg (pcs->dev,"%s index: 0x%x value: 0x%x mask: 0x%x\n" , - pinctrl_spec.np->name, offset, val, mask); +dev_dbg (pcs->dev,"%pOFn index: 0x%x value: 0x%x mask: 0x%x\n" , + pinctrl_spec.np, offset, val, mask);/* Parse pins in each row from LSB */ while (mask) {@@ -1148,8 +1148,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,if ((mask & mask_pos) ==0 ) {dev_err (pcs->dev, -"Invalid mask for %s at 0x%x\n" , - np->name, offset); +"Invalid mask for %pOFn at 0x%x\n" , + np, offset);break ; }@@ -1157,8 +1157,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,if (submask != mask_pos) {dev_warn (pcs->dev, -"Invalid submask 0x%x for %s at 0x%x\n" , - submask, np->name, offset); +"Invalid submask 0x%x for %pOFn at 0x%x\n" , + submask, np, offset);continue ; }@@ -1169,8 +1169,8 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs, pin =pcs_get_pin_by_offset (pcs, offset);if (pin <0 ) {dev_err (pcs->dev, -"could not add functions for %s %ux\n" , - np->name, offset); +"could not add functions for %pOFn %ux\n" , + np, offset);break ; } pins[found++] = pin + pin_num_from_lsb;@@ -1254,16 +1254,16 @@ static int pcs_dt_node_to_map(struct pinctrl_dev *pctldev, ret =pcs_parse_bits_in_pinctrl_entry (pcs, np_config, map, num_maps, pgnames);if (ret <0 ) { -dev_err (pcs->dev,"no pins entries for %s\n" , - np_config->name); +dev_err (pcs->dev,"no pins entries for %pOFn\n" , + np_config); goto free_pgnames; } }else { ret =pcs_parse_one_pinctrl_entry (pcs, np_config, map, num_maps, pgnames);if (ret <0 ) { -dev_err (pcs->dev,"no pins entries for %s\n" , - np_config->name); +dev_err (pcs->dev,"no pins entries for %pOFn\n" , + np_config); goto free_pgnames; } }drivers/pinctrl/pinctrl-st.c +3
-3@@ -817,8 +817,8 @@ static int st_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, grp =st_pctl_find_group_by_name (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }@@ -1184,7 +1184,7 @@ static int st_pctl_dt_parse_groups(struct device_node *np,if (pp->length /sizeof (__be32) >=OF_GPIO_ARGS_MIN ) { npins++; }else { -pr_warn ("Invalid st,pins in %s node\n" , np->name); +pr_warn ("Invalid st,pins in %pOFn node\n" , np);return -EINVAL ; } }drivers/pinctrl/sirf/pinctrl-atlas7.c +2
-2@@ -6058,8 +6058,8 @@ static int atlas7_gpio_probe(struct platform_device *pdev) ret =gpiochip_add_data (chip, a7gc);if (ret) {dev_err (&pdev->dev, -"%s: error in probe function with status %d\n" , - np->name, ret); +"%pOF: error in probe function with status %d\n" , + np, ret); goto failed; }drivers/pinctrl/stm32/pinctrl-stm32.c +2
-2@@ -416,8 +416,8 @@ static int stm32_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev, pins =of_find_property (node,"pinmux" ,NULL );if (!pins) { -dev_err (pctl->dev,"missing pins property in node %s .\n" , - node->name); +dev_err (pctl->dev,"missing pins property in node %pOFn .\n" , + node);return -EINVAL ; }drivers/pinctrl/sunxi/pinctrl-sunxi.c +4
-4@@ -332,15 +332,15 @@ static int sunxi_pctrl_dt_node_to_map(struct pinctrl_dev *pctldev, function =sunxi_pctrl_parse_function_prop (node);if (!function) { -dev_err (pctl->dev,"missing function property in node %s\n" , - node->name); +dev_err (pctl->dev,"missing function property in node %pOFn\n" , + node);return -EINVAL ; } pin_prop =sunxi_pctrl_find_pins_prop (node, &npins);if (!pin_prop) { -dev_err (pctl->dev,"missing pins property in node %s\n" , - node->name); +dev_err (pctl->dev,"missing pins property in node %pOFn\n" , + node);return -EINVAL ; }drivers/pinctrl/ti/pinctrl-ti-iodelay.c +4
-4@@ -452,8 +452,8 @@ static int ti_iodelay_node_iterator(struct pinctrl_dev *pctldev, pin =ti_iodelay_offset_to_pin (iod, cfg[pin_index].offset);if (pin <0 ) { -dev_err (iod->dev,"could not add functions for %s %ux\n" , - np->name, cfg[pin_index].offset); +dev_err (iod->dev,"could not add functions for %pOFn %ux\n" , + np, cfg[pin_index].offset);return -ENODEV ; } pins[pin_index] = pin;@@ -461,8 +461,8 @@ static int ti_iodelay_node_iterator(struct pinctrl_dev *pctldev, pd = &iod->pa[pin]; pd->drv_data = &cfg[pin_index]; -dev_dbg (iod->dev,"%s offset=%x a_delay = %d g_delay = %d\n" , - np->name, cfg[pin_index].offset, cfg[pin_index].a_delay, +dev_dbg (iod->dev,"%pOFn offset=%x a_delay = %d g_delay = %d\n" , + np, cfg[pin_index].offset, cfg[pin_index].a_delay, cfg[pin_index].g_delay);return 0 ;Signature · 1 line
2.17.1
Signature · 3 lines
Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 2 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
...
Quoted 2 lines
drivers/pinctrl/pinctrl-single.c | 32 +++++++++---------- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 8 ++---
Re: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 36 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Linus Walleij <[email protected]>Cc Dong Aisheng <[email protected]>Cc Fabio Estevam <[email protected]>Cc Shawn Guo <[email protected]>Cc Stefan Agner <[email protected]>Cc Pengutronix Kernel Team <[email protected]>Cc Sean Wang <[email protected]>Cc Matthias Brugger <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Cc Gregory Clement <[email protected]>Cc Sebastian Hesselbarth <[email protected]>Cc Jean-Christophe Plagniol-Villard <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Tony Lindgren <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Patrice Chotard <[email protected]>Cc Barry Song <[email protected]>Cc Maxime Coquelin <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc linux-gpio at vger.kernel.orgCc linux-mediatek at lists.infradead.orgCc linux-arm-kernel at lists.infradead.orgCc linux-amlogic at lists.infradead.orgCc linux-rockchip at lists.infradead.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 5 lines
--- drivers/pinctrl/berlin/berlin.c | 6 ++-- drivers/pinctrl/freescale/pinctrl-imx.c | 7 ++-- drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++---- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 +--
For mediatek,
Re: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 46 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Linus Walleij <[email protected]>Cc Dong Aisheng <[email protected]>Cc Fabio Estevam <[email protected]>Cc Shawn Guo <[email protected]>Cc Stefan Agner <[email protected]>Cc Pengutronix Kernel Team <[email protected]>Cc Sean Wang <[email protected]>Cc Matthias Brugger <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Cc Gregory Clement <[email protected]>Cc Sebastian Hesselbarth <[email protected]>Cc Jean-Christophe Plagniol-Villard <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Tony Lindgren <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Patrice Chotard <[email protected]>Cc Barry Song <[email protected]>Cc Maxime Coquelin <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc linux-gpio at vger.kernel.orgCc linux-mediatek at lists.infradead.orgCc linux-arm-kernel at lists.infradead.orgCc linux-amlogic at lists.infradead.orgCc linux-rockchip at lists.infradead.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>--- drivers/pinctrl/berlin/berlin.c | 6 ++-- drivers/pinctrl/freescale/pinctrl-imx.c | 7 ++-- drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++---- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 +-- drivers/pinctrl/meson/pinctrl-meson.c | 2 +- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 4 +-- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 6 ++-- drivers/pinctrl/pinctrl-at91.c | 8 ++---
Quoted 8 lines
drivers/pinctrl/pinctrl-lantiq.c | 8 ++--- drivers/pinctrl/pinctrl-rockchip.c | 8 ++--- drivers/pinctrl/pinctrl-rza1.c | 8 ++--- drivers/pinctrl/pinctrl-single.c | 32 +++++++++---------- drivers/pinctrl/pinctrl-st.c | 6 ++-- drivers/pinctrl/sirf/pinctrl-atlas7.c | 4 +-- drivers/pinctrl/stm32/pinctrl-stm32.c | 4 +-- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 8 ++---
For sunxi:
Re: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringAm Dienstag, 28. August 2018, 03:52:41 CEST schrieb Rob Herring:
Quoted 4 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.drivers/pinctrl/pinctrl-rockchip.c | 8 ++---
For the Rockchip-part
Re: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 4 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Linus Walleij <[email protected]>
Patch applied along with the thundering hoard of ACKs.
Yours,
Linus Walleij
Re: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringHi Rob
Quoted 72 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Linus Walleij <[email protected]>Cc Dong Aisheng <[email protected]>Cc Fabio Estevam <[email protected]>Cc Shawn Guo <[email protected]>Cc Stefan Agner <[email protected]>Cc Pengutronix Kernel Team <[email protected]>Cc Sean Wang <[email protected]>Cc Matthias Brugger <[email protected]>Cc Carlo Caione <[email protected]>Cc Kevin Hilman <[email protected]>Cc Jason Cooper <[email protected]>Cc Andrew Lunn <[email protected]>Cc Gregory Clement <[email protected]>Cc Sebastian Hesselbarth <[email protected]>Cc Jean-Christophe Plagniol-Villard <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Tony Lindgren <[email protected]>Cc Haojian Zhuang <[email protected]>Cc Patrice Chotard <[email protected]>Cc Barry Song <[email protected]>Cc Maxime Coquelin <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Cc linux-gpio at vger.kernel.orgCc linux-mediatek at lists.infradead.orgCc linux-arm-kernel at lists.infradead.orgCc linux-amlogic at lists.infradead.orgCc linux-rockchip at lists.infradead.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>--- drivers/pinctrl/berlin/berlin.c | 6 ++-- drivers/pinctrl/freescale/pinctrl-imx.c | 7 ++-- drivers/pinctrl/freescale/pinctrl-imx1-core.c | 12 +++---- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 +-- drivers/pinctrl/meson/pinctrl-meson.c | 2 +- drivers/pinctrl/mvebu/pinctrl-mvebu.c | 4 +-- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 6 ++-- drivers/pinctrl/pinctrl-at91.c | 8 ++--- drivers/pinctrl/pinctrl-lantiq.c | 8 ++--- drivers/pinctrl/pinctrl-rockchip.c | 8 ++--- drivers/pinctrl/pinctrl-rza1.c | 8 ++--- drivers/pinctrl/pinctrl-single.c | 32 +++++++++---------- drivers/pinctrl/pinctrl-st.c | 6 ++-- drivers/pinctrl/sirf/pinctrl-atlas7.c | 4 +-- drivers/pinctrl/stm32/pinctrl-stm32.c | 4 +-- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 8 ++--- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 8 ++--- 17 files changed, 66 insertions(+), 69 deletions(-)drivers/pinctrl/pinctrl-st.c +2
-2@@ -817,8 +817,8 @@ static int st_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, grp =st_pctl_find_group_by_name (info, np->name);if (!grp) { -dev_err (info->dev,"unable to find group for node %s\n" , - np->name); +dev_err (info->dev,"unable to find group for node %pOFn\n" , + np);return -EINVAL ; }
drivers/pinctrl/pinctrl-st.c static int st_pctl_dt_parse_groups(struct device_node *np, · line 1190
Quoted 8 lines
drivers/pinctrl/pinctrl-st.c +1
-1@@ -1184,7 +1184,7 @@ static int st_pctl_dt_parse_groups(struct device_node *np,if (pp->length /sizeof (__be32) >=OF_GPIO_ARGS_MIN ) { npins++; }else { -pr_warn ("Invalid st,pins in %s node\n" , np->name); +pr_warn ("Invalid st,pins in %pOFn node\n" , np);return -EINVAL ; } }
For pinctrl-st:
Thanks
Patrice
PATCH 1/1 regulator: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/regulator/max8997-regulator.c | 4 +- drivers/regulator/mc13xxx-regulator-core.c | 2 +- drivers/regulator/of_regulator.c | 44 +++++++++++----------- drivers/regulator/qcom-rpmh-regulator.c | 14 +++---- drivers/regulator/s5m8767.c | 12 +++--- 5 files changed, 38 insertions(+), 38 deletions(-)
drivers/regulator/max8997-regulator.c +2 -2
@@ -929,8 +929,8 @@ static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev,break ;if (i ==ARRAY_SIZE (regulators)) { -dev_warn (&pdev->dev,"don't know how to configure regulator %s\n" , - reg_np->name); +dev_warn (&pdev->dev,"don't know how to configure regulator %pOFn\n" , + reg_np);continue ; }
drivers/regulator/mc13xxx-regulator-core.c +1 -1
@@ -203,7 +203,7 @@ struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt(if (!found)dev_warn (&pdev->dev, -"Unknown regulator: %s\n" , child->name); +"Unknown regulator: %pOFn\n" , child); }of_node_put (parent);
drivers/regulator/of_regulator.c +22 -22
108 lines not on this page · raw message
drivers/regulator/qcom-rpmh-regulator.c +7 -7
@@ -414,7 +414,7 @@ static int rpmh_regulator_init_vreg(struct rpmh_vreg *vreg, struct device *dev,break ;if (!rpmh_data->name) { -dev_err (dev,"Unknown regulator %s\n" , node->name); +dev_err (dev,"Unknown regulator %pOFn\n" , node);return -EINVAL ; }
@@ -423,8 +423,8 @@ static int rpmh_regulator_init_vreg(struct rpmh_vreg *vreg, struct device *dev, vreg->addr =cmd_db_read_addr (rpmh_resource_name);if (!vreg->addr) { -dev_err (dev,"%s: could not find RPMh address for resource %s\n" , - node->name, rpmh_resource_name); +dev_err (dev,"%pOFn: could not find RPMh address for resource %s\n" , + node, rpmh_resource_name);return -ENODEV ; }
@@ -469,13 +469,13 @@ static int rpmh_regulator_init_vreg(struct rpmh_vreg *vreg, struct device *dev, rdev =devm_regulator_register (dev, &vreg->rdesc, ®_config);if (IS_ERR (rdev)) { ret =PTR_ERR (rdev); -dev_err (dev,"%s: devm_regulator_register() failed, ret=%d\n" , - node->name, ret); +dev_err (dev,"%pOFn: devm_regulator_register() failed, ret=%d\n" , + node, ret);return ret; } -dev_dbg (dev,"%s regulator registered for RPMh resource %s @ 0x%05X\n" , - node->name, rpmh_resource_name, vreg->addr); +dev_dbg (dev,"%pOFn regulator registered for RPMh resource %s @ 0x%05X\n" , + node, rpmh_resource_name, vreg->addr);return 0 ; }
drivers/regulator/s5m8767.c +6 -6
@@ -447,15 +447,15 @@ static void s5m8767_regulator_config_ext_control(struct s5m8767_info *s5m8767, }if (mode !=S5M8767_ENCTRL_USE_GPIO ) {dev_warn (s5m8767->dev, -"ext-control for %s: mismatched op_mode (%x), ignoring\n" , - rdata->reg_node->name, mode); +"ext-control for %pOFn: mismatched op_mode (%x), ignoring\n" , + rdata->reg_node, mode);return ; }if (!rdata->ext_control_gpiod) {dev_warn (s5m8767->dev, -"ext-control for %s: GPIO not valid, ignoring\n" , - rdata->reg_node->name); +"ext-control for %pOFn: GPIO not valid, ignoring\n" , + rdata->reg_node);return ; }
@@ -566,8 +566,8 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,if (i ==ARRAY_SIZE (regulators)) {dev_warn (iodev->dev, -"don't know how to configure regulator %s\n" , - reg_np->name); +"don't know how to configure regulator %pOFn\n" , + reg_np);continue ; }
Signature · 1 line
2.17.1
Re: [PATCH] regulator: Convert to using %pOFn instead of device_node.name
Quoted 11 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Liam Girdwood <[email protected]>Cc Mark Brown <[email protected]>Cc Sangbeom Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 6 lines
--- drivers/regulator/max8997-regulator.c | 4 +- drivers/regulator/mc13xxx-regulator-core.c | 2 +- drivers/regulator/of_regulator.c | 44 +++++++++++----------- drivers/regulator/qcom-rpmh-regulator.c | 14 +++---- drivers/regulator/s5m8767.c | 12 +++---
For S5M8767:
Best regards,
Krzysztof
PATCH 1/1 rpmsg: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/rpmsg/qcom_glink_smem.c | 2 +- drivers/rpmsg/qcom_smd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/rpmsg/qcom_glink_smem.c +1 -1
@@ -205,7 +205,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device *parent, dev->parent = parent; dev->of_node = node; dev->release = qcom_glink_smem_release; -dev_set_name (dev,"%s:%s" , node->parent->name, node->name); +dev_set_name (dev,"%pOFn:%pOFn" , node->parent, node); ret =device_register (dev);if (ret) {pr_err ("failed to register glink edge\n" );
drivers/rpmsg/qcom_smd.c +1 -1
@@ -1454,7 +1454,7 @@ struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent, edge->dev.release = qcom_smd_edge_release; edge->dev.of_node = node; edge->dev.groups = qcom_smd_edge_groups; -dev_set_name (&edge->dev,"%s:%s" ,dev_name (parent), node->name); +dev_set_name (&edge->dev,"%s:%pOFn" ,dev_name (parent), node); ret =device_register (&edge->dev);if (ret) {pr_err ("failed to register smd edge\n" );
Signature · 1 line
2.17.1
Bjorn Andersson
AppliedRe: [PATCH] rpmsg: Convert to using %pOFn instead of device_node.name
Quoted 7 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Ohad Ben-Cohen <[email protected]>Cc Bjorn Andersson <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied
Thanks,
Bjorn
Quoted 34 lines
--- drivers/rpmsg/qcom_glink_smem.c | 2 +- drivers/rpmsg/qcom_smd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/rpmsg/qcom_glink_smem.c +1
-1@@ -205,7 +205,7 @@ struct qcom_glink *qcom_glink_smem_register(struct device *parent, dev->parent = parent; dev->of_node = node; dev->release = qcom_glink_smem_release; -dev_set_name (dev,"%s:%s" , node->parent->name, node->name); +dev_set_name (dev,"%pOFn:%pOFn" , node->parent, node); ret =device_register (dev);if (ret) {pr_err ("failed to register glink edge\n" );drivers/rpmsg/qcom_smd.c +1
-1@@ -1454,7 +1454,7 @@ struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent, edge->dev.release = qcom_smd_edge_release; edge->dev.of_node = node; edge->dev.groups = qcom_smd_edge_groups; -dev_set_name (&edge->dev,"%s:%s" ,dev_name (parent), node->name); +dev_set_name (&edge->dev,"%s:%pOFn" ,dev_name (parent), node); ret =device_register (&edge->dev);if (ret) {pr_err ("failed to register smd edge\n" );Signature · 1 line
2.17.1
PATCH 1/1 soc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/soc/dove/pmu.c | 8 +++--- drivers/soc/fsl/qe/qe_tdm.c | 4 +-- drivers/soc/qcom/apr.c | 2 +- drivers/soc/rockchip/pm_domains.c | 44 +++++++++++++++---------------- drivers/soc/tegra/pmc.c | 12 ++++----- drivers/soc/ti/knav_dma.c | 8 +++--- drivers/soc/ti/knav_qmss_queue.c | 8 +++--- 7 files changed, 43 insertions(+), 43 deletions(-)
drivers/soc/dove/pmu.c +4 -4
@@ -383,7 +383,7 @@ int __init dove_init_pmu(void) domains_node =of_get_child_by_name (np_pmu,"domains" );if (!domains_node) { -pr_err ("%s: failed to find domains sub-node\n" , np_pmu->name); +pr_err ("%pOFn: failed to find domains sub-node\n" , np_pmu);return 0 ; }
@@ -396,7 +396,7 @@ int __init dove_init_pmu(void) pmu->pmc_base =of_iomap (pmu->of_node,0 ); pmu->pmu_base =of_iomap (pmu->of_node,1 );if (!pmu->pmc_base || !pmu->pmu_base) { -pr_err ("%s: failed to map PMU\n" , np_pmu->name); +pr_err ("%pOFn: failed to map PMU\n" , np_pmu);iounmap (pmu->pmu_base);iounmap (pmu->pmc_base);kfree (pmu);
@@ -414,7 +414,7 @@ int __init dove_init_pmu(void)break ; domain->pmu = pmu; - domain->base.name =kstrdup (np->name,GFP_KERNEL ); + domain->base.name =kasprintf (GFP_KERNEL ,"%pOFn" , np);if (!domain->base.name) {kfree (domain);break ;
@@ -444,7 +444,7 @@ int __init dove_init_pmu(void)/* Loss of the interrupt controller is not a fatal error. */ parent_irq =irq_of_parse_and_map (pmu->of_node,0 );if (!parent_irq) { -pr_err ("%s: no interrupt specified\n" , np_pmu->name); +pr_err ("%pOFn: no interrupt specified\n" , np_pmu); }else { ret =dove_init_pmu_irq (pmu, parent_irq);if (ret)
drivers/soc/fsl/qe/qe_tdm.c +2 -2
@@ -131,7 +131,7 @@ int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm, pdev =of_find_device_by_node (np2);if (!pdev) { -pr_err ("%s: failed to lookup pdev\n" , np2->name); +pr_err ("%pOFn: failed to lookup pdev\n" , np2);of_node_put (np2);return -EINVAL ; }
@@ -153,7 +153,7 @@ int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm, pdev =of_find_device_by_node (np2);if (!pdev) { ret = -EINVAL ; -pr_err ("%s: failed to lookup pdev\n" , np2->name); +pr_err ("%pOFn: failed to lookup pdev\n" , np2);of_node_put (np2); goto err_miss_siram_property; }
drivers/soc/qcom/apr.c +1 -1
@@ -219,7 +219,7 @@ static int apr_add_device(struct device *dev, struct device_node *np, adev->domain_id = id->domain_id; adev->version = id->svc_version;if (np) -strncpy (adev->name, np->name,APR_NAME_SIZE ); +snprintf (adev->name,APR_NAME_SIZE ,"%pOFn" , np);else strncpy (adev->name, id->name,APR_NAME_SIZE );
drivers/soc/rockchip/pm_domains.c +22 -22
107 lines not on this page · raw message
drivers/soc/tegra/pmc.c +6 -6
@@ -796,7 +796,7 @@ static void tegra_powergate_add(struct tegra_pmc *pmc, struct device_node *np) id =tegra_powergate_lookup (pmc, np->name);if (id <0 ) { -pr_err ("powergate lookup failed for %s: %d\n" , np->name, id); +pr_err ("powergate lookup failed for %pOFn: %d\n" , np, id); goto free_mem; }
@@ -816,13 +816,13 @@ static void tegra_powergate_add(struct tegra_pmc *pmc, struct device_node *np) err =tegra_powergate_of_get_clks (pg, np);if (err <0 ) { -pr_err ("failed to get clocks for %s: %d\n" , np->name, err); +pr_err ("failed to get clocks for %pOFn: %d\n" , np, err); goto set_available; } err =tegra_powergate_of_get_resets (pg, np, off);if (err <0 ) { -pr_err ("failed to get resets for %s: %d\n" , np->name, err); +pr_err ("failed to get resets for %pOFn: %d\n" , np, err); goto remove_clks; }
@@ -851,15 +851,15 @@ static void tegra_powergate_add(struct tegra_pmc *pmc, struct device_node *np) err =pm_genpd_init (&pg->genpd,NULL , off);if (err <0 ) { -pr_err ("failed to initialise PM domain %s: %d\n" , np->name, +pr_err ("failed to initialise PM domain %pOFn: %d\n" , np, err); goto remove_resets; } err =of_genpd_add_provider_simple (np, &pg->genpd);if (err <0 ) { -pr_err ("failed to add PM domain provider for %s: %d\n" , - np->name, err); +pr_err ("failed to add PM domain provider for %pOFn: %d\n" , + np, err); goto remove_genpd; }
drivers/soc/ti/knav_dma.c +4 -4
@@ -544,15 +544,15 @@ static void __iomem *pktdma_get_regs(struct knav_dma_device *dma, ret =of_address_to_resource (node, index, &res);if (ret) { -dev_err (dev,"Can't translate of node(%s) address for index(%d)\n" , - node->name, index); +dev_err (dev,"Can't translate of node(%pOFn) address for index(%d)\n" , + node, index);return ERR_PTR (ret); } regs =devm_ioremap_resource (kdev->dev, &res);if (IS_ERR (regs)) -dev_err (dev,"Failed to map register base for index(%d) node(%s)\n" , - index, node->name); +dev_err (dev,"Failed to map register base for index(%d) node(%pOFn)\n" , + index, node);if (_size) *_size =resource_size (&res);
drivers/soc/ti/knav_qmss_queue.c +4 -4
@@ -1382,15 +1382,15 @@ static void __iomem *knav_queue_map_reg(struct knav_device *kdev, ret =of_address_to_resource (node, index, &res);if (ret) { -dev_err (kdev->dev,"Can't translate of node(%s) address for index(%d)\n" , - node->name, index); +dev_err (kdev->dev,"Can't translate of node(%pOFn) address for index(%d)\n" , + node, index);return ERR_PTR (ret); } regs =devm_ioremap_resource (kdev->dev, &res);if (IS_ERR (regs)) -dev_err (kdev->dev,"Failed to map register base for index(%d) node(%s)\n" , - index, node->name); +dev_err (kdev->dev,"Failed to map register base for index(%d) node(%pOFn)\n" , + index, node);return regs; }
Signature · 1 line
2.17.1
Re: [PATCH] soc: Convert to using %pOFn instead of device_node.name
Quoted 15 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Qiang Zhao <[email protected]>Cc Li Yang <[email protected]>Cc Andy Gross <[email protected]>Cc David Brown <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc Santosh Shilimkar <[email protected]>Cc linuxppc-dev at lists.ozlabs.orgCc linux-arm-kernel at lists.infradead.orgCc linux-soc at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 9 lines
--- drivers/soc/dove/pmu.c | 8 +++--- drivers/soc/fsl/qe/qe_tdm.c | 4 +-- drivers/soc/qcom/apr.c | 2 +- drivers/soc/rockchip/pm_domains.c | 44 +++++++++++++++---------------- drivers/soc/tegra/pmc.c | 12 ++++----- drivers/soc/ti/knav_dma.c | 8 +++--- drivers/soc/ti/knav_qmss_queue.c | 8 +++--- 7 files changed, 43 insertions(+), 43 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180828/f505a4a7/attachment.sig>
Re: [PATCH] soc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 3 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Please forgive my ignorance, but what is this format specifier do
exactly? I cannot find anything listed in the printf specification
matching this. Is this something newly introduced?
Leo
Re: [PATCH] soc: Convert to using %pOFn instead of device_node.name
Quoted 5 lines · Li Yang
Quoted 3 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Quoted 8 lines
Please forgive my ignorance, but what is this format specifier do
exactly? I cannot find anything listed in the printf specification
matching this. Is this something newly introduced?Leo
From
Documentation/core-api/printk-formats.rst:
kobjects
--------
::
%pOF[fnpPcCF]
For printing kobject based structs (device nodes). Default behaviour is equivalent to %pOFf.
- f - device node full_name
- n - device node name
- p - device node phandle
- P - device node path spec (name + @unit)
- F - device node flags
- c - major compatible string
- C - full compatible string
-Tyrel
Re: [PATCH] soc: Convert to using %pOFn instead of device_node.name
Quoted 7 lines · Tyrel Datwyler
Quoted 5 lines · Li Yang
Quoted 3 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Quoted 8 lines
Quoted 6 lines
Please forgive my ignorance, but what is this format specifier do
exactly? I cannot find anything listed in the printf specification
matching this. Is this something newly introduced?Leo
From
Documentation/core-api/printk-formats.rst:
I was trying to find it in the standard c format specifier. :( Thanks a lot for the pointer.
Quoted 23 lines
kobjects
--------::
%pOF[fnpPcCF]
For printing kobject based structs (device nodes). Default behaviour is equivalent to %pOFf.
- f - device node
full_name
- n - device node name
- p - device node phandle
- P - device node path spec (name + @unit)
- F - device node flags
- c - major compatible string
- C - full compatible string-Tyrel
Re: [PATCH] soc: Convert to using %pOFn instead of device_node.name
Quoted 13 lines · Li Yang
Quoted 11 lines · Tyrel Datwyler
Quoted 9 lines · Li Yang
Quoted 3 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Please forgive my ignorance, but what is this format specifier do
exactly? I cannot find anything listed in the printf specification
matching this. Is this something newly introduced?
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Leo
From
Documentation/core-api/printk-formats.rst:I was trying to find it in the standard c format specifier. :( Thanks a lot for the pointer.
No problem. Its worth a look through. The usual integer types are at the top, but that is followed by the pointer types which the kernel provides quite a few for a variety of things.
Quoted 24 lines
Quoted 23 lines
kobjects
--------::
%pOF[fnpPcCF]
For printing kobject based structs (device nodes). Default behaviour is equivalent to %pOFf.
- f - device node
full_name
- n - device node name
- p - device node phandle
- P - device node path spec (name + @unit)
- F - device node flags
- c - major compatible string
- C - full compatible string-Tyrel
Re: [PATCH] soc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringAm Dienstag, 28. August 2018, 03:52:44 CEST schrieb Rob Herring:
Quoted 4 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.drivers/soc/rockchip/pm_domains.c | 44 +++++++++++++++----------------
For the Rockchip-part
RE: [PATCH] soc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Date: 2018?8?28? 9:53
Quoted 24 lines
To: linux-kernel at vger.kernel.org
Cc: Qiang Zhao <[email protected]>; Leo Li <[email protected]>; Andy Gross <[email protected]>; David Brown <[email protected]>; Heiko Stuebner <[email protected]>; Thierry Reding <[email protected]>; Jonathan Hunter <[email protected]>; Santosh Shilimkar <[email protected]>; linuxppc-dev at lists.ozlabs.org; linux-arm-kernel at lists.infradead.org; linux-soc at vger.kernel.org
Subject: [PATCH] soc: Convert to using %pOFn instead of device_node.nameIn preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Qiang Zhao <[email protected]>Cc Li Yang <[email protected]>Cc Andy Gross <[email protected]>Cc David Brown <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc Santosh Shilimkar <[email protected]>Cc linuxppc-dev at lists.ozlabs.orgCc linux-arm-kernel at lists.infradead.orgCc linux-soc at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 9 lines
--- drivers/soc/dove/pmu.c | 8 +++--- drivers/soc/fsl/qe/qe_tdm.c | 4 +-- drivers/soc/qcom/apr.c | 2 +- drivers/soc/rockchip/pm_domains.c | 44 +++++++++++++++---------------- drivers/soc/tegra/pmc.c | 12 ++++----- drivers/soc/ti/knav_dma.c | 8 +++--- drivers/soc/ti/knav_qmss_queue.c | 8 +++--- 7 files changed, 43 insertions(+), 43 deletions(-)
For qe_tdm part
Re: [PATCH] soc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 15 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Qiang Zhao <[email protected]>Cc Li Yang <[email protected]>Cc Andy Gross <[email protected]>Cc David Brown <[email protected]>Cc Heiko Stuebner <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Cc Santosh Shilimkar <[email protected]>Cc linuxppc-dev at lists.ozlabs.orgCc linux-arm-kernel at lists.infradead.orgCc linux-soc at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 1 line
---
PATCH 1/1 thermal: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/thermal/of-thermal.c | 10 +++++----- drivers/thermal/qoriq_thermal.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/thermal/of-thermal.c +5 -5
@@ -483,8 +483,8 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data,if (sensor_specs.args_count >=1 ) { id = sensor_specs.args[0 ];WARN (sensor_specs.args_count >1 , -"%s: too many cells in sensor specifier %d\n" , - sensor_specs.np->name, sensor_specs.args_count); +"%pOFn: too many cells in sensor specifier %d\n" , + sensor_specs.np, sensor_specs.args_count); }else { id =0 ; }
@@ -960,8 +960,8 @@ int __init of_parse_thermal_zones(void) tz =thermal_of_build_thermal_zone (child);if (IS_ERR (tz)) { -pr_err ("failed to build thermal zone %s: %ld\n" , - child->name, +pr_err ("failed to build thermal zone %pOFn: %ld\n" , + child,PTR_ERR (tz));continue ; }
@@ -995,7 +995,7 @@ int __init of_parse_thermal_zones(void) tz->passive_delay, tz->polling_delay);if (IS_ERR (zone)) { -pr_err ("Failed to build %s zone %ld\n" , child->name, +pr_err ("Failed to build %pOFn zone %ld\n" , child,PTR_ERR (zone));kfree (tzp);kfree (ops);
drivers/thermal/qoriq_thermal.c +2 -2
@@ -129,8 +129,8 @@ static int qoriq_tmu_get_sensor_id(void)if (sensor_specs.args_count >=1 ) { id = sensor_specs.args[0 ];WARN (sensor_specs.args_count >1 , -"%s: too many cells in sensor specifier %d\n" , - sensor_specs.np->name, sensor_specs.args_count); +"%pOFn: too many cells in sensor specifier %d\n" , + sensor_specs.np, sensor_specs.args_count); }else { id =0 ; }
Signature · 1 line
2.17.1
Re: [PATCH] thermal: Convert to using %pOFn instead of device_node.name
Quoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Zhang Rui <[email protected]>Cc Eduardo Valentin <[email protected]>Cc Daniel Lezcano <[email protected]>Signed-off-by Rob Herring <[email protected]>---
Quoted 55 lines
drivers/thermal/of-thermal.c | 10 +++++----- drivers/thermal/qoriq_thermal.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-)drivers/thermal/of-thermal.c +5
-5@@ -483,8 +483,8 @@ thermal_zone_of_sensor_register(struct device *dev, int sensor_id, void *data,if (sensor_specs.args_count >=1 ) { id = sensor_specs.args[0 ];WARN (sensor_specs.args_count >1 , -"%s: too many cells in sensor specifier %d\n" , - sensor_specs.np->name, sensor_specs.args_count); +"%pOFn: too many cells in sensor specifier %d\n" , + sensor_specs.np, sensor_specs.args_count); }else { id =0 ; }@@ -960,8 +960,8 @@ int __init of_parse_thermal_zones(void) tz =thermal_of_build_thermal_zone (child);if (IS_ERR (tz)) { -pr_err ("failed to build thermal zone %s: %ld\n" , - child->name, +pr_err ("failed to build thermal zone %pOFn: %ld\n" , + child,PTR_ERR (tz));continue ; }@@ -995,7 +995,7 @@ int __init of_parse_thermal_zones(void) tz->passive_delay, tz->polling_delay);if (IS_ERR (zone)) { -pr_err ("Failed to build %s zone %ld\n" , child->name, +pr_err ("Failed to build %pOFn zone %ld\n" , child,PTR_ERR (zone));kfree (tzp);kfree (ops);drivers/thermal/qoriq_thermal.c +2
-2@@ -129,8 +129,8 @@ static int qoriq_tmu_get_sensor_id(void)if (sensor_specs.args_count >=1 ) { id = sensor_specs.args[0 ];WARN (sensor_specs.args_count >1 , -"%s: too many cells in sensor specifier %d\n" , - sensor_specs.np->name, sensor_specs.args_count); +"%pOFn: too many cells in sensor specifier %d\n" , + sensor_specs.np, sensor_specs.args_count); }else { id =0 ; }
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 1/1 tty: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/tty/ehv_bytechan.c | 12 ++++++------ drivers/tty/serial/cpm_uart/cpm_uart_core.c | 8 ++++---- drivers/tty/serial/pmac_zilog.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-)
drivers/tty/ehv_bytechan.c +6 -6
@@ -128,8 +128,8 @@ static int find_console_handle(void)*/ iprop =of_get_property (np,"hv-handle" ,NULL );if (!iprop) { -pr_err ("ehv-bc: no 'hv-handle' property in %s node\n" , - np->name); +pr_err ("ehv-bc: no 'hv-handle' property in %pOFn node\n" , + np);return 0 ; } stdout_bc =be32_to_cpu (*iprop);
@@ -661,8 +661,8 @@ static int ehv_bc_tty_probe(struct platform_device *pdev) iprop =of_get_property (np,"hv-handle" ,NULL );if (!iprop) { -dev_err (&pdev->dev,"no 'hv-handle' property in %s node\n" , - np->name); +dev_err (&pdev->dev,"no 'hv-handle' property in %pOFn node\n" , + np);return -ENODEV ; }
@@ -682,8 +682,8 @@ static int ehv_bc_tty_probe(struct platform_device *pdev) bc->rx_irq =irq_of_parse_and_map (np,0 ); bc->tx_irq =irq_of_parse_and_map (np,1 );if ((bc->rx_irq ==NO_IRQ ) || (bc->tx_irq ==NO_IRQ )) { -dev_err (&pdev->dev,"no 'interrupts' property in %s node\n" , - np->name); +dev_err (&pdev->dev,"no 'interrupts' property in %pOFn node\n" , + np); ret = -ENODEV ; goto error; }
drivers/tty/serial/cpm_uart/cpm_uart_core.c +4 -4
@@ -1151,8 +1151,8 @@ static int cpm_uart_init_port(struct device_node *np,if (!pinfo->clk) { data =of_get_property (np,"fsl,cpm-brg" , &len);if (!data || len !=4 ) { -printk (KERN_ERR "CPM UART %s has no/invalid " -"fsl,cpm-brg property.\n" , np->name); +printk (KERN_ERR "CPM UART %pOFn has no/invalid " +"fsl,cpm-brg property.\n" , np);return -EINVAL ; } pinfo->brg = *data;
@@ -1160,8 +1160,8 @@ static int cpm_uart_init_port(struct device_node *np, data =of_get_property (np,"fsl,cpm-command" , &len);if (!data || len !=4 ) { -printk (KERN_ERR "CPM UART %s has no/invalid " -"fsl,cpm-command property.\n" , np->name); +printk (KERN_ERR "CPM UART %pOFn has no/invalid " +"fsl,cpm-command property.\n" , np);return -EINVAL ; } pinfo->command = *data;
drivers/tty/serial/pmac_zilog.c +2 -2
@@ -1566,9 +1566,9 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)* to work around bugs in ancient Apple device-trees */ if (macio_request_resources (uap->dev,"pmac_zilog" )) -printk (KERN_WARNING "%s: Failed to request resource" +printk (KERN_WARNING "%pOFn: Failed to request resource" ", port still active\n" , - uap->node->name); + uap->node);else uap->flags |=PMACZILOG_FLAG_RSRC_REQUESTED ;
Signature · 1 line
2.17.1
Re: [PATCH] tty: Convert to using %pOFn instead of device_node.name
Quoted 12 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 5 lines
--- drivers/tty/ehv_bytechan.c | 12 ++++++------ drivers/tty/serial/cpm_uart/cpm_uart_core.c | 8 ++++---- drivers/tty/serial/pmac_zilog.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-)
Hey Greg, Is this still in your queue? Maybe you've just been extra busy lately. ;)
Rob
Quoted 83 lines
drivers/tty/ehv_bytechan.c +6
-6@@ -128,8 +128,8 @@ static int find_console_handle(void)*/ iprop =of_get_property (np,"hv-handle" ,NULL );if (!iprop) { -pr_err ("ehv-bc: no 'hv-handle' property in %s node\n" , - np->name); +pr_err ("ehv-bc: no 'hv-handle' property in %pOFn node\n" , + np);return 0 ; } stdout_bc =be32_to_cpu (*iprop);@@ -661,8 +661,8 @@ static int ehv_bc_tty_probe(struct platform_device *pdev) iprop =of_get_property (np,"hv-handle" ,NULL );if (!iprop) { -dev_err (&pdev->dev,"no 'hv-handle' property in %s node\n" , - np->name); +dev_err (&pdev->dev,"no 'hv-handle' property in %pOFn node\n" , + np);return -ENODEV ; }@@ -682,8 +682,8 @@ static int ehv_bc_tty_probe(struct platform_device *pdev) bc->rx_irq =irq_of_parse_and_map (np,0 ); bc->tx_irq =irq_of_parse_and_map (np,1 );if ((bc->rx_irq ==NO_IRQ ) || (bc->tx_irq ==NO_IRQ )) { -dev_err (&pdev->dev,"no 'interrupts' property in %s node\n" , - np->name); +dev_err (&pdev->dev,"no 'interrupts' property in %pOFn node\n" , + np); ret = -ENODEV ; goto error; }drivers/tty/serial/cpm_uart/cpm_uart_core.c +4
-4@@ -1151,8 +1151,8 @@ static int cpm_uart_init_port(struct device_node *np,if (!pinfo->clk) { data =of_get_property (np,"fsl,cpm-brg" , &len);if (!data || len !=4 ) { -printk (KERN_ERR "CPM UART %s has no/invalid " -"fsl,cpm-brg property.\n" , np->name); +printk (KERN_ERR "CPM UART %pOFn has no/invalid " +"fsl,cpm-brg property.\n" , np);return -EINVAL ; } pinfo->brg = *data;@@ -1160,8 +1160,8 @@ static int cpm_uart_init_port(struct device_node *np, data =of_get_property (np,"fsl,cpm-command" , &len);if (!data || len !=4 ) { -printk (KERN_ERR "CPM UART %s has no/invalid " -"fsl,cpm-command property.\n" , np->name); +printk (KERN_ERR "CPM UART %pOFn has no/invalid " +"fsl,cpm-command property.\n" , np);return -EINVAL ; } pinfo->command = *data;drivers/tty/serial/pmac_zilog.c +2
-3@@ -1566,9 +1566,9 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)* to work around bugs in ancient Apple device-trees */ if (macio_request_resources (uap->dev,"pmac_zilog" )) -printk (KERN_WARNING "%s: Failed to request resource" +printk (KERN_WARNING "%pOFn: Failed to request resource" ", port still active\n" , - uap->node->name); + uap->node);else uap->flags |=PMACZILOG_FLAG_RSRC_REQUESTED ; --2.17.1
Re: [PATCH] tty: Convert to using %pOFn instead of device_node.name
Quoted 20 lines · Rob Herring
Quoted 12 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Signed-off-by Rob Herring <[email protected]>Quoted 5 lines
--- drivers/tty/ehv_bytechan.c | 12 ++++++------ drivers/tty/serial/cpm_uart/cpm_uart_core.c | 8 ++++---- drivers/tty/serial/pmac_zilog.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-)
Quoted 2 lines
Hey Greg, Is this still in your queue? Maybe you've just been extra busy lately. ;)
NM. I see it's applied now. Sorry for the noise.
Rob
PATCH 1/1 backlight: pm8941: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/video/backlight/pm8941-wled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/backlight/pm8941-wled.c +1 -1
@@ -330,7 +330,7 @@ static int pm8941_wled_configure(struct pm8941_wled *wled, struct device *dev) rc =of_property_read_string (dev->of_node,"label" , &wled->name);if (rc) - wled->name = dev->of_node->name; + wled->name =devm_kasprintf (dev,GFP_KERNEL ,"%pOFn" , dev->of_node); *cfg = pm8941_wled_config_defaults;for (i =0 ; i <ARRAY_SIZE (u32_opts); ++i) {
Signature · 1 line
2.17.1
PATCH 1/1 fbdev: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/video/fbdev/cg14.c | 4 +--- drivers/video/fbdev/cg3.c | 2 +- drivers/video/fbdev/core/fbmon.c | 4 ++-- drivers/video/fbdev/imsttfb.c | 2 +- drivers/video/fbdev/leo.c | 2 +- drivers/video/fbdev/offb.c | 12 ++++++++---- drivers/video/fbdev/p9100.c | 2 +- drivers/video/of_display_timing.c | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-)
drivers/video/fbdev/cg14.c +1 -3
@@ -355,9 +355,7 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)static void cg14_init_fix (struct fb_info *info,int linebytes,struct device_node *dp) { -const char *name = dp->name; - -strlcpy (info->fix.id, name,sizeof (info->fix.id)); +snprintf (info->fix.id,sizeof (info->fix.id),"%pOFn" , dp); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_PSEUDOCOLOR ;
drivers/video/fbdev/cg3.c +1 -1
@@ -246,7 +246,7 @@ static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)static void cg3_init_fix (struct fb_info *info,int linebytes,struct device_node *dp) { -strlcpy (info->fix.id, dp->name,sizeof (info->fix.id)); +snprintf (info->fix.id,sizeof (info->fix.id),"%pOFn" , dp); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_PSEUDOCOLOR ;
drivers/video/fbdev/core/fbmon.c +2 -2
@@ -1480,8 +1480,8 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,if (ret)return ret; -pr_debug ("%pOF: got %dx%d display mode from %s\n" , - np, vm.hactive, vm.vactive, np->name); +pr_debug ("%pOF: got %dx%d display mode\n" , + np, vm.hactive, vm.vactive);dump_fb_videomode (fb);return 0 ;
drivers/video/fbdev/imsttfb.c +1 -1
@@ -1473,7 +1473,7 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) dp =pci_device_to_OF_node (pdev);if (dp) -printk (KERN_INFO "%s: OF name %s\n" ,__func__, dp->name); +printk (KERN_INFO "%s: OF name %pOFn\n" ,__func__, dp);else if (IS_ENABLED (CONFIG_OF ))printk (KERN_ERR "imsttfb: no OF node for pci device\n" );
drivers/video/fbdev/leo.c +1 -1
@@ -434,7 +434,7 @@ static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)static void leo_init_fix (struct fb_info *info,struct device_node *dp) { -strlcpy (info->fix.id, dp->name,sizeof (info->fix.id)); +snprintf (info->fix.id,sizeof (info->fix.id),"%pOFn" , dp); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_TRUECOLOR ;
drivers/video/fbdev/offb.c +8 -4
@@ -419,9 +419,13 @@ static void __init offb_init_fb(const char *name, var = &info->var; info->par = par; -strcpy (fix->id,"OFfb " ); -strncat (fix->id, name,sizeof (fix->id) -sizeof ("OFfb " )); - fix->id[sizeof (fix->id) -1 ] ='\0' ; +if (name) { +strcpy (fix->id,"OFfb " ); +strncat (fix->id, name,sizeof (fix->id) -sizeof ("OFfb " )); + fix->id[sizeof (fix->id) -1 ] ='\0' ; + }else +snprintf (fix->id,sizeof (fix->id),"OFfb %pOFn" , dp); + var->xres = var->xres_virtual = width; var->yres = var->yres_virtual = height;
@@ -644,7 +648,7 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)/* kludge for valkyrie */ if (strcmp (dp->name,"valkyrie" ) =0 ) address +=0x1000 ; -offb_init_fb (no_real_node ?"bootx" : dp->name, +offb_init_fb (no_real_node ?"bootx" :NULL , width, height, depth, pitch, address, foreign_endian, no_real_node ?NULL : dp); }
drivers/video/fbdev/p9100.c +1 -1
@@ -239,7 +239,7 @@ static int p9100_ioctl(struct fb_info *info, unsigned int cmd,static void p9100_init_fix (struct fb_info *info,int linebytes,struct device_node *dp) { -strlcpy (info->fix.id, dp->name,sizeof (info->fix.id)); +snprintf (info->fix.id,sizeof (info->fix.id),"%pOFn" , dp); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_PSEUDOCOLOR ;
drivers/video/of_display_timing.c +1 -1
@@ -170,7 +170,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np) goto entryfail; } -pr_debug ("%pOF: using %s as default timing\n" , np, entry->name); +pr_debug ("%pOF: using %pOFn as default timing\n" , np, entry); native_mode = entry;
Signature · 1 line
2.17.1
Re: [PATCH] fbdev: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 10 lines
--- drivers/video/fbdev/cg14.c | 4 +--- drivers/video/fbdev/cg3.c | 2 +- drivers/video/fbdev/core/fbmon.c | 4 ++-- drivers/video/fbdev/imsttfb.c | 2 +- drivers/video/fbdev/leo.c | 2 +- drivers/video/fbdev/offb.c | 12 ++++++++---- drivers/video/fbdev/p9100.c | 2 +- drivers/video/of_display_timing.c | 2 +- 8 files changed, 16 insertions(+), 14 deletions(-)
Ping!
Quoted 129 lines
drivers/video/fbdev/cg14.c +1
-3@@ -355,9 +355,7 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)static void cg14_init_fix (struct fb_info *info,int linebytes,struct device_node *dp) { -const char *name = dp->name; - -strlcpy (info->fix.id, name,sizeof (info->fix.id)); +snprintf (info->fix.id,sizeof (info->fix.id),"%pOFn" , dp); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_PSEUDOCOLOR ;drivers/video/fbdev/cg3.c +1
-1@@ -246,7 +246,7 @@ static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)static void cg3_init_fix (struct fb_info *info,int linebytes,struct device_node *dp) { -strlcpy (info->fix.id, dp->name,sizeof (info->fix.id)); +snprintf (info->fix.id,sizeof (info->fix.id),"%pOFn" , dp); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_PSEUDOCOLOR ;drivers/video/fbdev/core/fbmon.c +2
-2@@ -1480,8 +1480,8 @@ int of_get_fb_videomode(struct device_node *np, struct fb_videomode *fb,if (ret)return ret; -pr_debug ("%pOF: got %dx%d display mode from %s\n" , - np, vm.hactive, vm.vactive, np->name); +pr_debug ("%pOF: got %dx%d display mode\n" , + np, vm.hactive, vm.vactive);dump_fb_videomode (fb);return 0 ;drivers/video/fbdev/imsttfb.c +1
-1@@ -1473,7 +1473,7 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) dp =pci_device_to_OF_node (pdev);if (dp) -printk (KERN_INFO "%s: OF name %s\n" ,__func__, dp->name); +printk (KERN_INFO "%s: OF name %pOFn\n" ,__func__, dp);else if (IS_ENABLED (CONFIG_OF ))printk (KERN_ERR "imsttfb: no OF node for pci device\n" );drivers/video/fbdev/leo.c +1
-1@@ -434,7 +434,7 @@ static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)static void leo_init_fix (struct fb_info *info,struct device_node *dp) { -strlcpy (info->fix.id, dp->name,sizeof (info->fix.id)); +snprintf (info->fix.id,sizeof (info->fix.id),"%pOFn" , dp); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_TRUECOLOR ;drivers/video/fbdev/offb.c +8
-4@@ -419,9 +419,13 @@ static void __init offb_init_fb(const char *name, var = &info->var; info->par = par; -strcpy (fix->id,"OFfb " ); -strncat (fix->id, name,sizeof (fix->id) -sizeof ("OFfb " )); - fix->id[sizeof (fix->id) -1 ] ='\0' ; +if (name) { +strcpy (fix->id,"OFfb " ); +strncat (fix->id, name,sizeof (fix->id) -sizeof ("OFfb " )); + fix->id[sizeof (fix->id) -1 ] ='\0' ; + }else +snprintf (fix->id,sizeof (fix->id),"OFfb %pOFn" , dp); + var->xres = var->xres_virtual = width; var->yres = var->yres_virtual = height;@@ -644,7 +648,7 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)/* kludge for valkyrie */ if (strcmp (dp->name,"valkyrie" ) =0 ) address +=0x1000 ; -offb_init_fb (no_real_node ?"bootx" : dp->name, +offb_init_fb (no_real_node ?"bootx" :NULL , width, height, depth, pitch, address, foreign_endian, no_real_node ?NULL : dp); }drivers/video/fbdev/p9100.c +1
-1@@ -239,7 +239,7 @@ static int p9100_ioctl(struct fb_info *info, unsigned int cmd,static void p9100_init_fix (struct fb_info *info,int linebytes,struct device_node *dp) { -strlcpy (info->fix.id, dp->name,sizeof (info->fix.id)); +snprintf (info->fix.id,sizeof (info->fix.id),"%pOFn" , dp); info->fix.type =FB_TYPE_PACKED_PIXELS ; info->fix.visual =FB_VISUAL_PSEUDOCOLOR ;drivers/video/of_display_timing.c +1
-2@@ -170,7 +170,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np) goto entryfail; } -pr_debug ("%pOF: using %s as default timing\n" , np, entry->name); +pr_debug ("%pOF: using %pOFn as default timing\n" , np, entry); native_mode = entry; --2.17.1
Re: [PATCH] fbdev: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringQuoted 7 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Rob Herring <[email protected]>
Patch queued for 4.20, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
PATCH 1/1 sound: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- sound/aoa/soundbus/i2sbus/core.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
sound/aoa/soundbus/i2sbus/core.c +8 -7
@@ -157,18 +157,19 @@ static int i2sbus_add_dev(struct macio_dev *macio,struct device_node *child =NULL , *sound =NULL ;struct resource *r;int i, layout =0 , rlen, ok = force; -static const char *rnames[] = {"i2sbus: %s (control)" , -"i2sbus: %s (tx)" , -"i2sbus: %s (rx)" }; +char node_name[6 ]; +static const char *rnames[] = {"i2sbus: %pOFn (control)" , +"i2sbus: %pOFn (tx)" , +"i2sbus: %pOFn (rx)" };static irq_handler_t ints[] = { i2sbus_bus_intr, i2sbus_tx_intr, i2sbus_rx_intr }; -if (strlen (np->name) !=5 ) +if (snprintf (node_name,sizeof (node_name),"%pOFn" , np) !=5 )return 0 ; -if (strncmp (np->name,"i2s-" ,4 )) +if (strncmp (np,"i2s-" ,4 ))return 0 ; dev =kzalloc (sizeof (struct i2sbus_dev ),GFP_KERNEL );
@@ -228,13 +229,13 @@ static int i2sbus_add_dev(struct macio_dev *macio, dev->sound.pcmid =-1 ; dev->macio = macio; dev->control = control; - dev->bus_number = np->name[4 ] -'a' ; + dev->bus_number = node_name[4 ] -'a' ;INIT_LIST_HEAD (&dev->sound.codec_list);for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) { dev->interrupts[i] =-1 ;snprintf (dev->rnames[i],sizeof (dev->rnames[i]), - rnames[i], np->name); + rnames[i], np); }for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) {int irq =irq_of_parse_and_map (np, i);
Signature · 1 line
2.17.1
Re: [PATCH] sound: Convert to using %pOFn instead of device_node.name
sound/aoa/soundbus/i2sbus/core.c static int i2sbus_add_dev(struct macio_dev *macio,
Quoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.sound/aoa/soundbus/i2sbus/core.c +2
-0+if (snprintf (node_name,sizeof (node_name),"%pOFn" , np) !=5 )return 0 ; +if (strncmp (np,"i2s-" ,4 ))return 0 ;
Shouldn't be node_name here?
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 ASoC: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_utils.c | 4 ++-- sound/soc/meson/axg-card.c | 2 +- sound/soc/stm/stm32_sai.c | 2 +- sound/soc/stm/stm32_sai_sub.c | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-)
sound/soc/fsl/fsl_esai.c +1 -1
@@ -807,7 +807,7 @@ static int fsl_esai_probe(struct platform_device *pdev)return -ENOMEM ; esai_priv->pdev = pdev; -strncpy (esai_priv->name, np->name,sizeof (esai_priv->name) -1 ); +snprintf (esai_priv->name,sizeof (esai_priv->name),"%pOFn" , np);/* Get the addresses and IRQ */ res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
sound/soc/fsl/fsl_utils.c +2 -2
@@ -57,8 +57,8 @@ int fsl_asoc_get_dma_channel(struct device_node *ssi_np,of_node_put (dma_channel_np);return ret; } -snprintf ((char *)dai->platform_name,DAI_NAME_SIZE ,"%llx.%s" , - (unsigned long long ) res.start, dma_channel_np->name); +snprintf ((char *)dai->platform_name,DAI_NAME_SIZE ,"%llx.%pOFn" , + (unsigned long long ) res.start, dma_channel_np); iprop =of_get_property (dma_channel_np,"cell-index" ,NULL );if (!iprop) {
sound/soc/meson/axg-card.c +1 -1
@@ -478,7 +478,7 @@ static int axg_card_set_be_link(struct snd_soc_card *card, ret =axg_card_set_link_name (card, link,"be" );if (ret) -dev_err (card->dev,"error setting %s link name\n" , np->name); +dev_err (card->dev,"error setting %pOFn link name\n" , np);return ret; }
sound/soc/stm/stm32_sai.c +1 -1
@@ -104,7 +104,7 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client,if (!pdev) {dev_err (&sai_client->pdev->dev, -"Device not found for node %s\n" , np_provider->name); +"Device not found for node %pOFn\n" , np_provider);return -ENODEV ; }
sound/soc/stm/stm32_sai_sub.c +4 -4
@@ -1124,16 +1124,16 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev, sai->sync =SAI_SYNC_NONE ;if (args.np) {if (args.np == np) { -dev_err (&pdev->dev,"%s sync own reference\n" , - np->name); +dev_err (&pdev->dev,"%pOFn sync own reference\n" , + np);of_node_put (args.np);return -EINVAL ; } sai->np_sync_provider =of_get_parent (args.np);if (!sai->np_sync_provider) { -dev_err (&pdev->dev,"%s parent node not found\n" , - np->name); +dev_err (&pdev->dev,"%pOFn parent node not found\n" , + np);of_node_put (args.np);return -ENODEV ; }
Signature · 1 line
2.17.1
Re: [PATCH] ASoC: Convert to using %pOFn instead of device_node.name
sound/soc/fsl/fsl_utils.c int fsl_asoc_get_dma_channel(struct device_node *ssi_np, · line 61
Quoted 5 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.sound/soc/fsl/fsl_utils.c +2
-0+snprintf ((char *)dai->platform_name,DAI_NAME_SIZE ,"%llx.%pOFn" , + (unsigned long long ) res.start, dma_channel_np);
I understand that is not the part of the change, but wouldn't be good to replace that ugly casting with proper specifier as well? I mean
%pa ... &res.start
Review
Quoted 2 lines
(quoted diff) +2
-0+ dev_err(&pdev->dev, "%pOFn sync own reference\n", + np);
One line?
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 powerpc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- arch/powerpc/platforms/44x/fsp2.c | 8 +++--- arch/powerpc/platforms/cell/spu_manage.c | 4 +-- arch/powerpc/platforms/embedded6xx/wii.c | 2 +- .../powerpc/platforms/powernv/opal-powercap.c | 3 +- .../platforms/powernv/opal-sensor-groups.c | 4 +-- .../powerpc/platforms/powernv/opal-sysparam.c | 2 +- arch/powerpc/platforms/pseries/hotplug-cpu.c | 28 +++++++++---------- arch/powerpc/platforms/pseries/ibmebus.c | 2 +- arch/powerpc/platforms/pseries/vio.c | 27 +++++++++--------- 9 files changed, 40 insertions(+), 40 deletions(-)
arch/powerpc/platforms/44x/fsp2.c +4 -4
@@ -210,15 +210,15 @@ static void node_irq_request(const char *compat, irq_handler_t errirq_handler)for_each_compatible_node (np,NULL , compat) { irq =irq_of_parse_and_map (np,0 );if (irq ==NO_IRQ ) { -pr_err ("device tree node %s is missing a interrupt" , - np->name); +pr_err ("device tree node %pOFn is missing a interrupt" , + np);return ; } rc =request_irq (irq, errirq_handler,0 , np->name, np);if (rc) { -pr_err ("fsp_of_probe: request_irq failed: np=%s rc=%d" , - np->full_name, rc); +pr_err ("fsp_of_probe: request_irq failed: np=%pOF rc=%d" , + np, rc);return ; } }
arch/powerpc/platforms/cell/spu_manage.c +2 -2
@@ -295,8 +295,8 @@ static int __init of_enumerate_spus(int (*fn)(void *data))for_each_node_by_type (node,"spe" ) { ret =fn (node);if (ret) { -printk (KERN_WARNING "%s: Error initializing %s\n" , - __func__, node->name); +printk (KERN_WARNING "%s: Error initializing %pOFn\n" , + __func__, node);of_node_put (node);break ; }
arch/powerpc/platforms/embedded6xx/wii.c +1 -1
@@ -112,7 +112,7 @@ static void __iomem *wii_ioremap_hw_regs(char *name, char *compatible) } error =of_address_to_resource (np,0 , &res);if (error) { -pr_err ("no valid reg found for %s\n" , np->name); +pr_err ("no valid reg found for %pOFn\n" , np); goto out_put; }
arch/powerpc/platforms/powernv/opal-powercap.c +2 -1
@@ -199,7 +199,7 @@ void __init opal_powercap_init(void) } j =0 ; - pcaps[i].pg.name = node->name; + pcaps[i].pg.name =kasprintf (GFP_KERNEL ,"%pOFn" , node);if (has_min) {powercap_add_attr (min,"powercap-min" , &pcaps[i].pattrs[j]);
@@ -237,6 +237,7 @@ void __init opal_powercap_init(void)while (--i >=0 ) {kfree (pcaps[i].pattrs);kfree (pcaps[i].pg.attrs); +kfree (pcaps[i].pg.name); }kobject_put (powercap_kobj); out_pcaps:
arch/powerpc/platforms/powernv/opal-sensor-groups.c +2 -2
@@ -214,9 +214,9 @@ void __init opal_sensor_groups_init(void) }if (!of_property_read_u32 (node,"ibm,chip-id" , &chipid)) -sprintf (sgs[i].name,"%s%d" , node->name, chipid); +sprintf (sgs[i].name,"%pOFn%d" , node, chipid);else -sprintf (sgs[i].name,"%s" , node->name); +sprintf (sgs[i].name,"%pOFn" , node); sgs[i].sg.name = sgs[i].name;if (add_attr_group (ops, len, &sgs[i], sgid)) {
arch/powerpc/platforms/powernv/opal-sysparam.c +1 -1
@@ -194,7 +194,7 @@ void __init opal_sys_param_init(void) count =of_property_count_strings (sysparam,"param-name" );if (count <0 ) {pr_err ("SYSPARAM: No string found of property param-name in " -"the node %s\n" , sysparam->name); +"the node %pOFn\n" , sysparam); goto out_param_buf; }
arch/powerpc/platforms/pseries/hotplug-cpu.c +14 -14
@@ -287,7 +287,7 @@ static int pseries_add_processor(struct device_node *np)if (cpumask_empty (tmp)) {printk (KERN_ERR "Unable to find space in cpu_present_mask for" -" processor %s with %d thread(s)\n" , np->name, +" processor %pOFn with %d thread(s)\n" , np, nthreads); goto out_unlock; }
@@ -481,8 +481,8 @@ static ssize_t dlpar_cpu_add(u32 drc_index)if (rc) { saved_rc = rc; -pr_warn ("Failed to attach node %s, rc: %d, drc index: %x\n" , - dn->name, rc, drc_index); +pr_warn ("Failed to attach node %pOFn, rc: %d, drc index: %x\n" , + dn, rc, drc_index); rc =dlpar_release_drc (drc_index);if (!rc)
@@ -494,8 +494,8 @@ static ssize_t dlpar_cpu_add(u32 drc_index) rc =dlpar_online_cpu (dn);if (rc) { saved_rc = rc; -pr_warn ("Failed to online cpu %s, rc: %d, drc index: %x\n" , - dn->name, rc, drc_index); +pr_warn ("Failed to online cpu %pOFn, rc: %d, drc index: %x\n" , + dn, rc, drc_index); rc =dlpar_detach_node (dn);if (!rc)
@@ -504,7 +504,7 @@ static ssize_t dlpar_cpu_add(u32 drc_index)return saved_rc; } -pr_debug ("Successfully added CPU %s, drc index: %x\n" , dn->name, +pr_debug ("Successfully added CPU %pOFn, drc index: %x\n" , dn, drc_index);return rc; }
@@ -570,19 +570,19 @@ static ssize_t dlpar_cpu_remove(struct device_node *dn, u32 drc_index) {int rc; -pr_debug ("Attempting to remove CPU %s, drc index: %x\n" , - dn->name, drc_index); +pr_debug ("Attempting to remove CPU %pOFn, drc index: %x\n" , + dn, drc_index); rc =dlpar_offline_cpu (dn);if (rc) { -pr_warn ("Failed to offline CPU %s, rc: %d\n" , dn->name, rc); +pr_warn ("Failed to offline CPU %pOFn, rc: %d\n" , dn, rc);return -EINVAL ; } rc =dlpar_release_drc (drc_index);if (rc) { -pr_warn ("Failed to release drc (%x) for CPU %s, rc: %d\n" , - drc_index, dn->name, rc); +pr_warn ("Failed to release drc (%x) for CPU %pOFn, rc: %d\n" , + drc_index, dn, rc);dlpar_online_cpu (dn);return rc; }
@@ -591,7 +591,7 @@ static ssize_t dlpar_cpu_remove(struct device_node *dn, u32 drc_index)if (rc) {int saved_rc = rc; -pr_warn ("Failed to detach CPU %s, rc: %d" , dn->name, rc); +pr_warn ("Failed to detach CPU %pOFn, rc: %d" , dn, rc); rc =dlpar_acquire_drc (drc_index);if (!rc)
@@ -662,8 +662,8 @@ static int find_dlpar_cpus_to_remove(u32 *cpu_drcs, int cpus_to_remove) rc =of_property_read_u32 (dn,"ibm,my-drc-index" , &cpu_drcs[cpus_found -1 ]);if (rc) { -pr_warn ("Error occurred getting drc-index for %s\n" , - dn->name); +pr_warn ("Error occurred getting drc-index for %pOFn\n" , + dn);of_node_put (dn);return -1 ; }
arch/powerpc/platforms/pseries/ibmebus.c +1 -1
@@ -404,7 +404,7 @@ static ssize_t name_show(struct device *dev,struct platform_device *ofdev; ofdev =to_platform_device (dev); -return sprintf (buf,"%s\n" , ofdev->dev.of_node->name); +return sprintf (buf,"%pOFn\n" , ofdev->dev.of_node); }static DEVICE_ATTR_RO (name);
arch/powerpc/platforms/pseries/vio.c +13 -14
@@ -1349,7 +1349,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)struct device_node *parent_node;const __be32 *prop;enum vio_dev_family family; -const char *of_node_name = of_node->name ? of_node->name :"<unknown>" ;/* * Determine if this node is a under the /vdevice node or under the
@@ -1362,24 +1361,24 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)else if (!strcmp (parent_node->type,"vdevice" )) family =VDEVICE ;else { -pr_warn ("%s: parent(%pOF) of %s not recognized.\n" , +pr_warn ("%s: parent(%pOF) of %pOFn not recognized.\n" , __func__, parent_node, - of_node_name); + of_node);of_node_put (parent_node);return NULL ; }of_node_put (parent_node); }else { -pr_warn ("%s: could not determine the parent of node %s.\n" , - __func__, of_node_name); +pr_warn ("%s: could not determine the parent of node %pOFn.\n" , + __func__, of_node);return NULL ; }if (family ==PFO ) {if (of_get_property (of_node,"interrupt-controller" ,NULL )) { -pr_debug ("%s: Skipping the interrupt controller %s.\n" , - __func__, of_node_name); +pr_debug ("%s: Skipping the interrupt controller %pOFn.\n" , + __func__, of_node);return NULL ; } }
@@ -1399,15 +1398,15 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)if (of_node->type !=NULL ) viodev->type = of_node->type;else { -pr_warn ("%s: node %s is missing the 'device_type' " -"property.\n" , __func__, of_node_name); +pr_warn ("%s: node %pOFn is missing the 'device_type' " +"property.\n" , __func__, of_node); goto out; } prop =of_get_property (of_node,"reg" ,NULL );if (prop ==NULL ) { -pr_warn ("%s: node %s missing 'reg'\n" , - __func__, of_node_name); +pr_warn ("%s: node %pOFn missing 'reg'\n" , + __func__, of_node); goto out; } unit_address =of_read_number (prop,1 );
@@ -1422,8 +1421,8 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)if (prop !=NULL ) viodev->resource_id =of_read_number (prop,1 ); -dev_set_name (&viodev->dev,"%s" , of_node_name); - viodev->type = of_node_name; +dev_set_name (&viodev->dev,"%pOFn" , of_node); + viodev->type =dev_name (&viodev->dev); viodev->irq =0 ; }
@@ -1694,7 +1693,7 @@ struct vio_dev *vio_find_node(struct device_node *vnode)snprintf (kobj_name,sizeof (kobj_name),"%x" , (uint32_t )of_read_number (prop,1 )); }else if (!strcmp (dev_type,"ibm,platform-facilities" )) -snprintf (kobj_name,sizeof (kobj_name),"%s" , vnode->name); +snprintf (kobj_name,sizeof (kobj_name),"%pOFn" , vnode);else return NULL ;
Signature · 1 line
2.17.1
Michael Ellerman
AppliedRe: powerpc: Convert to using %pOFn instead of device_node.name
Quoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Cc Arnd Bergmann <[email protected]>Signed-off-by Rob Herring <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/b9ef7b4b867f56114bedbe6bf104cf
cheers
PATCH 1/1 MIPS: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- arch/mips/cavium-octeon/octeon-irq.c | 16 ++++++++-------- arch/mips/netlogic/common/irq.c | 14 +++++++------- arch/mips/ralink/cevt-rt3352.c | 6 +++--- arch/mips/ralink/ill_acc.c | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-)
arch/mips/cavium-octeon/octeon-irq.c +8 -8
@@ -1180,8 +1180,8 @@ static int octeon_irq_gpio_xlat(struct irq_domain *d, type =IRQ_TYPE_LEVEL_LOW ;break ;default : -pr_err ("Error: (%s) Invalid irq trigger specification: %x\n" , - node->name, +pr_err ("Error: (%pOFn) Invalid irq trigger specification: %x\n" , + node, trigger); type =IRQ_TYPE_LEVEL_LOW ;break ;
@@ -2271,8 +2271,8 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, parent_irq =irq_of_parse_and_map (ciu_node,0 );if (!parent_irq) { -pr_err ("ERROR: Couldn't acquire parent_irq for %s\n" , - ciu_node->name); +pr_err ("ERROR: Couldn't acquire parent_irq for %pOFn\n" , + ciu_node);return -EINVAL ; }
@@ -2283,7 +2283,7 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, addr =of_get_address (ciu_node,0 ,NULL ,NULL );if (!addr) { -pr_err ("ERROR: Couldn't acquire reg(0) %s\n" , ciu_node->name); +pr_err ("ERROR: Couldn't acquire reg(0) %pOFn\n" , ciu_node);return -EINVAL ; } host_data->raw_reg = (u64)phys_to_virt(
@@ -2291,7 +2291,7 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, addr =of_get_address (ciu_node,1 ,NULL ,NULL );if (!addr) { -pr_err ("ERROR: Couldn't acquire reg(1) %s\n" , ciu_node->name); +pr_err ("ERROR: Couldn't acquire reg(1) %pOFn\n" , ciu_node);return -EINVAL ; } host_data->en_reg = (u64)phys_to_virt(
@@ -2299,8 +2299,8 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, r =of_property_read_u32 (ciu_node,"cavium,max-bits" , &val);if (r) { -pr_err ("ERROR: Couldn't read cavium,max-bits from %s\n" , - ciu_node->name); +pr_err ("ERROR: Couldn't read cavium,max-bits from %pOFn\n" , + ciu_node);return r; } host_data->max_bits = val;
arch/mips/netlogic/common/irq.c +7 -7
@@ -291,7 +291,7 @@ static int __init xlp_of_pic_init(struct device_node *node,/* we need a hack to get the PIC's SoC chip id */ ret =of_address_to_resource (node,0 , &res);if (ret <0 ) { -pr_err ("PIC %s: reg property not found!\n" , node->name); +pr_err ("PIC %pOFn: reg property not found!\n" , node);return -EINVAL ; }
@@ -304,21 +304,21 @@ static int __init xlp_of_pic_init(struct device_node *node,break ; }if (socid ==NLM_NR_NODES ) { -pr_err ("PIC %s: Node mapping for bus %d not found!\n" , - node->name, bus); +pr_err ("PIC %pOFn: Node mapping for bus %d not found!\n" , + node, bus);return -EINVAL ; } }else { socid = (res.start >>18 ) &0x3 ;if (!nlm_node_present (socid)) { -pr_err ("PIC %s: node %d does not exist!\n" , - node->name, socid); +pr_err ("PIC %pOFn: node %d does not exist!\n" , + node, socid);return -EINVAL ; } }if (!nlm_node_present (socid)) { -pr_err ("PIC %s: node %d does not exist!\n" , node->name, socid); +pr_err ("PIC %pOFn: node %d does not exist!\n" , node, socid);return -EINVAL ; }
@@ -326,7 +326,7 @@ static int __init xlp_of_pic_init(struct device_node *node,nlm_irq_to_xirq (socid,PIC_IRQ_BASE ),PIC_IRQ_BASE , &xlp_pic_irq_domain_ops, NULL);if (xlp_pic_domain ==NULL ) { -pr_err ("PIC %s: Creating legacy domain failed!\n" , node->name); +pr_err ("PIC %pOFn: Creating legacy domain failed!\n" , node);return -EINVAL ; }pr_info ("Node %d: IRQ domain created for PIC@%pR\n" , socid, &res);
arch/mips/ralink/cevt-rt3352.c +3 -3
@@ -134,7 +134,7 @@ static int __init ralink_systick_init(struct device_node *np) systick.dev.min_delta_ticks =0x3 ; systick.dev.irq =irq_of_parse_and_map (np,0 );if (!systick.dev.irq) { -pr_err ("%s: request_irq failed" , np->name); +pr_err ("%pOFn: request_irq failed" , np);return -EINVAL ; }
@@ -146,8 +146,8 @@ static int __init ralink_systick_init(struct device_node *np)clockevents_register_device (&systick.dev); -pr_info ("%s: running - mult: %d, shift: %d\n" , - np->name, systick.dev.mult, systick.dev.shift); +pr_info ("%pOFn: running - mult: %d, shift: %d\n" , + np, systick.dev.mult, systick.dev.shift);return 0 ; }
arch/mips/ralink/ill_acc.c +1 -1
@@ -62,7 +62,7 @@ static int __init ill_acc_of_setup(void) pdev =of_find_device_by_node (np);if (!pdev) { -pr_err ("%s: failed to lookup pdev\n" , np->name); +pr_err ("%pOFn: failed to lookup pdev\n" , np);return -EINVAL ; }
Signature · 1 line
2.17.1
Re: [PATCH] MIPS: Convert to using %pOFn instead of device_node.name
Hi Rob,
Quoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Ralf Baechle <[email protected]>Cc Paul Burton <[email protected]>Cc James Hogan <[email protected]>Cc John Crispin <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 6 lines
--- arch/mips/cavium-octeon/octeon-irq.c | 16 ++++++++-------- arch/mips/netlogic/common/irq.c | 14 +++++++------- arch/mips/ralink/cevt-rt3352.c | 6 +++--- arch/mips/ralink/ill_acc.c | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-)
Thanks - applied to mips-next for 4.20.
Paul
PATCH 1/1 bus: mvebu-mbus: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/bus/mvebu-mbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/mvebu-mbus.c +1 -1
@@ -1229,7 +1229,7 @@ mbus_parse_ranges(struct device_node *node, tuple_len = (*cell_count) *sizeof (__be32);if (ranges_len % tuple_len) { -pr_warn ("malformed ranges entry '%s'\n" , node->name); +pr_warn ("malformed ranges entry '%pOFn'\n" , node);return -EINVAL ; }return 0 ;
Signature · 1 line
2.17.1
PATCH 1/1 firmware: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/firmware/scpi_pm_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/scpi_pm_domain.c +1 -1
@@ -121,7 +121,7 @@ static int scpi_pm_domain_probe(struct platform_device *pdev) scpi_pd->domain = i; scpi_pd->ops = scpi_ops; -sprintf (scpi_pd->name,"%s.%d" , np->name, i); +sprintf (scpi_pd->name,"%pOFn.%d" , np, i); scpi_pd->genpd.name = scpi_pd->name; scpi_pd->genpd.power_off = scpi_pd_power_off; scpi_pd->genpd.power_on = scpi_pd_power_on;
Signature · 1 line
2.17.1
Re: [PATCH] firmware: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Signed-off-by Rob Herring <[email protected]>--- drivers/firmware/scpi_pm_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Sudeep, looks like I missed Cc'ing you (or anyone) on this. Can you please ack or apply this.
Quoted 17 lines
drivers/firmware/scpi_pm_domain.c +1
-2@@ -121,7 +121,7 @@ static int scpi_pm_domain_probe(struct platform_device *pdev) scpi_pd->domain = i; scpi_pd->ops = scpi_ops; -sprintf (scpi_pd->name,"%s.%d" , np->name, i); +sprintf (scpi_pd->name,"%pOFn.%d" , np, i); scpi_pd->genpd.name = scpi_pd->name; scpi_pd->genpd.power_off = scpi_pd_power_off; scpi_pd->genpd.power_on = scpi_pd_power_on; --2.17.1
Sudeep Holla
Acked-byRe: [PATCH] firmware: Convert to using %pOFn instead of device_node.name
Quoted 5 lines · Rob Herring
Quoted 4 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Rob Herring <[email protected]>--- drivers/firmware/scpi_pm_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Sudeep, looks like I missed Cc'ing you (or anyone) on this. Can you please ack or apply this.
I prefer you to take it via your tree as that may be easier.
--
Regards,
Sudeep
PATCH 1/1 xtensa: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- arch/xtensa/platforms/xtfpga/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/xtensa/platforms/xtfpga/setup.c +3 -3
@@ -94,7 +94,7 @@ static void __init xtfpga_clk_setup(struct device_node *np)u32 freq;if (!base) { -pr_err ("%s: invalid address\n" , np->name); +pr_err ("%pOFn: invalid address\n" , np);return ; }
@@ -103,12 +103,12 @@ static void __init xtfpga_clk_setup(struct device_node *np) clk =clk_register_fixed_rate (NULL , np->name,NULL ,0 , freq);if (IS_ERR (clk)) { -pr_err ("%s: clk registration failed\n" , np->name); +pr_err ("%pOFn: clk registration failed\n" , np);return ; }if (of_clk_add_provider (np, of_clk_src_simple_get, clk)) { -pr_err ("%s: clk provider registration failed\n" , np->name); +pr_err ("%pOFn: clk provider registration failed\n" , np);return ; } }
Signature · 1 line
2.17.1
Re: [PATCH] xtensa: Convert to using %pOFn instead of device_node.name
Quoted 10 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>Signed-off-by Rob Herring <[email protected]>--- arch/xtensa/platforms/xtfpga/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 2 lines
Thanks. -- Max
PATCH 1/1 bus: fsl-mc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/bus/fsl-mc/fsl-mc-bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/bus/fsl-mc/fsl-mc-bus.c +3 -3
@@ -693,8 +693,8 @@ static int parse_mc_ranges(struct device *dev, *ranges_start =of_get_property (mc_node,"ranges" , &ranges_len);if (!(*ranges_start) || !ranges_len) {dev_warn (dev, -"missing or empty ranges property for device tree node '%s'\n" , - mc_node->name); +"missing or empty ranges property for device tree node '%pOFn'\n" , + mc_node);return 0 ; }
@@ -717,7 +717,7 @@ static int parse_mc_ranges(struct device *dev, tuple_len = range_tuple_cell_count *sizeof (__be32);if (ranges_len % tuple_len !=0 ) { -dev_err (dev,"malformed ranges property '%s'\n" , mc_node->name); +dev_err (dev,"malformed ranges property '%pOFn'\n" , mc_node);return -EINVAL ; }
Signature · 1 line
2.17.1
PATCH 1/1 nios2: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- arch/nios2/kernel/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/nios2/kernel/time.c +2 -2
@@ -214,12 +214,12 @@ static int __init nios2_timer_get_base_and_freq(struct device_node *np, { *base =of_iomap (np,0 );if (!*base) { -pr_crit ("Unable to map reg for %s\n" , np->name); +pr_crit ("Unable to map reg for %pOFn\n" , np);return -ENXIO ; }if (of_property_read_u32 (np,"clock-frequency" , freq)) { -pr_crit ("Unable to get %s clock frequency\n" , np->name); +pr_crit ("Unable to get %pOFn clock frequency\n" , np);return -EINVAL ; }
Signature · 1 line
2.17.1
Re: [PATCH] nios2: Convert to using %pOFn instead of device_node.name
Quoted 7 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node,
convert printf users to use the %pOFn format specifier.Cc Ley Foon Tan <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 39 lines
---
arch/nios2/kernel/time.c | 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)arch/nios2/kernel/time.c +2
-2@@ -214,12 +214,12 @@ static int __init nios2_timer_get_base_and_freq(struct device_node *np, { *base = of_iomap(np, 0); if (!*base) { - pr_crit("Unable to map reg for %s\n", np->name); + pr_crit("Unable to map reg for %pOFn\n", np); return -ENXIO; } if (of_property_read_u32(np, "clock-frequency", freq)) { - pr_crit("Unable to get %s clock frequency\n", np- >name); + pr_crit("Unable to get %pOFn clock frequency\n", np); return -EINVAL;}
--
2.17.1________________________________
Confidentiality Notice.
This message may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution, or copying of this message, or any attachments, is strictly prohibited. If you have received this message in error, please advise the sender by reply e-mail, and delete the message and any attachments. Thank you.
PATCH 1/1 macintosh: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/macintosh/macio_sysfs.c | 8 +++++++- drivers/macintosh/windfarm_smu_controls.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/macintosh/macio_sysfs.c +7 -1
@@ -58,7 +58,13 @@ static ssize_t devspec_show(struct device *dev,static DEVICE_ATTR_RO (modalias);static DEVICE_ATTR_RO (devspec); -macio_config_of_attr (name,"%s\n" ); +static ssize_t name_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +return sprintf (buf,"%pOFn\n" , dev->of_node); +} +static DEVICE_ATTR_RO (name); +macio_config_of_attr (type,"%s\n" );static struct attribute *macio_dev_attrs[] = {
drivers/macintosh/windfarm_smu_controls.c +2 -2
@@ -277,7 +277,7 @@ static int __init smu_controls_init(void) fct =smu_fan_create (fan,0 );if (fct ==NULL ) {printk (KERN_WARNING "windfarm: Failed to create SMU " -"RPM fan %s\n" , fan->name); +"RPM fan %pOFn\n" , fan);continue ; }list_add (&fct->link, &smu_fans);
@@ -296,7 +296,7 @@ static int __init smu_controls_init(void) fct =smu_fan_create (fan,1 );if (fct ==NULL ) {printk (KERN_WARNING "windfarm: Failed to create SMU " -"PWM fan %s\n" , fan->name); +"PWM fan %pOFn\n" , fan);continue ; }list_add (&fct->link, &smu_fans);
Signature · 1 line
2.17.1
PATCH 1/1 mailbox: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/mailbox/ti-msgmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mailbox/ti-msgmgr.c +2 -2
@@ -560,8 +560,8 @@ static struct mbox_chan *ti_msgmgr_of_xlate(struct mbox_controller *mbox, } err: -dev_err (inst->dev,"Queue ID %d, Proxy ID %d is wrong on %s\n" , - req_qid, req_pid, p->np->name); +dev_err (inst->dev,"Queue ID %d, Proxy ID %d is wrong on %pOFn\n" , + req_qid, req_pid, p->np);return ERR_PTR (-ENOENT ); }
Signature · 1 line
2.17.1
Re: [PATCH] mailbox: Convert to using %pOFn instead of device_node.name
Quoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Jassi Brar <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/mailbox/ti-msgmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Ping.
Quoted 19 lines
drivers/mailbox/ti-msgmgr.c +2
-3@@ -560,8 +560,8 @@ static struct mbox_chan *ti_msgmgr_of_xlate(struct mbox_controller *mbox, } err: -dev_err (inst->dev,"Queue ID %d, Proxy ID %d is wrong on %s\n" , - req_qid, req_pid, p->np->name); +dev_err (inst->dev,"Queue ID %d, Proxy ID %d is wrong on %pOFn\n" , + req_qid, req_pid, p->np);return ERR_PTR (-ENOENT ); } --2.17.1
PATCH 1/1 misc: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/misc/cxl/flash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/cxl/flash.c +2 -2
@@ -92,8 +92,8 @@ static int update_property(struct device_node *dn, const char *name, val = (u32 *)new_prop->value; rc =cxl_update_properties (dn, new_prop); -pr_devel ("%s: update property (%s, length: %i, value: %#x)\n" , - dn->name, name, vd,be32_to_cpu (*val)); +pr_devel ("%pOFn: update property (%s, length: %i, value: %#x)\n" , + dn, name, vd,be32_to_cpu (*val));if (rc) {kfree (new_prop->name);
Signature · 1 line
2.17.1
Re: [PATCH] misc: Convert to using %pOFn instead of device_node.name
Quoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Frederic Barrat <[email protected]>Cc Andrew Donnellan <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Rob Herring <[email protected]>
Signature · 2 lines
Andrew Donnellan OzLabs, ADL Canberra [email protected] IBM Australia Limited
PATCH 1/1 mtd: rawnand: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/mtd/nand/raw/fsl_upm.c | 4 ++-- drivers/mtd/nand/raw/ndfc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/mtd/nand/raw/fsl_upm.c +2 -2
@@ -184,8 +184,8 @@ static int fun_chip_init(struct fsl_upm_nand *fun,return -ENODEV ;nand_set_flash_node (&fun->chip, flash_np); - mtd->name =kasprintf (GFP_KERNEL ,"0x%llx.%s" , (u64 )io_res->start, - flash_np->name); + mtd->name =kasprintf (GFP_KERNEL ,"0x%llx.%pOFn" , (u64 )io_res->start, + flash_np);if (!mtd->name) { ret = -ENOMEM ; goto err;
drivers/mtd/nand/raw/ndfc.c +2 -2
@@ -174,8 +174,8 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,return -ENODEV ;nand_set_flash_node (chip, flash_np); - mtd->name =kasprintf (GFP_KERNEL ,"%s.%s" ,dev_name (&ndfc->ofdev->dev), - flash_np->name); + mtd->name =kasprintf (GFP_KERNEL ,"%s.%pOFn" ,dev_name (&ndfc->ofdev->dev), + flash_np);if (!mtd->name) { ret = -ENOMEM ; goto err;
Signature · 1 line
2.17.1
Re: [PATCH] mtd: rawnand: Convert to using %pOFn instead of device_node.name
Quoted 11 lines · On Mon, 27 Aug 2018 20:52:34 -0500 Rob Herring <[email protected]> wrote:
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Boris Brezillon <[email protected]>Cc Miquel Raynal <[email protected]>Cc Richard Weinberger <[email protected]>Cc David Woodhouse <[email protected]>Cc Brian Norris <[email protected]>Cc Marek Vasut <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 35 lines
--- drivers/mtd/nand/raw/fsl_upm.c | 4 ++-- drivers/mtd/nand/raw/ndfc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/mtd/nand/raw/fsl_upm.c +2
-2@@ -184,8 +184,8 @@ static int fun_chip_init(struct fsl_upm_nand *fun,return -ENODEV ;nand_set_flash_node (&fun->chip, flash_np); - mtd->name =kasprintf (GFP_KERNEL ,"0x%llx.%s" , (u64 )io_res->start, - flash_np->name); + mtd->name =kasprintf (GFP_KERNEL ,"0x%llx.%pOFn" , (u64 )io_res->start, + flash_np);if (!mtd->name) { ret = -ENOMEM ; goto err;drivers/mtd/nand/raw/ndfc.c +2
-2@@ -174,8 +174,8 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,return -ENODEV ;nand_set_flash_node (chip, flash_np); - mtd->name =kasprintf (GFP_KERNEL ,"%s.%s" ,dev_name (&ndfc->ofdev->dev), - flash_np->name); + mtd->name =kasprintf (GFP_KERNEL ,"%s.%pOFn" ,dev_name (&ndfc->ofdev->dev), + flash_np);if (!mtd->name) { ret = -ENOMEM ; goto err;
Re: [PATCH] mtd: rawnand: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringHi Rob,
Rob Herring <[email protected]> wrote on Mon, 27 Aug 2018 20:52:34 -0500:
Quoted 11 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Boris Brezillon <[email protected]>Cc Miquel Raynal <[email protected]>Cc Richard Weinberger <[email protected]>Cc David Woodhouse <[email protected]>Cc Brian Norris <[email protected]>Cc Marek Vasut <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 1 line
---
Applied to nand/next.
Thanks,
Miquèl
PATCH 1/1 nvmem: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/nvmem/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/nvmem/core.c +3 -1
@@ -304,6 +304,7 @@ static void nvmem_cell_drop(struct nvmem_cell *cell)mutex_lock (&nvmem_cells_mutex);list_del (&cell->node);mutex_unlock (&nvmem_cells_mutex); +kfree (cell->name);kfree (cell); }
@@ -879,7 +880,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np, cell->nvmem = nvmem; cell->offset =be32_to_cpup (addr++); cell->bytes =be32_to_cpup (addr); - cell->name = cell_np->name; + cell->name =kasprintf (GFP_KERNEL ,"%pOFn" , cell_np); addr =of_get_property (cell_np,"bits" , &len);if (addr && len == (2 *sizeof (u32))) {
@@ -904,6 +905,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,return cell; err_sanity: +kfree (cell->name);kfree (cell); err_mem:
Signature · 1 line
2.17.1
Re: [PATCH] nvmem: Convert to using %pOFn instead of device_node.name
Quoted 9 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Srinivas Kandagatla <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/nvmem/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Ping. This has no dependencies, so please apply.
Rob
Quoted 33 lines
drivers/nvmem/core.c +3
-2@@ -304,6 +304,7 @@ static void nvmem_cell_drop(struct nvmem_cell *cell)mutex_lock (&nvmem_cells_mutex);list_del (&cell->node);mutex_unlock (&nvmem_cells_mutex); +kfree (cell->name);kfree (cell); }@@ -879,7 +880,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np, cell->nvmem = nvmem; cell->offset =be32_to_cpup (addr++); cell->bytes =be32_to_cpup (addr); - cell->name = cell_np->name; + cell->name =kasprintf (GFP_KERNEL ,"%pOFn" , cell_np); addr =of_get_property (cell_np,"bits" , &len);if (addr && len == (2 *sizeof (u32))) {@@ -904,6 +905,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,return cell; err_sanity: +kfree (cell->name);kfree (cell); err_mem: --2.17.1
Re: [PATCH] nvmem: Convert to using %pOFn instead of device_node.name
Quoted 5 lines · Rob Herring
Quoted 4 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Quoted 7 lines
Quoted 5 lines
Cc Srinivas Kandagatla <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/nvmem/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Ping. This has no dependencies, so please apply.
Sorry, Looks like I missed this one!
I already re-based it. I will send it with other fixes to Greg KH soon!
thanks,
--srini
Quoted 36 lines
Rob
Quoted 33 lines
drivers/nvmem/core.c +3
-2@@ -304,6 +304,7 @@ static void nvmem_cell_drop(struct nvmem_cell *cell)mutex_lock (&nvmem_cells_mutex);list_del (&cell->node);mutex_unlock (&nvmem_cells_mutex); +kfree (cell->name);kfree (cell); }@@ -879,7 +880,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np, cell->nvmem = nvmem; cell->offset =be32_to_cpup (addr++); cell->bytes =be32_to_cpup (addr); - cell->name = cell_np->name; + cell->name =kasprintf (GFP_KERNEL ,"%pOFn" , cell_np); addr =of_get_property (cell_np,"bits" , &len);if (addr && len == (2 *sizeof (u32))) {@@ -904,6 +905,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,return cell; err_sanity: +kfree (cell->name);kfree (cell); err_mem: --2.17.1
PATCH 1/1 staging: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/staging/media/imx/imx-media-dev.c | 11 ++++++----- drivers/staging/media/imx/imx-media-of.c | 4 ++-- drivers/staging/mt7621-eth/mdio.c | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-)
drivers/staging/media/imx/imx-media-dev.c +6 -5
@@ -89,8 +89,8 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,/* return -EEXIST if this asd already added */ if (find_async_subdev (imxmd, fwnode, devname)) { -dev_dbg (imxmd->md.dev,"%s: already added %s\n" , - __func__, np ? np->name : devname); +dev_dbg (imxmd->md.dev,"%s: already added %pOFn\n" , + __func__, np ? np : devname); ret = -EEXIST ; goto out; }
@@ -105,19 +105,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,if (fwnode) { asd->match_type =V4L2_ASYNC_MATCH_FWNODE ; asd->match.fwnode = fwnode; +dev_dbg (imxmd->md.dev,"%s: added %pOFn, match type FWNODE\n" , + __func__, np); }else { asd->match_type =V4L2_ASYNC_MATCH_DEVNAME ; asd->match.device_name = devname; imxasd->pdev = pdev; +dev_dbg (imxmd->md.dev,"%s: added %s, match type DEVNAME\n" , + __func__, devname); }list_add_tail (&imxasd->list, &imxmd->asd_list); imxmd->subdev_notifier.num_subdevs++; -dev_dbg (imxmd->md.dev,"%s: added %s, match type %s\n" , - __func__, np ? np->name : devname, np ?"FWNODE" :"DEVNAME" ); - out:mutex_unlock (&imxmd->mutex);return ret;
drivers/staging/media/imx/imx-media-of.c +2 -2
@@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np,int i, num_ports, ret;if (!of_device_is_available (sd_np)) { -dev_dbg (imxmd->md.dev,"%s: %s not enabled\n" , __func__, - sd_np->name); +dev_dbg (imxmd->md.dev,"%pOFn: %s not enabled\n" , __func__, + sd_np);/* unavailable is not an error */ return 0 ; }
drivers/staging/mt7621-eth/mdio.c +2 -2
@@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac, _port =of_get_property (phy_node,"reg" ,NULL );if (!_port || (be32_to_cpu (*_port) >=0x20 )) { -pr_err ("%s: invalid port id\n" , phy_node->name); +pr_err ("%pOFn: invalid port id\n" , phy_node);return -EINVAL ; } port =be32_to_cpu (*_port);
@@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth) eth->mii_bus->priv = eth; eth->mii_bus->parent = eth->dev; -snprintf (eth->mii_bus->id,MII_BUS_ID_SIZE ,"%s" , mii_np->name); +snprintf (eth->mii_bus->id,MII_BUS_ID_SIZE ,"%pOFn" , mii_np); err =of_mdiobus_register (eth->mii_bus, mii_np);if (err) goto err_free_bus;
Signature · 1 line
2.17.1
Re: [PATCH] staging: Convert to using %pOFn instead of device_node.name
Hi,
Quoted 21 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Steve Longerbeam <[email protected]>Cc Philipp Zabel <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/staging/media/imx/imx-media-dev.c | 11 ++++++----- drivers/staging/media/imx/imx-media-of.c | 4 ++-- drivers/staging/mt7621-eth/mdio.c | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-)drivers/staging/media/imx/imx-media-dev.c +0
-0
drivers/staging/media/imx/imx-media-dev.c int imx_media_add_async_subdev(struct imx_media_dev *imxmd, · line 93
Quoted 7 lines
drivers/staging/media/imx/imx-media-dev.c +2
-2@@ -89,8 +89,8 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,/* return -EEXIST if this asd already added */ if (find_async_subdev (imxmd, fwnode, devname)) { -dev_dbg (imxmd->md.dev,"%s: already added %s\n" , - __func__, np ? np->name : devname); +dev_dbg (imxmd->md.dev,"%s: already added %pOFn\n" , + __func__, np ? np : devname);
This won't work for the np==NULL case I think since devname is just a string.
Regards,
Ian
Quoted 65 lines
drivers/staging/media/imx/imx-media-dev.c +4
-3ret = -EEXIST ; goto out; }@@ -105,19 +105,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd,if (fwnode) { asd->match_type =V4L2_ASYNC_MATCH_FWNODE ; asd->match.fwnode = fwnode; +dev_dbg (imxmd->md.dev,"%s: added %pOFn, match type FWNODE\n" , + __func__, np); }else { asd->match_type =V4L2_ASYNC_MATCH_DEVNAME ; asd->match.device_name = devname; imxasd->pdev = pdev; +dev_dbg (imxmd->md.dev,"%s: added %s, match type DEVNAME\n" , + __func__, devname); }list_add_tail (&imxasd->list, &imxmd->asd_list); imxmd->subdev_notifier.num_subdevs++; -dev_dbg (imxmd->md.dev,"%s: added %s, match type %s\n" , - __func__, np ? np->name : devname, np ?"FWNODE" :"DEVNAME" ); - out:mutex_unlock (&imxmd->mutex);return ret;drivers/staging/media/imx/imx-media-of.c +2
-2@@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np,int i, num_ports, ret;if (!of_device_is_available (sd_np)) { -dev_dbg (imxmd->md.dev,"%s: %s not enabled\n" , __func__, - sd_np->name); +dev_dbg (imxmd->md.dev,"%pOFn: %s not enabled\n" , __func__, + sd_np);/* unavailable is not an error */ return 0 ; }drivers/staging/mt7621-eth/mdio.c +2
-2@@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac, _port =of_get_property (phy_node,"reg" ,NULL );if (!_port || (be32_to_cpu (*_port) >=0x20 )) { -pr_err ("%s: invalid port id\n" , phy_node->name); +pr_err ("%pOFn: invalid port id\n" , phy_node);return -EINVAL ; } port =be32_to_cpu (*_port);@@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth) eth->mii_bus->priv = eth; eth->mii_bus->parent = eth->dev; -snprintf (eth->mii_bus->id,MII_BUS_ID_SIZE ,"%s" , mii_np->name); +snprintf (eth->mii_bus->id,MII_BUS_ID_SIZE ,"%pOFn" , mii_np); err =of_mdiobus_register (eth->mii_bus, mii_np);if (err) goto err_free_bus;
PATCH 1/1 uio: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/uio/uio_fsl_elbc_gpcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/uio/uio_fsl_elbc_gpcm.c +1 -2
@@ -382,8 +382,7 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev) }/* set all UIO data */ -if (node->name) - info->mem[0 ].name =kstrdup (node->name,GFP_KERNEL ); + info->mem[0 ].name =kasprintf (GFP_KERNEL ,"%pOFn" , node); info->mem[0 ].addr = res.start; info->mem[0 ].size =resource_size (&res); info->mem[0 ].memtype =UIO_MEM_PHYS ;
Signature · 1 line
2.17.1
PATCH 1/1 mfd: max77620: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/mfd/max77620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/max77620.c +1 -1
@@ -285,7 +285,7 @@ static int max77620_config_fps(struct max77620_chip *chip, }if (fps_id ==MAX77620_FPS_COUNT ) { -dev_err (dev,"FPS node name %s is not valid\n" , fps_np->name); +dev_err (dev,"FPS node name %pOFn is not valid\n" , fps_np);return -EINVAL ; }
Signature · 1 line
2.17.1
Lee Jones
AppliedRe: [PATCH] mfd: max77620: Convert to using %pOFn instead of device_node.name
Quoted 8 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Lee Jones <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/mfd/max77620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 1/1 media: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
--- drivers/media/i2c/tvp5150.c | 8 ++++---- drivers/media/platform/davinci/vpif_capture.c | 3 +-- drivers/media/platform/ti-vpe/cal.c | 8 ++++---- drivers/media/platform/video-mux.c | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 8 ++++---- 5 files changed, 14 insertions(+), 15 deletions(-)
drivers/media/i2c/tvp5150.c +4 -4
@@ -1403,8 +1403,8 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) ret =of_property_read_u32 (child,"input" , &input_type);if (ret) {dev_err (decoder->sd.dev, -"missing type property in node %s\n" , - child->name); +"missing type property in node %pOFn\n" , + child); goto err_connector; }
@@ -1439,8 +1439,8 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) ret =of_property_read_string (child,"label" , &name);if (ret <0 ) {dev_err (decoder->sd.dev, -"missing label property in node %s\n" , - child->name); +"missing label property in node %pOFn\n" , + child); goto err_connector; }
drivers/media/platform/davinci/vpif_capture.c +1 -2
@@ -1583,8 +1583,7 @@ vpif_capture_get_pdata(struct platform_device *pdev) goto done; } -dev_dbg (&pdev->dev,"Remote device %s, %pOF found\n" , - rem->name, rem); +dev_dbg (&pdev->dev,"Remote device %pOF found\n" , rem); sdinfo->name = rem->full_name; pdata->asd[i] = devm_kzalloc(&pdev->dev,
drivers/media/platform/ti-vpe/cal.c +4 -4
@@ -1712,8 +1712,8 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst)v4l2_fwnode_endpoint_parse (of_fwnode_handle (remote_ep), endpoint);if (endpoint->bus_type !=V4L2_MBUS_CSI2 ) { -ctx_err (ctx,"Port:%d sub-device %s is not a CSI2 device\n" , - inst, sensor_node->name); +ctx_err (ctx,"Port:%d sub-device %pOFn is not a CSI2 device\n" , + inst, sensor_node); goto cleanup_exit; }
@@ -1732,8 +1732,8 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst) endpoint->bus.mipi_csi2.data_lanes[lane]);ctx_dbg (3 , ctx,"\t>\n" ); -ctx_dbg (1 , ctx,"Port: %d found sub-device %s\n" , - inst, sensor_node->name); +ctx_dbg (1 , ctx,"Port: %d found sub-device %pOFn\n" , + inst, sensor_node); ctx->asd_list[0 ] = asd; ctx->notifier.subdevs = ctx->asd_list;
drivers/media/platform/video-mux.c +1 -1
@@ -333,7 +333,7 @@ static int video_mux_probe(struct platform_device *pdev)platform_set_drvdata (pdev, vmux);v4l2_subdev_init (&vmux->subdev, &video_mux_subdev_ops); -snprintf (vmux->subdev.name,sizeof (vmux->subdev.name),"%s" , np->name); +snprintf (vmux->subdev.name,sizeof (vmux->subdev.name),"%pOFn" , np); vmux->subdev.flags |=V4L2_SUBDEV_FL_HAS_DEVNODE ; vmux->subdev.dev = dev;
drivers/media/platform/xilinx/xilinx-dma.c +4 -4
@@ -506,8 +506,8 @@ xvip_dma_querycap(struct file *file, void *fh, struct v4l2_capability *cap)strlcpy (cap->driver,"xilinx-vipp" ,sizeof (cap->driver));strlcpy (cap->card, dma->video.name,sizeof (cap->card)); -snprintf (cap->bus_info,sizeof (cap->bus_info),"platform:%s:%u" , - dma->xdev->dev->of_node->name, dma->port); +snprintf (cap->bus_info,sizeof (cap->bus_info),"platform:%pOFn:%u" , + dma->xdev->dev->of_node, dma->port);return 0 ; }
@@ -693,8 +693,8 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma, dma->video.fops = &xvip_dma_fops; dma->video.v4l2_dev = &xdev->v4l2_dev; dma->video.queue = &dma->queue; -snprintf (dma->video.name,sizeof (dma->video.name),"%s %s %u" , - xdev->dev->of_node->name, +snprintf (dma->video.name,sizeof (dma->video.name),"%pOFn %s %u" , + xdev->dev->of_node, type ==V4L2_BUF_TYPE_VIDEO_CAPTURE ?"output" :"input" , port); dma->video.vfl_type =VFL_TYPE_GRABBER ;
Signature · 1 line
2.17.1
Re: [PATCH] media: Convert to using %pOFn instead of device_node.name
Hi Rob,
Thank you for the patch.
Quoted 12 lines · On Tuesday, 28 August 2018 04:52:29 EEST Rob Herring wrote:
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Mauro Carvalho Chehab <[email protected]>Cc "Lad, Prabhakar" <[email protected]>Cc Benoit Parrot <[email protected]>Cc Philipp Zabel <[email protected]>Cc Hyun Kwon <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Michal Simek <[email protected]>Signed-off-by Rob Herring <[email protected]>
Which tree would you like to merge this through ?
Quoted 121 lines
--- drivers/media/i2c/tvp5150.c | 8 ++++---- drivers/media/platform/davinci/vpif_capture.c | 3 +-- drivers/media/platform/ti-vpe/cal.c | 8 ++++---- drivers/media/platform/video-mux.c | 2 +- drivers/media/platform/xilinx/xilinx-dma.c | 8 ++++---- 5 files changed, 14 insertions(+), 15 deletions(-)drivers/media/i2c/tvp5150.c +4
-4@@ -1403,8 +1403,8 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) ret = of_property_read_u32(child, "input", &input_type);if (ret) {dev_err (decoder->sd.dev, -"missing type property in node %s\n" , - child->name); +"missing type property in node %pOFn\n" , + child); goto err_connector; }@@ -1439,8 +1439,8 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) ret = of_property_read_string(child, "label", &name);if (ret <0 ) {dev_err (decoder->sd.dev, -"missing label property in node %s\n" , - child->name); +"missing label property in node %pOFn\n" , + child); goto err_connector; }(quoted diff) +0
-0
b/drivers/media/platform/davinci/vpif_capture.cindexa96f53ce8088..35fc69591d54100644drivers/media/platform/davinci/vpif_capture.c +1
-2@@ -1583,8 +1583,7 @@ vpif_capture_get_pdata(struct platform_device *pdev) goto done; } -dev_dbg (&pdev->dev,"Remote device %s, %pOF found\n" , - rem->name, rem); +dev_dbg (&pdev->dev,"Remote device %pOF found\n" , rem); sdinfo->name = rem->full_name; pdata->asd[i] = devm_kzalloc(&pdev->dev,(quoted diff) +0
-0
b/drivers/media/platform/ti-vpe/cal.cindexd1febe5baa6d..77d755020e78100644drivers/media/platform/ti-vpe/cal.c +4
-4@@ -1712,8 +1712,8 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst) v4l2_fwnode_endpoint_parse(of_fwnode_handle(remote_ep),endpoint );if (endpoint->bus_type !=V4L2_MBUS_CSI2 ) { -ctx_err (ctx,"Port:%d sub-device %s is not a CSI2 device\n" , - inst, sensor_node->name); +ctx_err (ctx,"Port:%d sub-device %pOFn is not a CSI2 device\n" , + inst, sensor_node); goto cleanup_exit; }@@ -1732,8 +1732,8 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst) endpoint->bus.mipi_csi2.data_lanes[lane]);ctx_dbg (3 , ctx,"\t>\n" ); -ctx_dbg (1 , ctx,"Port: %d found sub-device %s\n" , - inst, sensor_node->name); +ctx_dbg (1 , ctx,"Port: %d found sub-device %pOFn\n" , + inst, sensor_node); ctx->asd_list[0 ] = asd; ctx->notifier.subdevs = ctx->asd_list;(quoted diff) +0
-0
b/drivers/media/platform/video-mux.cindexc01e1592ad0a..61a9bf716a05100644drivers/media/platform/video-mux.c +1
-1@@ -333,7 +333,7 @@ static int video_mux_probe(struct platform_device *pdev)platform_set_drvdata (pdev, vmux);v4l2_subdev_init (&vmux->subdev, &video_mux_subdev_ops); -snprintf (vmux->subdev.name,sizeof (vmux->subdev.name),"%s" , np->name); +snprintf (vmux->subdev.name,sizeof (vmux->subdev.name),"%pOFn" , np); vmux->subdev.flags |=V4L2_SUBDEV_FL_HAS_DEVNODE ; vmux->subdev.dev = dev;(quoted diff) +0
-0
b/drivers/media/platform/xilinx/xilinx-dma.cindexd041f94be832..3c8fcf951c63100644drivers/media/platform/xilinx/xilinx-dma.c +2
-2@@ -506,8 +506,8 @@ xvip_dma_querycap(struct file *file, void *fh, struct v4l2_capability *cap) strlcpy(cap->driver, "xilinx-vipp", sizeof(cap->driver));strlcpy (cap->card, dma->video.name,sizeof (cap->card)); -snprintf (cap->bus_info,sizeof (cap->bus_info),"platform:%s:%u" , - dma->xdev->dev->of_node->name, dma->port); +snprintf (cap->bus_info,sizeof (cap->bus_info),"platform:%pOFn:%u" , + dma->xdev->dev->of_node, dma->port);return 0 ;}
drivers/media/platform/xilinx/xilinx-dma.c +2
-2@@ -693,8 +693,8 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma, dma->video.fops = &xvip_dma_fops; dma->video.v4l2_dev = &xdev->v4l2_dev; dma->video.queue = &dma->queue; -snprintf (dma->video.name,sizeof (dma->video.name),"%s %s %u" , - xdev->dev->of_node->name, +snprintf (dma->video.name,sizeof (dma->video.name),"%pOFn %s %u" , + xdev->dev->of_node, type ==V4L2_BUF_TYPE_VIDEO_CAPTURE ?"output" :"input" , port); dma->video.vfl_type =VFL_TYPE_GRABBER ;
Signature · 3 lines
Regards, Laurent Pinchart
Re: [PATCH] media: Convert to using %pOFn instead of device_node.name
Quoted 19 lines · Laurent Pinchart
Hi Rob,
Thank you for the patch.
Quoted 12 lines · On Tuesday, 28 August 2018 04:52:29 EEST Rob Herring wrote:
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Mauro Carvalho Chehab <[email protected]>Cc "Lad, Prabhakar" <[email protected]>Cc Benoit Parrot <[email protected]>Cc Philipp Zabel <[email protected]>Cc Hyun Kwon <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Michal Simek <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 3 lines
Reviewed-by Laurent Pinchart <[email protected]>Which tree would you like to merge this through ?
Media tree. There's no dependency.
Rob
Re: [PATCH] media: Convert to using %pOFn instead of device_node.name
Em Tue, 28 Aug 2018 07:21:46 -0500
Rob Herring <[email protected]> escreveu:
Quoted 21 lines
Quoted 19 lines · Laurent Pinchart
Hi Rob,
Thank you for the patch.
Quoted 12 lines · On Tuesday, 28 August 2018 04:52:29 EEST Rob Herring wrote:
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Mauro Carvalho Chehab <[email protected]>Cc "Lad, Prabhakar" <[email protected]>Cc Benoit Parrot <[email protected]>Cc Philipp Zabel <[email protected]>Cc Hyun Kwon <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Michal Simek <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 5 lines
Quoted 3 lines
Reviewed-by Laurent Pinchart <[email protected]>Which tree would you like to merge this through ?
Media tree. There's no dependency.
Ok. I'm applying it.
Quoted 2 lines
Rob
Thanks,
Mauro
Quoted 2 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
[]
arch/arm/mach-omap2/omap_hwmod.c
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod.c +0
-0
[]
arch/arm/mach-omap2/omap_hwmod.c static int __init _setup_clkctrl_provider(struct device_node *np) · line 741
Quoted 6 lines
arch/arm/mach-omap2/omap_hwmod.c +1
-1@@ -738,7 +738,7 @@ static int __init _setup_clkctrl_provider(struct device_node *np) provider->size = size |0xff ; provider->node = np; - pr_debug("%s: %s: %x...%x [+%x]\n", __func__, np->parent->name, + pr_debug("%pOF: %s: %x...%x [+%x]\n", __func__, np->parent,
Wrong argument order
I didn't look at the rest.
PATCH v2 1/1 ARM: omap: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
---
v2:
- fix error in format specifier position
arch/arm/mach-omap2/omap_hwmod.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +11 -11
@@ -738,7 +738,7 @@ static int __init _setup_clkctrl_provider(struct device_node *np) provider->size = size |0xff ; provider->node = np; -pr_debug ("%s: %s: %x...%x [+%x]\n" , __func__, np->parent->name, +pr_debug ("%s: %pOFn: %x...%x [+%x]\n" , __func__, np->parent, provider->addr, provider->addr + provider->size, provider->offset);
@@ -799,9 +799,9 @@ static struct clk *_lookup_clkctrl_clk(struct omap_hwmod *oh) clk =of_clk_get_from_provider (&clkspec); -pr_debug ("%s: %s got %p (offset=%x, provider=%s)\n" , +pr_debug ("%s: %s got %p (offset=%x, provider=%pOFn)\n" , __func__, oh->name, clk, clkspec.args[0 ], - provider->node->parent->name); + provider->node->parent);return clk; }
@@ -2107,8 +2107,8 @@ static int of_dev_find_hwmod(struct device_node *np,if (res)continue ;if (!strcmp (p, oh->name)) { -pr_debug ("omap_hwmod: dt %s[%i] uses hwmod %s\n" , - np->name, i, oh->name); +pr_debug ("omap_hwmod: dt %pOFn[%i] uses hwmod %s\n" , + np, i, oh->name);return i; } }
@@ -2210,8 +2210,8 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh,return -ENOENT ;if (nr_addr !=1 || nr_size !=1 ) { -pr_err ("%s: invalid range for %s->%s\n" , __func__, - oh->name, np->name); +pr_err ("%s: invalid range for %s->%pOFn\n" , __func__, + oh->name, np);return -EINVAL ; }
@@ -2219,8 +2219,8 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh, base =of_translate_address (np, ranges++); size =be32_to_cpup (ranges); -pr_debug ("omap_hwmod: %s %s at 0x%llx size 0x%llx\n" , - oh->name, np->name, base, size); +pr_debug ("omap_hwmod: %s %pOFn at 0x%llx size 0x%llx\n" , + oh->name, np, base, size); res->start = base; res->end = base + size -1 ;
@@ -2322,8 +2322,8 @@ static int __init _init(struct omap_hwmod *oh, void *data)if (r)pr_debug ("omap_hwmod: %s missing dt data\n" , oh->name);else if (np && index) -pr_warn ("omap_hwmod: %s using broken dt data from %s\n" , - oh->name, np->name); +pr_warn ("omap_hwmod: %s using broken dt data from %pOFn\n" , + oh->name, np); r =_init_mpu_rt_base (oh,NULL , index, np);if (r <0 ) {
--
2.17.1
PATCH v2 1/1 ASoC: Convert to using %pOFn instead of device_node.name
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
---
v2:
- stm32_sai_sub: Unwrap now shorter line
sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_utils.c | 4 ++-- sound/soc/meson/axg-card.c | 2 +- sound/soc/stm/stm32_sai.c | 2 +- sound/soc/stm/stm32_sai_sub.c | 7 +++---- 5 files changed, 8 insertions(+), 9 deletions(-)
sound/soc/fsl/fsl_esai.c +1 -1
@@ -807,7 +807,7 @@ static int fsl_esai_probe(struct platform_device *pdev)return -ENOMEM ; esai_priv->pdev = pdev; -strncpy (esai_priv->name, np->name,sizeof (esai_priv->name) -1 ); +snprintf (esai_priv->name,sizeof (esai_priv->name),"%pOFn" , np);/* Get the addresses and IRQ */ res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
sound/soc/fsl/fsl_utils.c +2 -2
@@ -57,8 +57,8 @@ int fsl_asoc_get_dma_channel(struct device_node *ssi_np,of_node_put (dma_channel_np);return ret; } -snprintf ((char *)dai->platform_name,DAI_NAME_SIZE ,"%llx.%s" , - (unsigned long long ) res.start, dma_channel_np->name); +snprintf ((char *)dai->platform_name,DAI_NAME_SIZE ,"%llx.%pOFn" , + (unsigned long long ) res.start, dma_channel_np); iprop =of_get_property (dma_channel_np,"cell-index" ,NULL );if (!iprop) {
sound/soc/meson/axg-card.c +1 -1
@@ -478,7 +478,7 @@ static int axg_card_set_be_link(struct snd_soc_card *card, ret =axg_card_set_link_name (card, link,"be" );if (ret) -dev_err (card->dev,"error setting %s link name\n" , np->name); +dev_err (card->dev,"error setting %pOFn link name\n" , np);return ret; }
sound/soc/stm/stm32_sai.c +1 -1
@@ -104,7 +104,7 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client,if (!pdev) {dev_err (&sai_client->pdev->dev, -"Device not found for node %s\n" , np_provider->name); +"Device not found for node %pOFn\n" , np_provider);return -ENODEV ; }
sound/soc/stm/stm32_sai_sub.c +3 -4
@@ -1124,16 +1124,15 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev, sai->sync =SAI_SYNC_NONE ;if (args.np) {if (args.np == np) { -dev_err (&pdev->dev,"%s sync own reference\n" , - np->name); +dev_err (&pdev->dev,"%pOFn sync own reference\n" , np);of_node_put (args.np);return -EINVAL ; } sai->np_sync_provider =of_get_parent (args.np);if (!sai->np_sync_provider) { -dev_err (&pdev->dev,"%s parent node not found\n" , - np->name); +dev_err (&pdev->dev,"%pOFn parent node not found\n" , + np);of_node_put (args.np);return -ENODEV ; }
--
2.17.1
Mark Brown
maintainerRe: [PATCH v2] ASoC: Convert to using %pOFn instead of device_node.name
Quoted 2 lines · Rob Herring
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.
Please don't send new patches in reply to existing threads, it makes it
harder to follow what the current versions of things are.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20180828/5f34695f/attachment.sig>
PATCH v2 1/1 clk: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
---
v2:
- fix warning in clk/ti/composite.c
drivers/clk/axs10x/pll_clock.c | 4 ++-- drivers/clk/bcm/clk-kona-setup.c | 22 +++++++++++----------- drivers/clk/clk-asm9260.c | 4 ++-- drivers/clk/clk-cdce925.c | 10 +++++----- drivers/clk/clk-fixed-factor.c | 8 ++++---- drivers/clk/clk-gpio.c | 8 ++++---- drivers/clk/clk-hsdk-pll.c | 4 ++-- drivers/clk/clk-nomadik.c | 4 ++-- drivers/clk/clk-npcm7xx.c | 2 +- drivers/clk/clk-palmas.c | 4 ++-- drivers/clk/clk-qoriq.c | 14 +++++++------- drivers/clk/clk-scmi.c | 2 +- drivers/clk/clk-scpi.c | 6 +++--- drivers/clk/clk-si5351.c | 4 ++-- drivers/clk/clk-stm32f4.c | 2 +- drivers/clk/clk-stm32h7.c | 2 +- drivers/clk/clk-stm32mp1.c | 2 +- drivers/clk/clk-tango4.c | 10 +++++----- drivers/clk/keystone/gate.c | 2 +- drivers/clk/keystone/pll.c | 2 +- drivers/clk/renesas/clk-div6.c | 12 ++++++------ drivers/clk/renesas/clk-emev2.c | 8 ++++---- drivers/clk/renesas/clk-mstp.c | 8 ++++---- drivers/clk/renesas/clk-r8a73a4.c | 4 ++-- drivers/clk/renesas/clk-r8a7740.c | 4 ++-- drivers/clk/renesas/clk-r8a7778.c | 4 ++-- drivers/clk/renesas/clk-r8a7779.c | 4 ++-- drivers/clk/renesas/clk-rcar-gen2.c | 4 ++-- drivers/clk/renesas/clk-rz.c | 4 ++-- drivers/clk/renesas/clk-sh73a0.c | 4 ++-- drivers/clk/st/clkgen-fsyn.c | 2 +- drivers/clk/sunxi/clk-mod0.c | 6 +++--- drivers/clk/sunxi/clk-sun9i-core.c | 20 ++++++++++---------- drivers/clk/sunxi/clk-sunxi.c | 4 ++-- drivers/clk/ti/apll.c | 18 +++++++++--------- drivers/clk/ti/clk-dra7-atl.c | 4 ++-- drivers/clk/ti/clk.c | 10 +++++----- drivers/clk/ti/clkctrl.c | 14 ++++++-------- drivers/clk/ti/composite.c | 14 +++++++------- drivers/clk/ti/divider.c | 4 ++-- drivers/clk/ti/dpll.c | 12 ++++++------ drivers/clk/ti/fapll.c | 8 ++++---- drivers/clk/ti/fixed-factor.c | 4 ++-- drivers/clk/ti/gate.c | 2 +- drivers/clk/ti/interface.c | 2 +- drivers/clk/ti/mux.c | 4 ++-- drivers/clk/zynq/clkc.c | 4 ++-- 47 files changed, 151 insertions(+), 153 deletions(-)
drivers/clk/axs10x/pll_clock.c +2 -2
@@ -301,13 +301,13 @@ static void __init of_axs10x_pll_clk_setup(struct device_node *node) ret =clk_hw_register (NULL , &pll_clk->hw);if (ret) { -pr_err ("failed to register %s clock\n" , node->name); +pr_err ("failed to register %pOFn clock\n" , node); goto err_unmap_lock; } ret =of_clk_add_hw_provider (node, of_clk_hw_simple_get, &pll_clk->hw);if (ret) { -pr_err ("failed to add hw provider for %s clock\n" , node->name); +pr_err ("failed to add hw provider for %pOFn clock\n" , node); goto err_unregister_clk; }
drivers/clk/bcm/clk-kona-setup.c +11 -11
@@ -808,29 +808,29 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu, ret =of_address_to_resource (node,0 , &res);if (ret) { -pr_err ("%s: no valid CCU registers found for %s\n" , __func__, - node->name); +pr_err ("%s: no valid CCU registers found for %pOFn\n" , __func__, + node); goto out_err; } range =resource_size (&res);if (range > (resource_size_t )U32_MAX ) { -pr_err ("%s: address range too large for %s\n" , __func__, - node->name); +pr_err ("%s: address range too large for %pOFn\n" , __func__, + node); goto out_err; } ccu->range = (u32 )range;if (!ccu_data_valid (ccu)) { -pr_err ("%s: ccu data not valid for %s\n" , __func__, node->name); +pr_err ("%s: ccu data not valid for %pOFn\n" , __func__, node); goto out_err; } ccu->base =ioremap (res.start, ccu->range);if (!ccu->base) { -pr_err ("%s: unable to map CCU registers for %s\n" , __func__, - node->name); +pr_err ("%s: unable to map CCU registers for %pOFn\n" , __func__, + node); goto out_err; } ccu->node =of_node_get (node);
@@ -848,16 +848,16 @@ void __init kona_dt_ccu_setup(struct ccu_data *ccu, ret =of_clk_add_hw_provider (node, of_clk_kona_onecell_get, ccu);if (ret) { -pr_err ("%s: error adding ccu %s as provider (%d)\n" , __func__, - node->name, ret); +pr_err ("%s: error adding ccu %pOFn as provider (%d)\n" , __func__, + node, ret); goto out_err; }if (!kona_ccu_init (ccu)) -pr_err ("Broadcom %s initialization had errors\n" , node->name); +pr_err ("Broadcom %pOFn initialization had errors\n" , node);return ; out_err:kona_ccu_teardown (ccu); -pr_err ("Broadcom %s setup aborted\n" , node->name); +pr_err ("Broadcom %pOFn setup aborted\n" , node); }
drivers/clk/clk-asm9260.c +2 -2
@@ -281,7 +281,7 @@ static void __init asm9260_acc_init(struct device_node *np) base =of_io_request_and_map (np,0 , np->name);if (IS_ERR (base)) -panic ("%s: unable to map resource" , np->name); +panic ("%pOFn: unable to map resource" , np);/* register pll */ rate = (ioread32 (base +HW_SYSPLLCTRL ) &0xffff ) *1000000 ;
@@ -292,7 +292,7 @@ static void __init asm9260_acc_init(struct device_node *np) ref_clk, 0, rate, accuracy);if (IS_ERR (hw)) -panic ("%s: can't register REFCLK. Check DT!" , np->name); +panic ("%pOFn: can't register REFCLK. Check DT!" , np);for (n =0 ; n <ARRAY_SIZE (asm9260_mux_clks); n++) {const struct asm9260_mux_clock *mc = &asm9260_mux_clks[n];
drivers/clk/clk-cdce925.c +5 -5
@@ -669,8 +669,8 @@ static int cdce925_probe(struct i2c_client *client,/* Register PLL clocks */ for (i =0 ; i < data->chip_info->num_plls; ++i) { - pll_clk_name[i] =kasprintf (GFP_KERNEL ,"%s.pll%d" , - client->dev.of_node->name, i); + pll_clk_name[i] =kasprintf (GFP_KERNEL ,"%pOFn.pll%d" , + client->dev.of_node, i); init.name = pll_clk_name[i]; data->pll[i].chip = data; data->pll[i].hw.init = &init;
@@ -710,7 +710,7 @@ static int cdce925_probe(struct i2c_client *client, init.flags =0 ; init.num_parents =1 ; init.parent_names = &parent_name;/* Mux Y1 to input */ - init.name =kasprintf (GFP_KERNEL ,"%s.Y1" , client->dev.of_node->name); + init.name =kasprintf (GFP_KERNEL ,"%pOFn.Y1" , client->dev.of_node); data->clk[0 ].chip = data; data->clk[0 ].hw.init = &init; data->clk[0 ].index =0 ;
@@ -727,8 +727,8 @@ static int cdce925_probe(struct i2c_client *client, init.flags =CLK_SET_RATE_PARENT ; init.num_parents =1 ;for (i =1 ; i < data->chip_info->num_outputs; ++i) { - init.name =kasprintf (GFP_KERNEL ,"%s.Y%d" , - client->dev.of_node->name, i+1 ); + init.name =kasprintf (GFP_KERNEL ,"%pOFn.Y%d" , + client->dev.of_node, i+1 ); data->clk[i].chip = data; data->clk[i].hw.init = &init; data->clk[i].index = i;
drivers/clk/clk-fixed-factor.c +4 -4
@@ -158,14 +158,14 @@ static struct clk *_of_fixed_factor_clk_setup(struct device_node *node)int ret;if (of_property_read_u32 (node,"clock-div" , &div)) { -pr_err ("%s Fixed factor clock <%s> must have a clock-div property\n" , - __func__, node->name); +pr_err ("%s Fixed factor clock <%pOFn> must have a clock-div property\n" , + __func__, node);return ERR_PTR (-EIO ); }if (of_property_read_u32 (node,"clock-mult" , &mult)) { -pr_err ("%s Fixed factor clock <%s> must have a clock-mult property\n" , - __func__, node->name); +pr_err ("%s Fixed factor clock <%pOFn> must have a clock-mult property\n" , + __func__, node);return ERR_PTR (-EIO ); }
drivers/clk/clk-gpio.c +4 -4
@@ -233,11 +233,11 @@ static int gpio_clk_driver_probe(struct platform_device *pdev)if (IS_ERR (gpiod)) { ret =PTR_ERR (gpiod);if (ret == -EPROBE_DEFER ) -pr_debug ("%s: %s: GPIOs not yet available, retry later\n" , - node->name, __func__); +pr_debug ("%pOFn: %s: GPIOs not yet available, retry later\n" , + node, __func__);else -pr_err ("%s: %s: Can't get '%s' named GPIO property\n" , - node->name, __func__, +pr_err ("%pOFn: %s: Can't get '%s' named GPIO property\n" , + node, __func__, gpio_name);return ret; }
drivers/clk/clk-hsdk-pll.c +2 -2
@@ -390,13 +390,13 @@ static void __init of_hsdk_pll_clk_setup(struct device_node *node) ret =clk_hw_register (NULL , &pll_clk->hw);if (ret) { -pr_err ("failed to register %s clock\n" , node->name); +pr_err ("failed to register %pOFn clock\n" , node); goto err_unmap_spec_regs; } ret =of_clk_add_hw_provider (node, of_clk_hw_simple_get, &pll_clk->hw);if (ret) { -pr_err ("failed to add hw provider for %s clock\n" , node->name); +pr_err ("failed to add hw provider for %pOFn clock\n" , node); goto err_unmap_spec_regs; }
drivers/clk/clk-nomadik.c +2 -2
@@ -97,8 +97,8 @@ static void __init nomadik_src_init(void) } src_base =of_iomap (np,0 );if (!src_base) { -pr_err ("%s: must have src parent node with REGS (%s)\n" , - __func__, np->name); +pr_err ("%s: must have src parent node with REGS (%pOFn)\n" , + __func__, np);return ; }
drivers/clk/clk-npcm7xx.c +1 -1
@@ -549,7 +549,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np) ret =of_address_to_resource (clk_np,0 , &res);if (ret) { -pr_err ("%s: failed to get resource, ret %d\n" , clk_np->name, +pr_err ("%pOFn: failed to get resource, ret %d\n" , clk_np, ret);return ; }
drivers/clk/clk-palmas.c +2 -2
@@ -195,8 +195,8 @@ static void palmas_clks_get_clk_data(struct platform_device *pdev, prop =PALMAS_EXT_CONTROL_NSLEEP ;break ;default : -dev_warn (&pdev->dev,"%s: Invalid ext control option: %u\n" , - node->name, prop); +dev_warn (&pdev->dev,"%pOFn: Invalid ext control option: %u\n" , + node, prop); prop =0 ;break ; }
drivers/clk/clk-qoriq.c +7 -7
@@ -945,8 +945,8 @@ static void __init core_mux_init(struct device_node *np) rc =of_clk_add_provider (np, of_clk_src_simple_get, clk);if (rc) { -pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , - __func__, np->name, rc); +pr_err ("%s: Couldn't register clk provider for node %pOFn: %d\n" , + __func__, np, rc);return ; } }
@@ -1199,8 +1199,8 @@ static void __init legacy_pll_init(struct device_node *np, int idx) rc =of_clk_add_provider (np, of_clk_src_onecell_get, onecell_data);if (rc) { -pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , - __func__, np->name, rc); +pr_err ("%s: Couldn't register clk provider for node %pOFn: %d\n" , + __func__, np, rc); goto err_cell; }
@@ -1360,7 +1360,7 @@ static void __init clockgen_init(struct device_node *np) is_old_ls1021a = true; }if (!clockgen.regs) { -pr_err ("%s(): %s: of_iomap() failed\n" , __func__, np->name); +pr_err ("%s(): %pOFn: of_iomap() failed\n" , __func__, np);return ; }
@@ -1406,8 +1406,8 @@ static void __init clockgen_init(struct device_node *np) ret =of_clk_add_provider (np, clockgen_clk_get, &clockgen);if (ret) { -pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , - __func__, np->name, ret); +pr_err ("%s: Couldn't register clk provider for node %pOFn: %d\n" , + __func__, np, ret); }return ;
drivers/clk/clk-scmi.c +1 -1
@@ -132,7 +132,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev) count = handle->clk_ops->count_get (handle);if (count <0 ) { -dev_err (dev,"%s: invalid clock output count\n" , np->name); +dev_err (dev,"%pOFn: invalid clock output count\n" , np);return -EINVAL ; }
drivers/clk/clk-scpi.c +3 -3
@@ -207,7 +207,7 @@ static int scpi_clk_add(struct device *dev, struct device_node *np, count =of_property_count_strings (np,"clock-output-names" );if (count <0 ) { -dev_err (dev,"%s: invalid clock output count\n" , np->name); +dev_err (dev,"%pOFn: invalid clock output count\n" , np);return -EINVAL ; }
@@ -232,13 +232,13 @@ static int scpi_clk_add(struct device *dev, struct device_node *np,if (of_property_read_string_index (np,"clock-output-names" , idx, &name)) { -dev_err (dev,"invalid clock name @ %s\n" , np->name); +dev_err (dev,"invalid clock name @ %pOFn\n" , np);return -EINVAL ; }if (of_property_read_u32_index (np,"clock-indices" , idx, &val)) { -dev_err (dev,"invalid clock index @ %s\n" , np->name); +dev_err (dev,"invalid clock index @ %pOFn\n" , np);return -EINVAL ; }
drivers/clk/clk-si5351.c +2 -2
@@ -1215,8 +1215,8 @@ static int si5351_dt_parse(struct i2c_client *client,/* per clkout properties */ for_each_child_of_node (np, child) {if (of_property_read_u32 (child,"reg" , &num)) { -dev_err (&client->dev,"missing reg property of %s\n" , - child->name); +dev_err (&client->dev,"missing reg property of %pOFn\n" , + child); goto put_child; }
drivers/clk/clk-stm32f4.c +1 -1
@@ -1433,7 +1433,7 @@ static void __init stm32f4_rcc_init(struct device_node *np) base =of_iomap (np,0 );if (!base) { -pr_err ("%s: unable to map resource\n" , np->name); +pr_err ("%pOFn: unable to map resource\n" , np);return ; }
drivers/clk/clk-stm32h7.c +1 -1
@@ -1216,7 +1216,7 @@ static void __init stm32h7_rcc_init(struct device_node *np)/* get RCC base @ from DT */ base =of_iomap (np,0 );if (!base) { -pr_err ("%s: unable to map resource" , np->name); +pr_err ("%pOFn: unable to map resource" , np); goto err_free_clks; }
drivers/clk/clk-stm32mp1.c +1 -1
@@ -2088,7 +2088,7 @@ static void stm32mp1_rcc_init(struct device_node *np) base =of_iomap (np,0 );if (!base) { -pr_err ("%s: unable to map resource" , np->name); +pr_err ("%pOFn: unable to map resource" , np);of_node_put (np);return ; }
drivers/clk/clk-tango4.c +5 -5
@@ -54,13 +54,13 @@ static void __init tango4_clkgen_setup(struct device_node *np)const char *parent =of_clk_get_parent_name (np,0 );if (!base) -panic ("%s: invalid address\n" , np->name); +panic ("%pOFn: invalid address\n" , np);if (readl (base +CPUCLK_DIV ) &DIV_BYPASS ) -panic ("%s: unsupported cpuclk setup\n" , np->name); +panic ("%pOFn: unsupported cpuclk setup\n" , np);if (readl (base +SYSCLK_DIV ) &DIV_BYPASS ) -panic ("%s: unsupported sysclk setup\n" , np->name); +panic ("%pOFn: unsupported sysclk setup\n" , np);writel (0x100 , base +CPUCLK_DIV );/* disable frequency ramping */
@@ -77,9 +77,9 @@ static void __init tango4_clkgen_setup(struct device_node *np) pp[3 ] =clk_register_fixed_factor (NULL ,"sdio_clk" ,"cd6" ,0 ,1 ,2 );if (IS_ERR (pp[0 ]) ||IS_ERR (pp[1 ]) ||IS_ERR (pp[2 ]) ||IS_ERR (pp[3 ])) -panic ("%s: clk registration failed\n" , np->name); +panic ("%pOFn: clk registration failed\n" , np);if (of_clk_add_provider (np, of_clk_src_onecell_get, &clk_data)) -panic ("%s: clk provider registration failed\n" , np->name); +panic ("%pOFn: clk provider registration failed\n" , np); }CLK_OF_DECLARE (tango4_clkgen,"sigma,tango4-clkgen" , tango4_clkgen_setup);
drivers/clk/keystone/gate.c +1 -1
@@ -245,7 +245,7 @@ static void __init of_psc_clk_init(struct device_node *node, spinlock_t *lock)return ; } -pr_err ("%s: error registering clk %s\n" , __func__, node->name); +pr_err ("%s: error registering clk %pOFn\n" , __func__, node); unmap_domain:iounmap (data->domain_base);
drivers/clk/keystone/pll.c +1 -1
@@ -219,7 +219,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl) } out: -pr_err ("%s: error initializing pll %s\n" , __func__, node->name); +pr_err ("%s: error initializing pll %pOFn\n" , __func__, node);kfree (pll_data); }
drivers/clk/renesas/clk-div6.c +6 -6
@@ -312,8 +312,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) num_parents =of_clk_get_parent_count (np);if (num_parents <1 ) { -pr_err ("%s: no parent found for %s DIV6 clock\n" , - __func__, np->name); +pr_err ("%s: no parent found for %pOFn DIV6 clock\n" , + __func__, np);return ; }
@@ -324,8 +324,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) reg =of_iomap (np,0 );if (reg ==NULL ) { -pr_err ("%s: failed to map %s DIV6 clock register\n" , - __func__, np->name); +pr_err ("%s: failed to map %pOFn DIV6 clock register\n" , + __func__, np); goto error; }
@@ -337,8 +337,8 @@ static void __init cpg_div6_clock_init(struct device_node *np) clk =cpg_div6_register (clk_name, num_parents, parent_names, reg,NULL );if (IS_ERR (clk)) { -pr_err ("%s: failed to register %s DIV6 clock (%ld)\n" , - __func__, np->name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn DIV6 clock (%ld)\n" , + __func__, np,PTR_ERR (clk)); goto error; }
drivers/clk/renesas/clk-emev2.c +4 -4
@@ -86,8 +86,8 @@ static void __init emev2_smu_clkdiv_init(struct device_node *np) clk =clk_register_divider (NULL , np->name, parent_name,0 , smu_base + reg[0 ], reg[1 ],8 ,0 , &lock);of_clk_add_provider (np, of_clk_src_simple_get, clk); -clk_register_clkdev (clk, np->name,NULL ); -pr_debug ("## %s %s %p\n" , __func__, np->name, clk); +clk_register_clkdev (clk, np->full_name,NULL ); +pr_debug ("## %s %pOFn %p\n" , __func__, np, clk); }CLK_OF_DECLARE (emev2_smu_clkdiv,"renesas,emev2-smu-clkdiv" , emev2_smu_clkdiv_init);
@@ -104,7 +104,7 @@ static void __init emev2_smu_gclk_init(struct device_node *np) clk =clk_register_gate (NULL , np->name, parent_name,0 , smu_base + reg[0 ], reg[1 ],0 , &lock);of_clk_add_provider (np, of_clk_src_simple_get, clk); -clk_register_clkdev (clk, np->name,NULL ); -pr_debug ("## %s %s %p\n" , __func__, np->name, clk); +clk_register_clkdev (clk, np->full_name,NULL ); +pr_debug ("## %s %pOFn %p\n" , __func__, np, clk); }CLK_OF_DECLARE (emev2_smu_gclk,"renesas,emev2-smu-gclk" , emev2_smu_gclk_init);
drivers/clk/renesas/clk-mstp.c +4 -4
@@ -239,8 +239,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)break ;if (clkidx >=MSTP_MAX_CLOCKS ) { -pr_err ("%s: invalid clock %s %s index %u\n" , - __func__, np->name, name, clkidx); +pr_err ("%s: invalid clock %pOFn %s index %u\n" , + __func__, np, name, clkidx);continue ; }
@@ -259,8 +259,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)*/ clk_register_clkdev (clks[clkidx], name,NULL ); }else { -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clks[clkidx])); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clks[clkidx])); } }
drivers/clk/renesas/clk-r8a73a4.c +2 -2
@@ -228,8 +228,8 @@ static void __init r8a73a4_cpg_clocks_init(struct device_node *np) clk =r8a73a4_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-r8a7740.c +2 -2
@@ -187,8 +187,8 @@ static void __init r8a7740_cpg_clocks_init(struct device_node *np) clk =r8a7740_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-r8a7778.c +2 -2
@@ -130,8 +130,8 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np) clk =r8a7778_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-r8a7779.c +2 -2
@@ -164,8 +164,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np) clk =r8a7779_cpg_register_clock (np, cpg, config, plla_mult, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-rcar-gen2.c +2 -2
@@ -445,8 +445,8 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np) clk =rcar_gen2_cpg_register_clock (np, cpg, config, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-rz.c +2 -2
@@ -113,8 +113,8 @@ static void __init rz_cpg_clocks_init(struct device_node *np) clk =rz_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/renesas/clk-sh73a0.c +2 -2
@@ -206,8 +206,8 @@ static void __init sh73a0_cpg_clocks_init(struct device_node *np) clk =sh73a0_cpg_register_clock (np, cpg, name);if (IS_ERR (clk)) -pr_err ("%s: failed to register %s %s clock (%ld)\n" , - __func__, np->name, name,PTR_ERR (clk)); +pr_err ("%s: failed to register %pOFn %s clock (%ld)\n" , + __func__, np, name,PTR_ERR (clk));else cpg->data.clks[i] = clk; }
drivers/clk/st/clkgen-fsyn.c +1 -1
@@ -936,7 +936,7 @@ static void __init st_of_quadfs_setup(struct device_node *np,if (!clk_parent_name)return ; - pll_name =kasprintf (GFP_KERNEL ,"%s.pll" , np->name); + pll_name =kasprintf (GFP_KERNEL ,"%pOFn.pll" , np);if (!pll_name)return ;
drivers/clk/sunxi/clk-mod0.c +3 -3
@@ -140,8 +140,8 @@ static void __init sun9i_a80_mod0_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for mod0-clk: %s\n" , - node->name); +pr_err ("Could not get registers for mod0-clk: %pOFn\n" , + node);return ; }
@@ -306,7 +306,7 @@ static void __init sunxi_mmc_setup(struct device_node *node, reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Couldn't map the %s clock registers\n" , node->name); +pr_err ("Couldn't map the %pOFn clock registers\n" , node);return ; }
drivers/clk/sunxi/clk-sun9i-core.c +10 -10
@@ -88,8 +88,8 @@ static void __init sun9i_a80_pll4_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-pll4-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-pll4-clk: %pOFn\n" , + node);return ; }
@@ -142,8 +142,8 @@ static void __init sun9i_a80_gt_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-gt-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-gt-clk: %pOFn\n" , + node);return ; }
@@ -197,8 +197,8 @@ static void __init sun9i_a80_ahb_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-ahb-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-ahb-clk: %pOFn\n" , + node);return ; }
@@ -223,8 +223,8 @@ static void __init sun9i_a80_apb0_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-apb0-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-apb0-clk: %pOFn\n" , + node);return ; }
@@ -280,8 +280,8 @@ static void __init sun9i_a80_apb1_setup(struct device_node *node) reg =of_io_request_and_map (node,0 ,of_node_full_name (node));if (IS_ERR (reg)) { -pr_err ("Could not get registers for a80-apb1-clk: %s\n" , - node->name); +pr_err ("Could not get registers for a80-apb1-clk: %pOFn\n" , + node);return ; }
drivers/clk/sunxi/clk-sunxi.c +2 -2
@@ -568,8 +568,8 @@ static struct clk * __init sunxi_factors_clk_setup(struct device_node *node, reg =of_iomap (node,0 );if (!reg) { -pr_err ("Could not get registers for factors-clk: %s\n" , - node->name); +pr_err ("Could not get registers for factors-clk: %pOFn\n" , + node);return NULL ; }
drivers/clk/ti/apll.c +9 -9
@@ -143,8 +143,8 @@ static void __init omap_clk_register_apll(void *user, clk =of_clk_get (node,0 );if (IS_ERR (clk)) { -pr_debug ("clk-ref for %s not ready, retry\n" , - node->name); +pr_debug ("clk-ref for %pOFn not ready, retry\n" , + node);if (!ti_clk_retry_init (node, hw, omap_clk_register_apll))return ;
@@ -155,8 +155,8 @@ static void __init omap_clk_register_apll(void *user, clk =of_clk_get (node,1 );if (IS_ERR (clk)) { -pr_debug ("clk-bypass for %s not ready, retry\n" , - node->name); +pr_debug ("clk-bypass for %pOFn not ready, retry\n" , + node);if (!ti_clk_retry_init (node, hw, omap_clk_register_apll))return ;
@@ -202,7 +202,7 @@ static void __init of_dra7_apll_setup(struct device_node *node) init->num_parents =of_clk_get_parent_count (node);if (init->num_parents <1 ) { -pr_err ("dra7 apll %s must have parent(s)\n" , node->name); +pr_err ("dra7 apll %pOFn must have parent(s)\n" , node); goto cleanup; }
@@ -366,7 +366,7 @@ static void __init of_omap2_apll_setup(struct device_node *node) init->num_parents =of_clk_get_parent_count (node);if (init->num_parents !=1 ) { -pr_err ("%s must have one parent\n" , node->name); +pr_err ("%pOFn must have one parent\n" , node); goto cleanup; }
@@ -374,13 +374,13 @@ static void __init of_omap2_apll_setup(struct device_node *node) init->parent_names = &parent_name;if (of_property_read_u32 (node,"ti,clock-frequency" , &val)) { -pr_err ("%s missing clock-frequency\n" , node->name); +pr_err ("%pOFn missing clock-frequency\n" , node); goto cleanup; } clk_hw->fixed_rate = val;if (of_property_read_u32 (node,"ti,bit-shift" , &val)) { -pr_err ("%s missing bit-shift\n" , node->name); +pr_err ("%pOFn missing bit-shift\n" , node); goto cleanup; }
@@ -389,7 +389,7 @@ static void __init of_omap2_apll_setup(struct device_node *node) ad->autoidle_mask =0x3 << val;if (of_property_read_u32 (node,"ti,idlest-shift" , &val)) { -pr_err ("%s missing idlest-shift\n" , node->name); +pr_err ("%pOFn missing idlest-shift\n" , node); goto cleanup; }
drivers/clk/ti/clk-dra7-atl.c +2 -2
@@ -190,8 +190,8 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node) init.num_parents =of_clk_get_parent_count (node);if (init.num_parents !=1 ) { -pr_err ("%s: atl clock %s must have 1 parent\n" , __func__, - node->name); +pr_err ("%s: atl clock %pOFn must have 1 parent\n" , __func__, + node); goto cleanup; }
drivers/clk/ti/clk.c +5 -5
@@ -223,7 +223,7 @@ int __init ti_clk_retry_init(struct device_node *node, void *user, {struct clk_init_item *retry; -pr_debug ("%s: adding to retry list...\n" , node->name); +pr_debug ("%pOFn: adding to retry list...\n" , node); retry =kzalloc (sizeof (*retry),GFP_KERNEL );if (!retry)return -ENOMEM ;
@@ -258,14 +258,14 @@ int ti_clk_get_reg_addr(struct device_node *node, int index, }if (i ==CLK_MAX_MEMMAPS ) { -pr_err ("clk-provider not found for %s!\n" , node->name); +pr_err ("clk-provider not found for %pOFn!\n" , node);return -ENOENT ; } reg->index = i;if (of_property_read_u32_index (node,"reg" , index, &val)) { -pr_err ("%s must have reg[%d]!\n" , node->name, index); +pr_err ("%pOFn must have reg[%d]!\n" , node, index);return -EINVAL ; }
@@ -312,7 +312,7 @@ int __init omap2_clk_provider_init(struct device_node *parent, int index,/* get clocks for this parent */ clocks =of_get_child_by_name (parent,"clocks" );if (!clocks) { -pr_err ("%s missing 'clocks' child node.\n" , parent->name); +pr_err ("%pOFn missing 'clocks' child node.\n" , parent);return -EINVAL ; }
@@ -365,7 +365,7 @@ void ti_dt_clk_init_retry_clks(void)while (!list_empty (&retry_list) && retries) {list_for_each_entry_safe (retry, tmp, &retry_list, link) { -pr_debug ("retry-init: %s\n" , retry->node->name); +pr_debug ("retry-init: %pOFn\n" , retry->node); retry->func (retry->user, retry->node);list_del (&retry->link);kfree (retry);
drivers/clk/ti/clkctrl.c +6 -8
@@ -259,8 +259,8 @@ _ti_clkctrl_clk_register(struct omap_clkctrl_provider *provider,struct omap_clkctrl_clk *clkctrl_clk;int ret =0 ; - init.name =kasprintf (GFP_KERNEL ,"%s:%s:%04x:%d" , node->parent->name, - node->name, offset, bit); + init.name =kasprintf (GFP_KERNEL ,"%pOFn:%pOFn:%04x:%d" , node->parent, + node, offset, bit); clkctrl_clk =kzalloc (sizeof (*clkctrl_clk),GFP_KERNEL );if (!init.name || !clkctrl_clk) { ret = -ENOMEM ;
@@ -492,8 +492,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) provider->base =of_iomap (node,0 ); - provider->clkdm_name =kmalloc (strlen (node->parent->name) +3 , -GFP_KERNEL ); + provider->clkdm_name =kasprintf (GFP_KERNEL ,"%pOFnxxx" , node->parent);if (!provider->clkdm_name) {kfree (provider);return ;
@@ -503,8 +502,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)* Create default clkdm name, replace _cm from end of parent node * name with _clkdm */ -strcpy (provider->clkdm_name, node->parent->name); - provider->clkdm_name[strlen (provider->clkdm_name) -2 ] =0 ; + provider->clkdm_name[strlen (provider->clkdm_name) -5 ] =0 ;strcat (provider->clkdm_name,"clkdm" );INIT_LIST_HEAD (&provider->clocks);
@@ -539,8 +537,8 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) init.flags =0 ;if (reg_data->flags &CLKF_SET_RATE_PARENT ) init.flags |=CLK_SET_RATE_PARENT ; - init.name =kasprintf (GFP_KERNEL ,"%s:%s:%04x:%d" , - node->parent->name, node->name, + init.name =kasprintf (GFP_KERNEL ,"%pOFn:%pOFn:%04x:%d" , + node->parent, node, reg_data->offset,0 ); clkctrl_clk =kzalloc (sizeof (*clkctrl_clk),GFP_KERNEL );if (!init.name || !clkctrl_clk)
drivers/clk/ti/composite.c +7 -7
@@ -135,8 +135,8 @@ static void __init _register_composite(void *user, comp =_lookup_component (cclk->comp_nodes[i]);if (!comp) { -pr_debug ("component %s not ready for %s, retry\n" , - cclk->comp_nodes[i]->name, node->name); +pr_debug ("component %s not ready for %pOFn, retry\n" , + cclk->comp_nodes[i]->name, node);if (!ti_clk_retry_init (node, hw, _register_composite))return ;
@@ -144,8 +144,8 @@ static void __init _register_composite(void *user, goto cleanup; }if (cclk->comp_clks[comp->type] !=NULL ) { -pr_err ("duplicate component types for %s (%s)!\n" , - node->name, component_clk_types[comp->type]); +pr_err ("duplicate component types for %pOFn (%s)!\n" , + node, component_clk_types[comp->type]); goto cleanup; }
@@ -168,7 +168,7 @@ static void __init _register_composite(void *user, }if (!num_parents) { -pr_err ("%s: no parents found for %s!\n" , __func__, node->name); +pr_err ("%s: no parents found for %pOFn!\n" , __func__, node); goto cleanup; }
@@ -212,7 +212,7 @@ static void __init of_ti_composite_clk_setup(struct device_node *node) num_clks =of_clk_get_parent_count (node);if (!num_clks) { -pr_err ("composite clk %s must have component(s)\n" , node->name); +pr_err ("composite clk %pOFn must have component(s)\n" , node);return ; }
@@ -248,7 +248,7 @@ int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw, num_parents =of_clk_get_parent_count (node);if (!num_parents) { -pr_err ("component-clock %s must have parent(s)\n" , node->name); +pr_err ("component-clock %pOFn must have parent(s)\n" , node);return -EINVAL ; }
drivers/clk/ti/divider.c +2 -2
@@ -492,7 +492,7 @@ __init ti_clk_get_div_table(struct device_node *node) }if (!valid_div) { -pr_err ("no valid dividers for %s table\n" , node->name); +pr_err ("no valid dividers for %pOFn table\n" , node);return ERR_PTR (-EINVAL ); }
@@ -530,7 +530,7 @@ static int _get_divider_width(struct device_node *node, min_div =1 ;if (of_property_read_u32 (node,"ti,max-div" , &max_div)) { -pr_err ("no max-div for %s!\n" , node->name); +pr_err ("no max-div for %pOFn!\n" , node);return -EINVAL ; }
drivers/clk/ti/dpll.c +6 -6
@@ -162,8 +162,8 @@ static void __init _register_dpll(void *user, clk =of_clk_get (node,0 );if (IS_ERR (clk)) { -pr_debug ("clk-ref missing for %s, retry later\n" , - node->name); +pr_debug ("clk-ref missing for %pOFn, retry later\n" , + node);if (!ti_clk_retry_init (node, hw, _register_dpll))return ;
@@ -175,8 +175,8 @@ static void __init _register_dpll(void *user, clk =of_clk_get (node,1 );if (IS_ERR (clk)) { -pr_debug ("clk-bypass missing for %s, retry later\n" , - node->name); +pr_debug ("clk-bypass missing for %pOFn, retry later\n" , + node);if (!ti_clk_retry_init (node, hw, _register_dpll))return ;
@@ -226,7 +226,7 @@ static void _register_dpll_x2(struct device_node *node, parent_name =of_clk_get_parent_name (node,0 );if (!parent_name) { -pr_err ("%s must have parent\n" , node->name); +pr_err ("%pOFn must have parent\n" , node);return ; }
@@ -305,7 +305,7 @@ static void __init of_ti_dpll_setup(struct device_node *node, init->num_parents =of_clk_get_parent_count (node);if (!init->num_parents) { -pr_err ("%s must have parent(s)\n" , node->name); +pr_err ("%pOFn must have parent(s)\n" , node); goto cleanup; }
drivers/clk/ti/fapll.c +4 -4
@@ -555,7 +555,7 @@ static void __init ti_fapll_setup(struct device_node *node) init->num_parents =of_clk_get_parent_count (node);if (init->num_parents !=2 ) { -pr_err ("%s must have two parents\n" , node->name); +pr_err ("%pOFn must have two parents\n" , node); goto free; }
@@ -564,19 +564,19 @@ static void __init ti_fapll_setup(struct device_node *node) fd->clk_ref =of_clk_get (node,0 );if (IS_ERR (fd->clk_ref)) { -pr_err ("%s could not get clk_ref\n" , node->name); +pr_err ("%pOFn could not get clk_ref\n" , node); goto free; } fd->clk_bypass =of_clk_get (node,1 );if (IS_ERR (fd->clk_bypass)) { -pr_err ("%s could not get clk_bypass\n" , node->name); +pr_err ("%pOFn could not get clk_bypass\n" , node); goto free; } fd->base =of_iomap (node,0 );if (!fd->base) { -pr_err ("%s could not get IO base\n" , node->name); +pr_err ("%pOFn could not get IO base\n" , node); goto free; }
drivers/clk/ti/fixed-factor.c +2 -2
@@ -42,12 +42,12 @@ static void __init of_ti_fixed_factor_clk_setup(struct device_node *node)u32 flags =0 ;if (of_property_read_u32 (node,"ti,clock-div" , &div)) { -pr_err ("%s must have a clock-div property\n" , node->name); +pr_err ("%pOFn must have a clock-div property\n" , node);return ; }if (of_property_read_u32 (node,"ti,clock-mult" , &mult)) { -pr_err ("%s must have a clock-mult property\n" , node->name); +pr_err ("%pOFn must have a clock-mult property\n" , node);return ; }
drivers/clk/ti/gate.c +1 -1
@@ -179,7 +179,7 @@ static void __init _of_ti_gate_clk_setup(struct device_node *node, }if (of_clk_get_parent_count (node) !=1 ) { -pr_err ("%s must have 1 parent\n" , node->name); +pr_err ("%pOFn must have 1 parent\n" , node);return ; }
drivers/clk/ti/interface.c +1 -1
@@ -84,7 +84,7 @@ static void __init _of_ti_interface_clk_setup(struct device_node *node, parent_name =of_clk_get_parent_name (node,0 );if (!parent_name) { -pr_err ("%s must have a parent\n" , node->name); +pr_err ("%pOFn must have a parent\n" , node);return ; }
drivers/clk/ti/mux.c +2 -2
@@ -186,7 +186,7 @@ static void of_mux_clk_setup(struct device_node *node) num_parents =of_clk_get_parent_count (node);if (num_parents <2 ) { -pr_err ("mux-clock %s must have parents\n" , node->name); +pr_err ("mux-clock %pOFn must have parents\n" , node);return ; } parent_names =kzalloc ((sizeof (char *) * num_parents),GFP_KERNEL );
@@ -278,7 +278,7 @@ static void __init of_ti_composite_mux_clk_setup(struct device_node *node) num_parents =of_clk_get_parent_count (node);if (num_parents <2 ) { -pr_err ("%s must have parents\n" , node->name); +pr_err ("%pOFn must have parents\n" , node); goto cleanup; }
drivers/clk/zynq/clkc.c +2 -2
@@ -602,7 +602,7 @@ void __init zynq_clock_init(void) }if (of_address_to_resource (np,0 , &res)) { -pr_err ("%s: failed to get resource\n" , np->name); +pr_err ("%pOFn: failed to get resource\n" , np); goto np_err; }
@@ -611,7 +611,7 @@ void __init zynq_clock_init(void)if (slcr->data) { zynq_clkc_base = (__force void __iomem *)slcr->data + res.start; }else { -pr_err ("%s: Unable to get I/O memory\n" , np->name); +pr_err ("%pOFn: Unable to get I/O memory\n" , np);of_node_put (slcr); goto np_err; }
--
2.17.1
Re: [PATCH v2] clk: Convert to using %pOFn instead of device_node.name
Quoting Rob Herring (2018-08-28 08:44:29)
Quoted 11 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Eugeniy Paltsev <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc linux-clk at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-renesas-soc at vger.kernel.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>
Quoted 1 line
---
Re: [PATCH v2] clk: Convert to using %pOFn instead of device_node.name
Quoted 15 lines · Stephen Boyd
Quoting Rob Herring (2018-08-28 08:44:29)
Quoted 11 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Eugeniy Paltsev <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc linux-clk at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-renesas-soc at vger.kernel.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>Quoted 1 line
---
Quoted 1 line
Reviewed-by Stephen Boyd <[email protected]>
Please apply to the clock tree. There's no dependencies and removing name will take some time.
Rob
Stephen Boyd
maintainerRe: [PATCH v2] clk: Convert to using %pOFn instead of device_node.name
Quoting Rob Herring (2018-08-29 04:13:44)
Quoted 16 lines · Stephen Boyd
Quoted 15 lines
Quoting Rob Herring (2018-08-28 08:44:29)
Quoted 12 lines
In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.Cc Eugeniy Paltsev <[email protected]>Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc linux-clk at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgCc linux-renesas-soc at vger.kernel.orgCc linux-omap at vger.kernel.orgSigned-off-by Rob Herring <[email protected]>---
Quoted 5 lines
Quoted 1 line
Reviewed-by Stephen Boyd <[email protected]>Please apply to the clock tree. There's no dependencies and removing name will take some time.
Alright. Applied to clk-next. Thanks!
PATCH v2 1/1 net: ethernet: Convert to using %pOFn instead of device_node.name
In reply to Rob HerringIn preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier.
---
v2:
- fix missing brackets in netcp
drivers/net/ethernet/freescale/fsl_pq_mdio.c | 4 +- .../net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 8 ++-- drivers/net/ethernet/marvell/mv643xx_eth.c | 6 +-- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/sun/sunhme.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 22 ++++------ drivers/net/ethernet/ti/netcp_ethss.c | 42 +++++++++---------- 7 files changed, 40 insertions(+), 46 deletions(-)
drivers/net/ethernet/freescale/fsl_pq_mdio.c +2 -2
@@ -446,8 +446,8 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev) goto error; } -snprintf (new_bus->id,MII_BUS_ID_SIZE ,"%s@%llx" , np->name, - (unsigned long long )res.start); +snprintf (new_bus->id,MII_BUS_ID_SIZE ,"%pOFn@%llx" , np, + (unsigned long long )res.start); priv->map =of_iomap (np,0 );if (!priv->map) {
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +4 -4
@@ -807,8 +807,8 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)*/ put_device (&mac_cb->phy_dev->mdio.dev); -dev_dbg (mac_cb->dev,"mac%d phy_node: %s\n" , - mac_cb->mac_id, np->name); +dev_dbg (mac_cb->dev,"mac%d phy_node: %pOFn\n" , + mac_cb->mac_id, np); }of_node_put (np);
@@ -825,8 +825,8 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)* if the phy_dev is found */ put_device (&mac_cb->phy_dev->mdio.dev); -dev_dbg (mac_cb->dev,"mac%d phy_node: %s\n" , - mac_cb->mac_id, np->name); +dev_dbg (mac_cb->dev,"mac%d phy_node: %pOFn\n" , + mac_cb->mac_id, np); }of_node_put (np);
drivers/net/ethernet/marvell/mv643xx_eth.c +3 -3
@@ -2733,17 +2733,17 @@ static int mv643xx_eth_shared_of_add_port(struct platform_device *pdev,memset (&res,0 ,sizeof (res));if (of_irq_to_resource (pnp,0 , &res) <=0 ) { -dev_err (&pdev->dev,"missing interrupt on %s\n" , pnp->name); +dev_err (&pdev->dev,"missing interrupt on %pOFn\n" , pnp);return -EINVAL ; }if (of_property_read_u32 (pnp,"reg" , &ppd.port_number)) { -dev_err (&pdev->dev,"missing reg property on %s\n" , pnp->name); +dev_err (&pdev->dev,"missing reg property on %pOFn\n" , pnp);return -EINVAL ; }if (ppd.port_number >=3 ) { -dev_err (&pdev->dev,"invalid reg property on %s\n" , pnp->name); +dev_err (&pdev->dev,"invalid reg property on %pOFn\n" , pnp);return -EINVAL ; }
drivers/net/ethernet/mediatek/mtk_eth_soc.c +1 -1
@@ -405,7 +405,7 @@ static int mtk_mdio_init(struct mtk_eth *eth) eth->mii_bus->priv = eth; eth->mii_bus->parent = eth->dev; -snprintf (eth->mii_bus->id,MII_BUS_ID_SIZE ,"%s" , mii_np->name); +snprintf (eth->mii_bus->id,MII_BUS_ID_SIZE ,"%pOFn" , mii_np); ret =of_mdiobus_register (eth->mii_bus, mii_np); err_put_node:
drivers/net/ethernet/sun/sunhme.c +1 -1
@@ -2999,7 +2999,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,/* Now make sure pci_dev cookie is there. */ #ifdef CONFIG_SPARC dp =pci_device_to_OF_node (pdev); -strcpy (prom_name, dp->name); +snprintf (prom_name,sizeof (prom_name),"%pOFn" , dp);#else if (is_quattro_p (pdev))strcpy (prom_name,"SUNW,qfe" );
drivers/net/ethernet/ti/netcp_core.c +8 -14
@@ -225,17 +225,6 @@ static int emac_arch_get_mac_addr(char *x, void __iomem *efuse_mac, u32 swap)return 0 ; } -static const char *netcp_node_name (struct device_node *node) -{ -const char *name; - -if (of_property_read_string (node,"label" , &name) <0 ) - name = node->name; -if (!name) - name ="unknown" ; -return name; -} -/* Module management routines */ static int netcp_register_interface (struct netcp_intf *netcp) {
@@ -267,8 +256,13 @@ static int netcp_module_probe(struct netcp_device *netcp_device, }for_each_available_child_of_node (devices, child) { -const char *name =netcp_node_name (child); +const char *name; +char node_name[32 ]; +if (of_property_read_string (node,"label" , &name) <0 ) { +snprintf (node_name,sizeof (node_name),"%pOFn" , child); + name = node_name; + }if (!strcasecmp (module->name, name))break ; }
@@ -2209,8 +2203,8 @@ static int netcp_probe(struct platform_device *pdev)for_each_available_child_of_node (interfaces, child) { ret =netcp_create_interface (netcp_device, child);if (ret) { -dev_err (dev,"could not create interface(%s)\n" , - child->name); +dev_err (dev,"could not create interface(%pOFn)\n" , + child); goto probe_quit_interface; } }
drivers/net/ethernet/ti/netcp_ethss.c +21 -21
107 lines not on this page · raw message
--
2.17.1
Re: [PATCH v2] net: ethernet: Convert to using %pOFn instead of device_node.name
Quoted 1 line · Rob Herring
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-