Thread (22 messages) 22 messages, 7 authors, 2018-08-14

Re: [PATCH 3/6] nvme: register ns_id attributes as default sysfs groups

From: Bart Van Assche <hidden>
Date: 2018-08-13 19:51:16

On Mon, 2018-07-30 at 09:12 +0200, Hannes Reinecke wrote:
quoted hunk ↗ jump to hunk
@@ -3061,11 +3066,7 @@ static void nvme_alloc_ns=
(struct nvme_ctrl *ctrl, unsigned nsid)
=20
 	nvme_get_ctrl(ctrl);
=20
-	device_add_disk(ctrl->device, ns->disk, NULL);
-	if (sysfs_create_group(&disk_to_dev(ns->dis=
k)->kobj,
-					&nvme_ns_id_attr_group))
-		pr_warn("%s: failed to create sysfs group for identifica=
tion\n",
-			ns->disk->disk_name);
+	device_add_disk(ctrl->device, ns->disk, nvme_n=
s_id_attr_groups);
 	if (ns->ndev && nvme_nvm_register_sysfs(ns))
 		pr_warn("%s: failed to register lightnvm sysfs group for=
 identification\n",
 			ns->disk->disk_name);
Hello Hannes,

Have you noticed that nvme_nvm_register_sysfs() also registers =
sysfs attributes
and hence that the attributes registered by that function should be merged =
into
the nvme_ns_id_attr_groups array?

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help