From 1cb9f6f6413e9d242de47e730ec7d4ce3e5688fe Mon Sep 17 00:00:00 2001 From: Mitchell Horne Date: Fri, 8 Mar 2024 10:08:49 -0400 Subject: [PATCH] clk_fixed: quiet by default We may attach several of these devices, but there is no meaningful information added to dmesg. For example: ofwbus0: clk_fixed0: on ofwbus0 clk_fixed1: on ofwbus0 clk_fixed2: on ofwbus0 clk_fixed3: on ofwbus0 clk_fixed4: on ofwbus0 clk_fixed5: on ofwbus0 clk_fixed6: on ofwbus0 clk_fixed7: on ofwbus0 clk_fixed8: on ofwbus0 clk_fixed9: on ofwbus0 clk_fixed10: on ofwbus0 clk_fixed11: on ofwbus0 To reduce this noise, quiet the devices for by default. For verbose boot, the message will be emitted. Reviewed by: manu MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44266 --- sys/dev/clk/clk_fixed.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/clk/clk_fixed.c b/sys/dev/clk/clk_fixed.c index 3f828b24c2b..7aec5b92dfe 100644 --- a/sys/dev/clk/clk_fixed.c +++ b/sys/dev/clk/clk_fixed.c @@ -163,13 +163,18 @@ clk_fixed_probe(device_t dev) return (ENXIO); } device_set_desc(dev, "Fixed clock"); - return (BUS_PROBE_DEFAULT); + break; case CLK_TYPE_FIXED_FACTOR: device_set_desc(dev, "Fixed factor clock"); - return (BUS_PROBE_DEFAULT); + break; default: return (ENXIO); } + + if (!bootverbose) + device_quiet(dev); + + return (BUS_PROBE_DEFAULT); } static int