Hi, While trying to add SMCCC based SOC_ID support, I found the custom soc attribute group which had no users in the tree and check if it can be used or can be removed. I realised that it could clean up the custom attributes that are added using device_create_file today. Regards, Sudeep Sudeep Holla (8): soc: realview: Switch to use DEVICE_ATTR_RO() soc: realview: Use custom soc attribute group instead of device_create_file soc: integrator: Switch to use DEVICE_ATTR_RO() soc: integrator: Use custom soc attribute group instead of device_create_file soc: ux500: Switch to use DEVICE_ATTR_RO() soc: ux500: Use custom soc attribute group instead of device_create_file ARM: OMAP2: Switch to use DEVICE_ATTR_RO() ARM: OMAP2: Use custom soc attribute group instead of device_create_file arch/arm/mach-omap2/id.c | 20 ++++++----- drivers/soc/ux500/ux500-soc-id.c | 22 ++++++------ drivers/soc/versatile/soc-integrator.c | 48 ++++++++++++-------------- drivers/soc/versatile/soc-realview.c | 48 ++++++++++++-------------- 4 files changed, 69 insertions(+), 69 deletions(-) -- 2.17.1
Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- drivers/soc/versatile/soc-realview.c | 40 +++++++++++----------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/drivers/soc/versatile/soc-realview.c b/drivers/soc/versatile/soc-realview.c index 9471353dd8c3..cb3bcb7dd824 100644 --- a/drivers/soc/versatile/soc-realview.c +++ b/drivers/soc/versatile/soc-realview.c @@ -39,45 +39,37 @@ static const char *realview_arch_str(u32 id) } } -static ssize_t realview_get_manf(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +manufacturer_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%02x\n", realview_coreid >> 24); } -static struct device_attribute realview_manf_attr = - __ATTR(manufacturer, S_IRUGO, realview_get_manf, NULL); +static DEVICE_ATTR_RO(manufacturer); -static ssize_t realview_get_board(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +board_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "HBI-%03x\n", ((realview_coreid >> 16) & 0xfff)); } -static struct device_attribute realview_board_attr = - __ATTR(board, S_IRUGO, realview_get_board, NULL); +static DEVICE_ATTR_RO(board); -static ssize_t realview_get_arch(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +fpga_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%s\n", realview_arch_str(realview_coreid)); } -static struct device_attribute realview_arch_attr = - __ATTR(fpga, S_IRUGO, realview_get_arch, NULL); +static DEVICE_ATTR_RO(fpga); -static ssize_t realview_get_build(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +build_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%02x\n", (realview_coreid & 0xFF)); } -static struct device_attribute realview_build_attr = - __ATTR(build, S_IRUGO, realview_get_build, NULL); +static DEVICE_ATTR_RO(build); static int realview_soc_probe(struct platform_device *pdev) { @@ -112,10 +104,10 @@ static int realview_soc_probe(struct platform_device *pdev) if (ret) return -ENODEV; - device_create_file(soc_device_to_device(soc_dev), &realview_manf_attr); - device_create_file(soc_device_to_device(soc_dev), &realview_board_attr); - device_create_file(soc_device_to_device(soc_dev), &realview_arch_attr); - device_create_file(soc_device_to_device(soc_dev), &realview_build_attr); + device_create_file(soc_device_to_device(soc_dev), &dev_attr_manufacturer); + device_create_file(soc_device_to_device(soc_dev), &dev_attr_board); + device_create_file(soc_device_to_device(soc_dev), &dev_attr_fpga); + device_create_file(soc_device_to_device(soc_dev), &dev_attr_build); dev_info(&pdev->dev, "RealView Syscon Core ID: 0x%08x, HBI-%03x\n", realview_coreid, -- 2.17.1
Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- drivers/soc/versatile/soc-realview.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/soc/versatile/soc-realview.c b/drivers/soc/versatile/soc-realview.c index cb3bcb7dd824..c6876d232d8f 100644 --- a/drivers/soc/versatile/soc-realview.c +++ b/drivers/soc/versatile/soc-realview.c @@ -71,6 +71,16 @@ build_show(struct device *dev, struct device_attribute *attr, char *buf) static DEVICE_ATTR_RO(build); +static struct attribute *realview_attrs[] = { + &dev_attr_manufacturer.attr, + &dev_attr_board.attr, + &dev_attr_fpga.attr, + &dev_attr_build.attr, + NULL +}; + +ATTRIBUTE_GROUPS(realview); + static int realview_soc_probe(struct platform_device *pdev) { struct regmap *syscon_regmap; @@ -94,6 +104,7 @@ static int realview_soc_probe(struct platform_device *pdev) soc_dev_attr->machine = "RealView"; soc_dev_attr->family = "Versatile"; + soc_dev_attr->custom_attr_group = realview_groups[0]; soc_dev = soc_device_register(soc_dev_attr); if (IS_ERR(soc_dev)) { kfree(soc_dev_attr); @@ -104,11 +115,6 @@ static int realview_soc_probe(struct platform_device *pdev) if (ret) return -ENODEV; - device_create_file(soc_device_to_device(soc_dev), &dev_attr_manufacturer); - device_create_file(soc_device_to_device(soc_dev), &dev_attr_board); - device_create_file(soc_device_to_device(soc_dev), &dev_attr_fpga); - device_create_file(soc_device_to_device(soc_dev), &dev_attr_build); - dev_info(&pdev->dev, "RealView Syscon Core ID: 0x%08x, HBI-%03x\n", realview_coreid, ((realview_coreid >> 16) & 0xfff)); -- 2.17.1
Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- drivers/soc/versatile/soc-integrator.c | 40 +++++++++++--------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/drivers/soc/versatile/soc-integrator.c b/drivers/soc/versatile/soc-integrator.c index ae13fa2aa582..8ba98b3b4e8e 100644 --- a/drivers/soc/versatile/soc-integrator.c +++ b/drivers/soc/versatile/soc-integrator.c @@ -56,45 +56,37 @@ static const char *integrator_fpga_str(u32 id) } } -static ssize_t integrator_get_manf(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +manufacturer_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%02x\n", integrator_coreid >> 24); } -static struct device_attribute integrator_manf_attr = - __ATTR(manufacturer, S_IRUGO, integrator_get_manf, NULL); +static DEVICE_ATTR_RO(manufacturer); -static ssize_t integrator_get_arch(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +arch_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%s\n", integrator_arch_str(integrator_coreid)); } -static struct device_attribute integrator_arch_attr = - __ATTR(arch, S_IRUGO, integrator_get_arch, NULL); +static DEVICE_ATTR_RO(arch); -static ssize_t integrator_get_fpga(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +fpga_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%s\n", integrator_fpga_str(integrator_coreid)); } -static struct device_attribute integrator_fpga_attr = - __ATTR(fpga, S_IRUGO, integrator_get_fpga, NULL); +static DEVICE_ATTR_RO(fpga); -static ssize_t integrator_get_build(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +build_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%02x\n", (integrator_coreid >> 4) & 0xFF); } -static struct device_attribute integrator_build_attr = - __ATTR(build, S_IRUGO, integrator_get_build, NULL); +static DEVICE_ATTR_RO(build); static int __init integrator_soc_init(void) { @@ -134,10 +126,10 @@ static int __init integrator_soc_init(void) } dev = soc_device_to_device(soc_dev); - device_create_file(dev, &integrator_manf_attr); - device_create_file(dev, &integrator_arch_attr); - device_create_file(dev, &integrator_fpga_attr); - device_create_file(dev, &integrator_build_attr); + device_create_file(dev, &dev_attr_manufacturer); + device_create_file(dev, &dev_attr_arch); + device_create_file(dev, &dev_attr_fpga); + device_create_file(dev, &dev_attr_build); dev_info(dev, "Detected ARM core module:\n"); dev_info(dev, " Manufacturer: %02x\n", (val >> 24)); -- 2.17.1
Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- drivers/soc/versatile/soc-integrator.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/soc/versatile/soc-integrator.c b/drivers/soc/versatile/soc-integrator.c index 8ba98b3b4e8e..7dcf77ccd31e 100644 --- a/drivers/soc/versatile/soc-integrator.c +++ b/drivers/soc/versatile/soc-integrator.c @@ -88,6 +88,16 @@ build_show(struct device *dev, struct device_attribute *attr, char *buf) static DEVICE_ATTR_RO(build); +static struct attribute *integrator_attrs[] = { + &dev_attr_manufacturer.attr, + &dev_attr_arch.attr, + &dev_attr_fpga.attr, + &dev_attr_build.attr, + NULL +}; + +ATTRIBUTE_GROUPS(integrator); + static int __init integrator_soc_init(void) { static struct regmap *syscon_regmap; @@ -119,6 +129,7 @@ static int __init integrator_soc_init(void) soc_dev_attr->soc_id = "Integrator"; soc_dev_attr->machine = "Integrator"; soc_dev_attr->family = "Versatile"; + soc_dev_attr->custom_attr_group = integrator_groups[0]; soc_dev = soc_device_register(soc_dev_attr); if (IS_ERR(soc_dev)) { kfree(soc_dev_attr); @@ -126,11 +137,6 @@ static int __init integrator_soc_init(void) } dev = soc_device_to_device(soc_dev); - device_create_file(dev, &dev_attr_manufacturer); - device_create_file(dev, &dev_attr_arch); - device_create_file(dev, &dev_attr_fpga); - device_create_file(dev, &dev_attr_build); - dev_info(dev, "Detected ARM core module:\n"); dev_info(dev, " Manufacturer: %02x\n", (val >> 24)); dev_info(dev, " Architecture: %s\n", integrator_arch_str(val)); -- 2.17.1
Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- drivers/soc/ux500/ux500-soc-id.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/soc/ux500/ux500-soc-id.c b/drivers/soc/ux500/ux500-soc-id.c index d64feeb51a40..55ceb67e066b 100644 --- a/drivers/soc/ux500/ux500-soc-id.c +++ b/drivers/soc/ux500/ux500-soc-id.c @@ -146,9 +146,8 @@ static const char * __init ux500_get_revision(void) return kasprintf(GFP_KERNEL, "%s", "Unknown"); } -static ssize_t ux500_get_process(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +process_show(struct device *dev, struct device_attribute *attr, char *buf) { if (dbx500_id.process == 0x00) return sprintf(buf, "Standard\n"); @@ -156,6 +155,8 @@ static ssize_t ux500_get_process(struct device *dev, return sprintf(buf, "%02xnm\n", dbx500_id.process); } +static DEVICE_ATTR_RO(process); + static const char *db8500_read_soc_id(struct device_node *backupram) { void __iomem *base; @@ -186,9 +187,6 @@ static void __init soc_info_populate(struct soc_device_attribute *soc_dev_attr, soc_dev_attr->revision = ux500_get_revision(); } -static const struct device_attribute ux500_soc_attr = - __ATTR(process, S_IRUGO, ux500_get_process, NULL); - static int __init ux500_soc_device_init(void) { struct device *parent; @@ -218,7 +216,7 @@ static int __init ux500_soc_device_init(void) } parent = soc_device_to_device(soc_dev); - device_create_file(parent, &ux500_soc_attr); + device_create_file(parent, &dev_attr_process); return 0; } -- 2.17.1
Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- drivers/soc/ux500/ux500-soc-id.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/soc/ux500/ux500-soc-id.c b/drivers/soc/ux500/ux500-soc-id.c index 55ceb67e066b..a9472e0e5d61 100644 --- a/drivers/soc/ux500/ux500-soc-id.c +++ b/drivers/soc/ux500/ux500-soc-id.c @@ -157,6 +157,13 @@ process_show(struct device *dev, struct device_attribute *attr, char *buf) static DEVICE_ATTR_RO(process); +static struct attribute *ux500_soc_attrs[] = { + &dev_attr_process.attr, + NULL +}; + +ATTRIBUTE_GROUPS(ux500_soc); + static const char *db8500_read_soc_id(struct device_node *backupram) { void __iomem *base; @@ -185,11 +192,11 @@ static void __init soc_info_populate(struct soc_device_attribute *soc_dev_attr, soc_dev_attr->machine = ux500_get_machine(); soc_dev_attr->family = ux500_get_family(); soc_dev_attr->revision = ux500_get_revision(); + soc_dev_attr->custom_attr_group = ux500_soc_groups[0]; } static int __init ux500_soc_device_init(void) { - struct device *parent; struct soc_device *soc_dev; struct soc_device_attribute *soc_dev_attr; struct device_node *backupram; @@ -215,9 +222,6 @@ static int __init ux500_soc_device_init(void) return PTR_ERR(soc_dev); } - parent = soc_device_to_device(soc_dev); - device_create_file(parent, &dev_attr_process); - return 0; } subsys_initcall(ux500_soc_device_init); -- 2.17.1
Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Cc: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- arch/arm/mach-omap2/id.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 188ea5258c99..37ac2d103548 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -775,15 +775,13 @@ static const char * __init omap_get_family(void) return kasprintf(GFP_KERNEL, "Unknown"); } -static ssize_t omap_get_type(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t +type_show(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%s\n", omap_types[omap_type()]); } -static struct device_attribute omap_soc_attr = - __ATTR(type, S_IRUGO, omap_get_type, NULL); +static DEVICE_ATTR_RO(type); void __init omap_soc_device_init(void) { @@ -806,6 +804,6 @@ void __init omap_soc_device_init(void) } parent = soc_device_to_device(soc_dev); - device_create_file(parent, &omap_soc_attr); + device_create_file(parent, &dev_attr_type); } #endif /* CONFIG_SOC_BUS */ -- 2.17.1
Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Cc: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- arch/arm/mach-omap2/id.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 37ac2d103548..1d119b974f5f 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -783,9 +783,15 @@ type_show(struct device *dev, struct device_attribute *attr, char *buf) static DEVICE_ATTR_RO(type); +static struct attribute *omap_soc_attrs[] = { + &dev_attr_type.attr, + NULL +}; + +ATTRIBUTE_GROUPS(omap_soc); + void __init omap_soc_device_init(void) { - struct device *parent; struct soc_device *soc_dev; struct soc_device_attribute *soc_dev_attr; @@ -796,14 +802,12 @@ void __init omap_soc_device_init(void) soc_dev_attr->machine = soc_name; soc_dev_attr->family = omap_get_family(); soc_dev_attr->revision = soc_rev; + soc_dev_attr->custom_attr_group = omap_soc_groups[0]; soc_dev = soc_device_register(soc_dev_attr); if (IS_ERR(soc_dev)) { kfree(soc_dev_attr); return; } - - parent = soc_device_to_device(soc_dev); - device_create_file(parent, &dev_attr_type); } #endif /* CONFIG_SOC_BUS */ -- 2.17.1
On Sat, May 23, 2020 at 7:09 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
> Move device attributes to DEVICE_ATTR_RO() as that would make things
> a lot more "obvious" what is happening over the existing __ATTR usage.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
On Sat, May 23, 2020 at 7:09 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
> Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs
> entries") introduced custom soc attribute group in soc_device_attribute
> structure but there are no users treewide. While trying to understand
> the motivation and tried to use it, it was found lot of existing custom
> attributes can moved to use it instead of device_create_file.
>
> Though most of these never remove/cleanup the custom attribute as they
> never call soc_device_unregister, using these custom attribute group
> eliminate the need for any cleanup as the driver infrastructure will
> take care of that.
>
> Let us remove device_create_file and start using the custom attribute
> group in soc_device_attribute.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
On Sat, May 23, 2020 at 7:09 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
> Move device attributes to DEVICE_ATTR_RO() as that would make things
> a lot more "obvious" what is happening over the existing __ATTR usage.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
On Sat, May 23, 2020 at 7:09 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
> Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs
> entries") introduced custom soc attribute group in soc_device_attribute
> structure but there are no users treewide. While trying to understand
> the motivation and tried to use it, it was found lot of existing custom
> attributes can moved to use it instead of device_create_file.
>
> Though most of these never remove/cleanup the custom attribute as they
> never call soc_device_unregister, using these custom attribute group
> eliminate the need for any cleanup as the driver infrastructure will
> take care of that.
>
> Let us remove device_create_file and start using the custom attribute
> group in soc_device_attribute.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
On Sat, May 23, 2020 at 7:09 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
> Move device attributes to DEVICE_ATTR_RO() as that would make things
> a lot more "obvious" what is happening over the existing __ATTR usage.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
On Sat, May 23, 2020 at 7:09 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
> Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs
> entries") introduced custom soc attribute group in soc_device_attribute
> structure but there are no users treewide. While trying to understand
> the motivation and tried to use it, it was found lot of existing custom
> attributes can moved to use it instead of device_create_file.
>
> Though most of these never remove/cleanup the custom attribute as they
> never call soc_device_unregister, using these custom attribute group
> eliminate the need for any cleanup as the driver infrastructure will
> take care of that.
>
> Let us remove device_create_file and start using the custom attribute
> group in soc_device_attribute.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
On Sat, May 23, 2020 at 06:08:51PM +0100, Sudeep Holla wrote:
> Hi,
>
> While trying to add SMCCC based SOC_ID support, I found the custom soc
> attribute group which had no users in the tree and check if it can be
> used or can be removed. I realised that it could clean up the custom
> attributes that are added using device_create_file today.
Whole series looks good, nice job.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hi Arnd,
On Wed, May 27, 2020 at 11:03:05AM +0200, Greg Kroah-Hartman wrote:
> On Sat, May 23, 2020 at 06:08:51PM +0100, Sudeep Holla wrote:
> > Hi,
> >
> > While trying to add SMCCC based SOC_ID support, I found the custom soc
> > attribute group which had no users in the tree and check if it can be
> > used or can be removed. I realised that it could clean up the custom
> > attributes that are added using device_create_file today.
>
> Whole series looks good, nice job.
>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Both Linus Walleij and Greg have provided Reviewed-by meaning I need to
take this via ARM SoC. I assume it is late for v5.8 now, do you want me
to resend later for you to pick this directly or need pull request ?
--
Regards,
Sudeep
* Sudeep Holla <sudeep.holla@arm.com> [200523 17:10]:
> Move device attributes to DEVICE_ATTR_RO() as that would make things
> a lot more "obvious" what is happening over the existing __ATTR usage.
Acked-by: Tony Lindgren <tony@atomide.com>
* Sudeep Holla <sudeep.holla@arm.com> [200523 17:10]:
> Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs
> entries") introduced custom soc attribute group in soc_device_attribute
> structure but there are no users treewide. While trying to understand
> the motivation and tried to use it, it was found lot of existing custom
> attributes can moved to use it instead of device_create_file.
>
> Though most of these never remove/cleanup the custom attribute as they
> never call soc_device_unregister, using these custom attribute group
> eliminate the need for any cleanup as the driver infrastructure will
> take care of that.
>
> Let us remove device_create_file and start using the custom attribute
> group in soc_device_attribute.
Acked-by: Tony Lindgren <tony@atomide.com>