Commit f3d3d307 authored by Nathan Lynch's avatar Nathan Lynch Committed by Paul Mackerras

powerpc: Remove redundant sysfs_remove_file calls for cache info

When removing a directory, the sysfs core takes care of removing files
in the directory (see sysfs_remove_dir()).  So when we are about to
delete a kobject (and thus cause its sysfs directory to be removed),
we don't have to explicitly remove the files attached to it, although
it's harmless to do so.
Signed-off-by: default avatarNathan Lynch <ntl@pobox.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 8f6ba492
...@@ -641,16 +641,9 @@ static void remove_cache_info(struct sys_device *sysdev) ...@@ -641,16 +641,9 @@ static void remove_cache_info(struct sys_device *sysdev)
int cpu = sysdev->id; int cpu = sysdev->id;
cache_desc = per_cpu(cache_desc, cpu); cache_desc = per_cpu(cache_desc, cpu);
if (cache_desc != NULL) { if (cache_desc != NULL)
sysfs_remove_file(&cache_desc->kobj, &cache_size_attr.attr);
sysfs_remove_file(&cache_desc->kobj, &cache_line_size_attr.attr);
sysfs_remove_file(&cache_desc->kobj, &cache_type_attr.attr);
sysfs_remove_file(&cache_desc->kobj, &cache_level_attr.attr);
sysfs_remove_file(&cache_desc->kobj, &cache_nr_sets_attr.attr);
sysfs_remove_file(&cache_desc->kobj, &cache_assoc_attr.attr);
kobject_put(&cache_desc->kobj); kobject_put(&cache_desc->kobj);
}
cache_toplevel = per_cpu(cache_toplevel, cpu); cache_toplevel = per_cpu(cache_toplevel, cpu);
if (cache_toplevel != NULL) if (cache_toplevel != NULL)
kobject_put(cache_toplevel); kobject_put(cache_toplevel);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment