memory: Convert to using %pOF instead of full_name
Subsystems (4)
PATCH 1/1 memory: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node.
--- drivers/memory/atmel-ebi.c | 17 ++++++++--------- drivers/memory/jz4780-nemc.c | 12 ++++++------ drivers/memory/mvebu-devbus.c | 12 ++++++------ drivers/memory/omap-gpmc.c | 18 +++++++++--------- 4 files changed, 29 insertions(+), 30 deletions(-)
drivers/memory/atmel-ebi.c +8 -9
@@ -156,8 +156,8 @@ static int atmel_ebi_xslate_smc_timings(struct atmel_ebi_dev *ebid, out:if (ret) {dev_err (ebid->ebi->dev, -"missing or invalid timings definition in %s" , - np->full_name); +"missing or invalid timings definition in %pOF" , + np);return ret; }
@@ -267,8 +267,8 @@ static int atmel_ebi_xslate_smc_config(struct atmel_ebi_dev *ebid,return -EINVAL ;if ((ret >0 && !required) || (!ret && required)) { -dev_err (ebid->ebi->dev,"missing atmel,smc- properties in %s" , - np->full_name); +dev_err (ebid->ebi->dev,"missing atmel,smc- properties in %pOF" , + np);return -EINVAL ; }
@@ -311,8 +311,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,if (cs >=AT91_MATRIX_EBI_NUM_CS || !(ebi->caps->available_cs &BIT (cs))) { -dev_err (dev,"invalid reg property in %s\n" , - np->full_name); +dev_err (dev,"invalid reg property in %pOF\n" , np);return -EINVAL ; }
@@ -321,7 +320,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np, }if (!numcs) { -dev_err (dev,"invalid reg property in %s\n" , np->full_name); +dev_err (dev,"invalid reg property in %pOF\n" , np);return -EINVAL ; }
@@ -569,8 +568,8 @@ static int atmel_ebi_probe(struct platform_device *pdev) ret =atmel_ebi_dev_setup (ebi, child, reg_cells);if (ret) { -dev_err (dev,"failed to configure EBI bus for %s, disabling the device" , - child->full_name); +dev_err (dev,"failed to configure EBI bus for %pOF, disabling the device" , + child); ret =atmel_ebi_dev_disable (ebi, child);if (ret)
drivers/memory/jz4780-nemc.c +6 -6
@@ -322,8 +322,8 @@ static int jz4780_nemc_probe(struct platform_device *pdev) bank =of_read_number (prop,1 );if (bank <1 || bank >=JZ4780_NEMC_NUM_BANKS ) {dev_err (nemc->dev, -"%s requests invalid bank %u\n" , - child->full_name, bank); +"%pOF requests invalid bank %u\n" , + child, bank);/* Will continue the outer loop below. */ referenced =0 ;
@@ -334,12 +334,12 @@ static int jz4780_nemc_probe(struct platform_device *pdev) }if (!referenced) { -dev_err (nemc->dev,"%s has no addresses\n" , - child->full_name); +dev_err (nemc->dev,"%pOF has no addresses\n" , + child);continue ; }else if (nemc->banks_present & referenced) { -dev_err (nemc->dev,"%s conflicts with another node\n" , - child->full_name); +dev_err (nemc->dev,"%pOF conflicts with another node\n" , + child);continue ; }
drivers/memory/mvebu-devbus.c +6 -6
@@ -105,8 +105,8 @@ static int get_timing_param_ps(struct devbus *devbus, err =of_property_read_u32 (node, name, &time_ps);if (err <0 ) { -dev_err (devbus->dev,"%s has no '%s' property\n" , - name, node->full_name); +dev_err (devbus->dev,"%pOF has no '%s' property\n" , + node, name);return err; }
@@ -127,8 +127,8 @@ static int devbus_get_timing_params(struct devbus *devbus, err =of_property_read_u32 (node,"devbus,bus-width" , &r->bus_width);if (err <0 ) {dev_err (devbus->dev, -"%s has no 'devbus,bus-width' property\n" , - node->full_name); +"%pOF has no 'devbus,bus-width' property\n" , + node);return err; }
@@ -180,8 +180,8 @@ static int devbus_get_timing_params(struct devbus *devbus, &w->sync_enable);if (err <0 ) {dev_err (devbus->dev, -"%s has no 'devbus,sync-enable' property\n" , - node->full_name); +"%pOF has no 'devbus,sync-enable' property\n" , + node);return err; } }
drivers/memory/omap-gpmc.c +9 -9
@@ -960,7 +960,7 @@ static int gpmc_cs_remap(int cs, u32 base)* Make sure we ignore any device offsets from the GPMC partition * allocated for the chip select and that the new base confirms * to the GPMC 16MB minimum granularity. -*/ +*/ base &= ~(SZ_16M -1 );gpmc_cs_get_memconf (cs, &old_base, &size);
@@ -1930,8 +1930,8 @@ static int gpmc_probe_onenand_child(struct platform_device *pdev,struct omap_onenand_platform_data *gpmc_onenand_data;if (of_property_read_u32 (child,"reg" , &val) <0 ) { -dev_err (&pdev->dev,"%s has no 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'reg' property\n" , + child);return -ENODEV ; }
@@ -1979,14 +1979,14 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,struct gpmc_device *gpmc =platform_get_drvdata (pdev);if (of_property_read_u32 (child,"reg" , &cs) <0 ) { -dev_err (&pdev->dev,"%s has no 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'reg' property\n" , + child);return -ENODEV ; }if (of_address_to_resource (child,0 , &res) <0 ) { -dev_err (&pdev->dev,"%s has malformed 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has malformed 'reg' property\n" , + child);return -ENODEV ; }
@@ -2084,8 +2084,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, ret =of_property_read_u32 (child,"bank-width" , &gpmc_s.device_width);if (ret <0 ) { -dev_err (&pdev->dev,"%s has no 'bank-width' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'bank-width' property\n" , + child); goto err; } }
--
2.11.0
Quoted 11 lines · Rob Herring
Now that we have a custom printf format specifier, convert users of
full_nameto use %pOF instead. This is preparation to remove storing of the full path string for each node.Signed-off-by Rob Herring <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-omap at vger.kernel.org
Quoted 189 lines
--- drivers/memory/atmel-ebi.c | 17 ++++++++--------- drivers/memory/jz4780-nemc.c | 12 ++++++------ drivers/memory/mvebu-devbus.c | 12 ++++++------ drivers/memory/omap-gpmc.c | 18 +++++++++--------- 4 files changed, 29 insertions(+), 30 deletions(-)drivers/memory/atmel-ebi.c +8
-9@@ -156,8 +156,8 @@ static int atmel_ebi_xslate_smc_timings(struct atmel_ebi_dev *ebid, out:if (ret) {dev_err (ebid->ebi->dev, -"missing or invalid timings definition in %s" , - np->full_name); +"missing or invalid timings definition in %pOF" , + np);return ret; }@@ -267,8 +267,8 @@ static int atmel_ebi_xslate_smc_config(struct atmel_ebi_dev *ebid,return -EINVAL ;if ((ret >0 && !required) || (!ret && required)) { -dev_err (ebid->ebi->dev,"missing atmel,smc- properties in %s" , - np->full_name); +dev_err (ebid->ebi->dev,"missing atmel,smc- properties in %pOF" , + np);return -EINVAL ; }@@ -311,8 +311,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,if (cs >=AT91_MATRIX_EBI_NUM_CS || !(ebi->caps->available_cs &BIT (cs))) { -dev_err (dev,"invalid reg property in %s\n" , - np->full_name); +dev_err (dev,"invalid reg property in %pOF\n" , np);return -EINVAL ; }@@ -321,7 +320,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np, }if (!numcs) { -dev_err (dev,"invalid reg property in %s\n" , np->full_name); +dev_err (dev,"invalid reg property in %pOF\n" , np);return -EINVAL ; }@@ -569,8 +568,8 @@ static int atmel_ebi_probe(struct platform_device *pdev) ret =atmel_ebi_dev_setup (ebi, child, reg_cells);if (ret) { -dev_err (dev,"failed to configure EBI bus for %s, disabling the device" , - child->full_name); +dev_err (dev,"failed to configure EBI bus for %pOF, disabling the device" , + child); ret =atmel_ebi_dev_disable (ebi, child);if (ret)drivers/memory/jz4780-nemc.c +6
-6@@ -322,8 +322,8 @@ static int jz4780_nemc_probe(struct platform_device *pdev) bank =of_read_number (prop,1 );if (bank <1 || bank >=JZ4780_NEMC_NUM_BANKS ) {dev_err (nemc->dev, -"%s requests invalid bank %u\n" , - child->full_name, bank); +"%pOF requests invalid bank %u\n" , + child, bank);/* Will continue the outer loop below. */ referenced =0 ;@@ -334,12 +334,12 @@ static int jz4780_nemc_probe(struct platform_device *pdev) }if (!referenced) { -dev_err (nemc->dev,"%s has no addresses\n" , - child->full_name); +dev_err (nemc->dev,"%pOF has no addresses\n" , + child);continue ; }else if (nemc->banks_present & referenced) { -dev_err (nemc->dev,"%s conflicts with another node\n" , - child->full_name); +dev_err (nemc->dev,"%pOF conflicts with another node\n" , + child);continue ; }drivers/memory/mvebu-devbus.c +6
-6@@ -105,8 +105,8 @@ static int get_timing_param_ps(struct devbus *devbus, err =of_property_read_u32 (node, name, &time_ps);if (err <0 ) { -dev_err (devbus->dev,"%s has no '%s' property\n" , - name, node->full_name); +dev_err (devbus->dev,"%pOF has no '%s' property\n" , + node, name);return err; }@@ -127,8 +127,8 @@ static int devbus_get_timing_params(struct devbus *devbus, err =of_property_read_u32 (node,"devbus,bus-width" , &r->bus_width);if (err <0 ) {dev_err (devbus->dev, -"%s has no 'devbus,bus-width' property\n" , - node->full_name); +"%pOF has no 'devbus,bus-width' property\n" , + node);return err; }@@ -180,8 +180,8 @@ static int devbus_get_timing_params(struct devbus *devbus, &w->sync_enable);if (err <0 ) {dev_err (devbus->dev, -"%s has no 'devbus,sync-enable' property\n" , - node->full_name); +"%pOF has no 'devbus,sync-enable' property\n" , + node);return err; } }drivers/memory/omap-gpmc.c +9
-10@@ -960,7 +960,7 @@ static int gpmc_cs_remap(int cs, u32 base)* Make sure we ignore any device offsets from the GPMC partition * allocated for the chip select and that the new base confirms * to the GPMC 16MB minimum granularity. -*/ +*/ base &= ~(SZ_16M -1 );gpmc_cs_get_memconf (cs, &old_base, &size);@@ -1930,8 +1930,8 @@ static int gpmc_probe_onenand_child(struct platform_device *pdev,struct omap_onenand_platform_data *gpmc_onenand_data;if (of_property_read_u32 (child,"reg" , &val) <0 ) { -dev_err (&pdev->dev,"%s has no 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'reg' property\n" , + child);return -ENODEV ; }@@ -1979,14 +1979,14 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,struct gpmc_device *gpmc =platform_get_drvdata (pdev);if (of_property_read_u32 (child,"reg" , &cs) <0 ) { -dev_err (&pdev->dev,"%s has no 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'reg' property\n" , + child);return -ENODEV ; }if (of_address_to_resource (child,0 , &res) <0 ) { -dev_err (&pdev->dev,"%s has malformed 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has malformed 'reg' property\n" , + child);return -ENODEV ; }@@ -2084,8 +2084,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, ret =of_property_read_u32 (child,"bank-width" , &gpmc_s.device_width);if (ret <0 ) { -dev_err (&pdev->dev,"%s has no 'bank-width' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'bank-width' property\n" , + child); goto err; } } --2.11.0
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Quoted 5 lines · Alexandre Belloni
Quoted 4 lines · Rob Herring
Now that we have a custom printf format specifier, convert users of
full_nameto use %pOF instead. This is preparation to remove storing of the full path string for each node.
Quoted 8 lines
Quoted 7 lines
Signed-off-by Rob Herring <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-omap at vger.kernel.org
This can go through subsystem tree. Who normally takes drivers/memory/ changes? arm-soc?
Rob
Quoted 14 lines · Rob Herring
Quoted 12 lines · Alexandre Belloni
Quoted 11 lines · Rob Herring
Now that we have a custom printf format specifier, convert users of
full_nameto use %pOF instead. This is preparation to remove storing of the full path string for each node.Signed-off-by Rob Herring <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-omap at vger.kernel.org
Quoted 4 lines
Quoted 1 line
This can go through subsystem tree. Who normally takes
drivers/memory/changes? arm-soc?
I applied it to next/drivers in arm-soc with the two acks now. For some reason the whitespace change in omap-gpmc.c did not apply though, so I ended up hand-editing the patch to take that out.
Arnd
?
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Quoted 11 lines · Rob Herring
Now that we have a custom printf format specifier, convert users of
full_nameto use %pOF instead. This is preparation to remove storing of the full path string for each node.Signed-off-by Rob Herring <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Roger Quadros <[email protected]>Cc Tony Lindgren <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-omap at vger.kernel.org
Quoted 6 lines
--- drivers/memory/atmel-ebi.c | 17 ++++++++--------- drivers/memory/jz4780-nemc.c | 12 ++++++------ drivers/memory/mvebu-devbus.c | 12 ++++++------ drivers/memory/omap-gpmc.c | 18 +++++++++--------- 4 files changed, 29 insertions(+), 30 deletions(-)
for omap-gpmc.c
Quoted 183 lines
drivers/memory/atmel-ebi.c +8
-9@@ -156,8 +156,8 @@ static int atmel_ebi_xslate_smc_timings(struct atmel_ebi_dev *ebid, out:if (ret) {dev_err (ebid->ebi->dev, -"missing or invalid timings definition in %s" , - np->full_name); +"missing or invalid timings definition in %pOF" , + np);return ret; }@@ -267,8 +267,8 @@ static int atmel_ebi_xslate_smc_config(struct atmel_ebi_dev *ebid,return -EINVAL ;if ((ret >0 && !required) || (!ret && required)) { -dev_err (ebid->ebi->dev,"missing atmel,smc- properties in %s" , - np->full_name); +dev_err (ebid->ebi->dev,"missing atmel,smc- properties in %pOF" , + np);return -EINVAL ; }@@ -311,8 +311,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np,if (cs >=AT91_MATRIX_EBI_NUM_CS || !(ebi->caps->available_cs &BIT (cs))) { -dev_err (dev,"invalid reg property in %s\n" , - np->full_name); +dev_err (dev,"invalid reg property in %pOF\n" , np);return -EINVAL ; }@@ -321,7 +320,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np, }if (!numcs) { -dev_err (dev,"invalid reg property in %s\n" , np->full_name); +dev_err (dev,"invalid reg property in %pOF\n" , np);return -EINVAL ; }@@ -569,8 +568,8 @@ static int atmel_ebi_probe(struct platform_device *pdev) ret =atmel_ebi_dev_setup (ebi, child, reg_cells);if (ret) { -dev_err (dev,"failed to configure EBI bus for %s, disabling the device" , - child->full_name); +dev_err (dev,"failed to configure EBI bus for %pOF, disabling the device" , + child); ret =atmel_ebi_dev_disable (ebi, child);if (ret)drivers/memory/jz4780-nemc.c +6
-6@@ -322,8 +322,8 @@ static int jz4780_nemc_probe(struct platform_device *pdev) bank =of_read_number (prop,1 );if (bank <1 || bank >=JZ4780_NEMC_NUM_BANKS ) {dev_err (nemc->dev, -"%s requests invalid bank %u\n" , - child->full_name, bank); +"%pOF requests invalid bank %u\n" , + child, bank);/* Will continue the outer loop below. */ referenced =0 ;@@ -334,12 +334,12 @@ static int jz4780_nemc_probe(struct platform_device *pdev) }if (!referenced) { -dev_err (nemc->dev,"%s has no addresses\n" , - child->full_name); +dev_err (nemc->dev,"%pOF has no addresses\n" , + child);continue ; }else if (nemc->banks_present & referenced) { -dev_err (nemc->dev,"%s conflicts with another node\n" , - child->full_name); +dev_err (nemc->dev,"%pOF conflicts with another node\n" , + child);continue ; }drivers/memory/mvebu-devbus.c +6
-6@@ -105,8 +105,8 @@ static int get_timing_param_ps(struct devbus *devbus, err =of_property_read_u32 (node, name, &time_ps);if (err <0 ) { -dev_err (devbus->dev,"%s has no '%s' property\n" , - name, node->full_name); +dev_err (devbus->dev,"%pOF has no '%s' property\n" , + node, name);return err; }@@ -127,8 +127,8 @@ static int devbus_get_timing_params(struct devbus *devbus, err =of_property_read_u32 (node,"devbus,bus-width" , &r->bus_width);if (err <0 ) {dev_err (devbus->dev, -"%s has no 'devbus,bus-width' property\n" , - node->full_name); +"%pOF has no 'devbus,bus-width' property\n" , + node);return err; }@@ -180,8 +180,8 @@ static int devbus_get_timing_params(struct devbus *devbus, &w->sync_enable);if (err <0 ) {dev_err (devbus->dev, -"%s has no 'devbus,sync-enable' property\n" , - node->full_name); +"%pOF has no 'devbus,sync-enable' property\n" , + node);return err; } }drivers/memory/omap-gpmc.c +9
-10@@ -960,7 +960,7 @@ static int gpmc_cs_remap(int cs, u32 base)* Make sure we ignore any device offsets from the GPMC partition * allocated for the chip select and that the new base confirms * to the GPMC 16MB minimum granularity. -*/ +*/ base &= ~(SZ_16M -1 );gpmc_cs_get_memconf (cs, &old_base, &size);@@ -1930,8 +1930,8 @@ static int gpmc_probe_onenand_child(struct platform_device *pdev,struct omap_onenand_platform_data *gpmc_onenand_data;if (of_property_read_u32 (child,"reg" , &val) <0 ) { -dev_err (&pdev->dev,"%s has no 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'reg' property\n" , + child);return -ENODEV ; }@@ -1979,14 +1979,14 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,struct gpmc_device *gpmc =platform_get_drvdata (pdev);if (of_property_read_u32 (child,"reg" , &cs) <0 ) { -dev_err (&pdev->dev,"%s has no 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'reg' property\n" , + child);return -ENODEV ; }if (of_address_to_resource (child,0 , &res) <0 ) { -dev_err (&pdev->dev,"%s has malformed 'reg' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has malformed 'reg' property\n" , + child);return -ENODEV ; }@@ -2084,8 +2084,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, ret =of_property_read_u32 (child,"bank-width" , &gpmc_s.device_width);if (ret <0 ) { -dev_err (&pdev->dev,"%s has no 'bank-width' property\n" , - child->full_name); +dev_err (&pdev->dev,"%pOF has no 'bank-width' property\n" , + child); goto err; } } --2.11.0
Signature · 2 lines
cheers, -roger