Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers: base: component: Allow more space for device name

Some drivers use <BDF>-<UUID> as the aggregate device name which uses
more than 20 chars, causing the status not to be aligned correctly.
Example for mei_gsc_proxy on LNL:

Before:
aggregate_device name status
-------------------------------------------------------------
0000:00:16.0-0f73db04-97ab-4125-b893-e904ad0d5464 bound

After:
aggregate_device name status
-----------------------------------------------------------------------
0000:00:16.0-0f73db04-97ab-4125-b893-e904ad0d5464 bound

Give it 10 more chars for proper alignment.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250205205851.2355820-2-lucas.demarchi@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lucas De Marchi and committed by
Greg Kroah-Hartman
177cbd52 0514059c

+6 -6
+6 -6
drivers/base/component.c
··· 87 87 size_t i; 88 88 89 89 mutex_lock(&component_mutex); 90 - seq_printf(s, "%-40s %20s\n", "aggregate_device name", "status"); 91 - seq_puts(s, "-------------------------------------------------------------\n"); 92 - seq_printf(s, "%-40s %20s\n\n", 90 + seq_printf(s, "%-50s %20s\n", "aggregate_device name", "status"); 91 + seq_puts(s, "-----------------------------------------------------------------------\n"); 92 + seq_printf(s, "%-50s %20s\n\n", 93 93 dev_name(m->parent), m->bound ? "bound" : "not bound"); 94 94 95 - seq_printf(s, "%-40s %20s\n", "device name", "status"); 96 - seq_puts(s, "-------------------------------------------------------------\n"); 95 + seq_printf(s, "%-50s %20s\n", "device name", "status"); 96 + seq_puts(s, "-----------------------------------------------------------------------\n"); 97 97 for (i = 0; i < match->num; i++) { 98 98 struct component *component = match->compare[i].component; 99 99 100 - seq_printf(s, "%-40s %20s\n", 100 + seq_printf(s, "%-50s %20s\n", 101 101 component ? dev_name(component->dev) : "(unknown)", 102 102 component ? (component->bound ? "bound" : "not bound") : "not registered"); 103 103 }