Thread (23 messages) flat view 23 messages, 3 authors, 2006-10-26

Re: [PATCH 11/16] sysfs: add support for adding/removing spu sysfs attributes

From: Heiko Carstens <hidden>
Date: 2006-10-25 07:52:43
Also in: lkml

+int cpu_add_sysdev_attr(struct sysdev_attribute *attr)
+{
+	int cpu;
+
+	mutex_lock(&cpu_mutex);
+
+	for_each_possible_cpu(cpu) {
+		sysdev_create_file(get_cpu_sysdev(cpu), attr);
+	}
+
+	mutex_unlock(&cpu_mutex);
+	return 0;
+}
You probably should check for errors on sysdev_create_file, clean up and
return an error number instead of always 0.
This is true for all the new functions here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help