git: b391f3f3e007 - main - asmc: Fix style(9) issues

From: Abdelkader Boudih <seuros_at_FreeBSD.org>
Date: Mon, 09 Nov 2026 18:36:59 UTC
The branch main has been updated by seuros:

URL: https://cgit.FreeBSD.org/src/commit/?id=b391f3f3e007c067a7e4475d91d981f91add0596

commit b391f3f3e007c067a7e4475d91d981f91add0596
Author:     Abdelkader Boudih <seuros@FreeBSD.org>
AuthorDate: 2026-11-09 18:35:57 +0000
Commit:     Abdelkader Boudih <seuros@FreeBSD.org>
CommitDate: 2026-11-09 18:35:57 +0000

    asmc: Fix style(9) issues
    
    fix operator and comma spacing and three long lines
    
    MFC After: 1 Week
    Approved-by: ngie (co-mentor)
    
    Reviewed by:    ngie, imp
    Differential Revision:  https://reviews.freebsd.org/D61302
---
 sys/dev/asmc/asmc.c        | 5 +++--
 sys/dev/asmc/asmc_debug.c  | 5 +++--
 sys/dev/asmc/asmc_pio.c    | 2 +-
 sys/dev/asmc/asmc_sysctl.c | 7 ++++---
 sys/dev/asmc/asmcvar.h     | 2 +-
 5 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
index b91a0315e65c..cff1b3bf3311 100644
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -81,7 +81,8 @@ static int	asmc_backlight_update_status(device_t dev,
     struct backlight_props *props);
 static int	asmc_backlight_get_status(device_t dev,
     struct backlight_props *props);
-static int	asmc_backlight_get_info(device_t dev, struct backlight_info *info);
+static int	asmc_backlight_get_info(device_t dev,
+    struct backlight_info *info);
 
 /*
  * SMC functions.
@@ -236,7 +237,7 @@ asmc_attach(device_t dev)
 	/* Probe SMC keys to detect capabilities */
 	asmc_detect_capabilities(dev);
 
-	/* Auto-detect and register voltage/current/power/ambient/temp sensors */
+	/* Auto-detect voltage/current/power/ambient/temp sensors */
 	asmc_detect_sensors(dev);
 
 	asmc_sysctl_add_fan(dev, sysctlctx);
diff --git a/sys/dev/asmc/asmc_debug.c b/sys/dev/asmc/asmc_debug.c
index 2826ed5cbfca..29d7983d1a8e 100644
--- a/sys/dev/asmc/asmc_debug.c
+++ b/sys/dev/asmc/asmc_debug.c
@@ -145,9 +145,10 @@ asmc_raw_value_sysctl(SYSCTL_HANDLER_ARGS)
 		return (EINVAL);
 
 	memset(sc->sc_rawval, 0, sizeof(sc->sc_rawval));
-	for (i = 0; i < sc->sc_rawlen && hexbuf[i*2] && hexbuf[i*2+1]; i++) {
+	for (i = 0; i < sc->sc_rawlen && hexbuf[i * 2] &&
+	    hexbuf[i * 2 + 1]; i++) {
 		unsigned int val;
-		char tmp[3] = { hexbuf[i*2], hexbuf[i*2+1], 0 };
+		char tmp[3] = { hexbuf[i * 2], hexbuf[i * 2 + 1], 0 };
 		if (sscanf(tmp, "%02x", &val) == 1)
 			sc->sc_rawval[i] = (uint8_t)val;
 	}
diff --git a/sys/dev/asmc/asmc_pio.c b/sys/dev/asmc/asmc_pio.c
index 12847d4979ba..d39dd55bd103 100644
--- a/sys/dev/asmc/asmc_pio.c
+++ b/sys/dev/asmc/asmc_pio.c
@@ -218,7 +218,7 @@ out:
 /*
  * Get key info (length and type) from SMC using command 0x13.
  * If len is non-NULL, stores the key's value length.
- * If type is non-NULL, stores the 4-char type string (must be at least 5 bytes).
+ * If type is non-NULL, stores the 4-char type string; it needs 5 bytes.
  */
 int
 asmc_pio_key_getinfo(device_t dev, const char *key, uint8_t *len, char *type)
diff --git a/sys/dev/asmc/asmc_sysctl.c b/sys/dev/asmc/asmc_sysctl.c
index 38ef894a978f..6a6e482e9d63 100644
--- a/sys/dev/asmc/asmc_sysctl.c
+++ b/sys/dev/asmc/asmc_sysctl.c
@@ -56,7 +56,7 @@ static const struct asmc_cause asmc_cause_table[] = {
 	{   -2,	"power-supply",			NULL },
 	{   -3,	"temperature-multisleep",	NULL },
 	{   -4,	"sensor-fan",			NULL },
-	{  -30,	"temperature-overlimit-timeout",NULL },
+	{  -30,	"temperature-overlimit-timeout", NULL },
 	{  -40,	"pswr-smrst",			NULL },	/* power supply watchdog reset */
 	{  -50,	"unmapped",			NULL },
 	{  -60,	"low-battery",			NULL },
@@ -823,10 +823,11 @@ asmc_mb_sysctl_fanmanual(SYSCTL_HANDLER_ARGS)
 			val = (buf[0] << 8) | buf[1];
 
 			/* Modify single bit */
-			if (v)
+			if (v) {
 				val |= (1 << fan);   /* Set to manual */
-			else
+			} else {
 				val &= ~(1 << fan);  /* Set to auto */
+			}
 
 			/* Write back */
 			buf[0] = val >> 8;
diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h
index 41c963021e9c..7d9495536552 100644
--- a/sys/dev/asmc/asmcvar.h
+++ b/sys/dev/asmc/asmcvar.h
@@ -51,7 +51,7 @@ struct asmc_softc {
 	int16_t			sms_rest_x;
 	int16_t			sms_rest_y;
 	int16_t			sms_rest_z;
-	struct sysctl_oid 	*sc_fan_tree[ASMC_MAXFANS+1];
+	struct sysctl_oid 	*sc_fan_tree[ASMC_MAXFANS + 1];
 	struct sysctl_oid 	*sc_temp_tree;
 	struct sysctl_oid 	*sc_sms_tree;
 	struct sysctl_oid 	*sc_light_tree;