Thread (1 message) 1 message, 1 author, 2011-08-15

Re: [patch v2 13/37] add rxe_verbs.c

From: Bart Van Assche <hidden>
Date: 2011-08-15 14:33:14

On Sun, Jul 24, 2011 at 9:43 PM,  [off-list ref] wrote:
+	for (i = 0; i < ARRAY_SIZE(rxe_dev_attributes); ++i) {
+		err = device_create_file(&dev->dev, rxe_dev_attributes[i]);
+		if (err) {
+			pr_warn("device_create_file failed, "
+				"i = %d, err = %d\n", i, err);
+			goto err2;
+		}
+	}
(added Greg in CC)

It's not your fault but loops similar to the above for creating device
attributes occur in many drivers in the Linux kernel. How about adding
functions called device_create_files() and device_remote_files()
functions in drivers/base/core.c ? If you want you can start from the
implementations of sysfs_create_files() and sysfs_remove_files() in
fs/sysfs/file.c.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help