summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Gomez <da.gomez@samsung.com>2025-12-20 04:45:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-16 16:46:14 +0100
commit7a96ccc82c106b763dd561cb87f9c7261dff4f0d (patch)
tree6e98198c574d7b1fef3480a776b7fc79e2e2a6e9 /include
parent5f62af9fd20bea5e3b543cf69655c043cea298bb (diff)
driver core: attribute_container: change return type to void
attribute_container_register() has always returned 0 since its introduction in commit 06ff5a987e ("Add attribute container to generic device model") in the historical Linux tree [1]. Convert the return type to void and update all callers. This removes dead code where callers checked for errors that could never occur. Link: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git [1] Signed-off-by: Daniel Gomez <da.gomez@samsung.com> Link: https://patch.msgid.link/20251220-dev-attribute-container-linux-scsi-v1-1-d58fcd03bf21@samsung.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/attribute_container.h2
-rw-r--r--include/linux/transport_class.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h
index b3643de9931d..fa6520e192be 100644
--- a/include/linux/attribute_container.h
+++ b/include/linux/attribute_container.h
@@ -36,7 +36,7 @@ attribute_container_set_no_classdevs(struct attribute_container *atc)
atc->flags |= ATTRIBUTE_CONTAINER_NO_CLASSDEVS;
}
-int attribute_container_register(struct attribute_container *cont);
+void attribute_container_register(struct attribute_container *cont);
int __must_check attribute_container_unregister(struct attribute_container *cont);
void attribute_container_create_device(struct device *dev,
int (*fn)(struct attribute_container *,
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h
index 2efc271a96fa..9c2e03104461 100644
--- a/include/linux/transport_class.h
+++ b/include/linux/transport_class.h
@@ -87,9 +87,9 @@ transport_unregister_device(struct device *dev)
transport_destroy_device(dev);
}
-static inline int transport_container_register(struct transport_container *tc)
+static inline void transport_container_register(struct transport_container *tc)
{
- return attribute_container_register(&tc->ac);
+ attribute_container_register(&tc->ac);
}
static inline void transport_container_unregister(struct transport_container *tc)
@@ -99,7 +99,7 @@ static inline void transport_container_unregister(struct transport_container *tc
}
int transport_class_register(struct transport_class *);
-int anon_transport_class_register(struct anon_transport_class *);
+void anon_transport_class_register(struct anon_transport_class *);
void transport_class_unregister(struct transport_class *);
void anon_transport_class_unregister(struct anon_transport_class *);