]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drivers: base: component: Allow more space for device name
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 5 Feb 2025 20:58:52 +0000 (12:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 08:20:30 +0000 (09:20 +0100)
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>
drivers/base/component.c

index 741497324d78ae02afb124f50fa33acc857126d2..747c5542c70fa3c071958484d02148143e71a61b 100644 (file)
@@ -87,17 +87,17 @@ static int component_devices_show(struct seq_file *s, void *data)
        size_t i;
 
        mutex_lock(&component_mutex);
-       seq_printf(s, "%-40s %20s\n", "aggregate_device name", "status");
-       seq_puts(s, "-------------------------------------------------------------\n");
-       seq_printf(s, "%-40s %20s\n\n",
+       seq_printf(s, "%-50s %20s\n", "aggregate_device name", "status");
+       seq_puts(s, "-----------------------------------------------------------------------\n");
+       seq_printf(s, "%-50s %20s\n\n",
                   dev_name(m->parent), m->bound ? "bound" : "not bound");
 
-       seq_printf(s, "%-40s %20s\n", "device name", "status");
-       seq_puts(s, "-------------------------------------------------------------\n");
+       seq_printf(s, "%-50s %20s\n", "device name", "status");
+       seq_puts(s, "-----------------------------------------------------------------------\n");
        for (i = 0; i < match->num; i++) {
                struct component *component = match->compare[i].component;
 
-               seq_printf(s, "%-40s %20s\n",
+               seq_printf(s, "%-50s %20s\n",
                           component ? dev_name(component->dev) : "(unknown)",
                           component ? (component->bound ? "bound" : "not bound") : "not registered");
        }