Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177562824
D61537.1794736214.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D61537.1794736214.diff
View Options
diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -280,7 +280,7 @@
asmc_shutdown, dev, SHUTDOWN_PRI_FIRST);
/* System state / board identity subtree. */
- (void)asmc_sysctl_add_system(dev, sysctlctx);
+ asmc_sysctl_add_system(dev, sysctlctx);
if (!sc->sc_has_sms)
goto nosms;
diff --git a/sys/dev/asmc/asmc_sysctl.h b/sys/dev/asmc/asmc_sysctl.h
--- a/sys/dev/asmc/asmc_sysctl.h
+++ b/sys/dev/asmc/asmc_sysctl.h
@@ -9,14 +9,14 @@
/*
* Sysctl subtree builders, one per dev.asmc.N node. asmc_attach() calls these
- * in registration order; only add_system can fail, and only because the key
- * count it reads is what tells the rest of the driver the SMC is there.
+ * in registration order; a node that fails to create just leaves that subtree
+ * missing, so none of these are fatal to attach.
*/
void asmc_sysctl_add_fan(device_t dev, struct sysctl_ctx_list *ctx);
void asmc_sysctl_add_temp(device_t dev, struct sysctl_ctx_list *ctx);
void asmc_sysctl_add_light(device_t dev, struct sysctl_ctx_list *ctx);
void asmc_sysctl_add_sms(device_t dev, struct sysctl_ctx_list *ctx);
-int asmc_sysctl_add_system(device_t dev, struct sysctl_ctx_list *ctx);
+void asmc_sysctl_add_system(device_t dev, struct sysctl_ctx_list *ctx);
void asmc_sysctl_add_platform(device_t dev, struct sysctl_ctx_list *ctx);
/* Registered by the core's sensor range scan, one OID per detected key. */
diff --git a/sys/dev/asmc/asmc_sysctl.c b/sys/dev/asmc/asmc_sysctl.c
--- a/sys/dev/asmc/asmc_sysctl.c
+++ b/sys/dev/asmc/asmc_sysctl.c
@@ -532,7 +532,7 @@
"IU", CTLTYPE_UINT | CTLFLAG_RD, 0, asmc_rgen_sysctl, 0, 0 },
};
-int
+void
asmc_sysctl_add_system(device_t dev, struct sysctl_ctx_list *ctx)
{
struct sysctl_oid *sys_tree;
@@ -543,7 +543,7 @@
"System state and board identity");
if (sys_tree == NULL) {
device_printf(dev, "failed to create system sysctl node\n");
- return (ENXIO);
+ return;
}
for (unsigned int k = 0; k < nitems(asmc_system_sysctls); k++) {
@@ -566,8 +566,6 @@
asmc_system_sysctls[k].fmt,
asmc_system_sysctls[k].desc, NULL);
}
-
- return (0);
}
/* Platform toggles under dev.asmc.n, each present only if its key reads. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 9:50 AM (12 h, 14 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41741319
Default Alt Text
D61537.1794736214.diff (2 KB)
Attached To
Mode
D61537: asmc: make asmc_sysctl_add_system() void
Attached
Detach File
Event Timeline