]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/cacheinfo: Align ci_info_init() assignment expressions
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:33:04 +0000 (14:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:22:26 +0000 (10:22 +0100)
The ci_info_init() function initializes 10 members of a 'struct cacheinfo'
instance using passed data from CPUID leaf 0x4.

Such assignment expressions are difficult to read in their current form.
Align them for clarity.

Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250324133324.23458-10-darwi@linutronix.de
arch/x86/kernel/cpu/cacheinfo.c

index fc4b49ec42dfb1bcb38b4dd63239203f1191ad7b..b273ecf3f538401bcab13db1fb46cff4d5b2c416 100644 (file)
@@ -936,19 +936,16 @@ static void __cache_cpumap_setup(unsigned int cpu, int index,
 static void ci_info_init(struct cacheinfo *ci,
                         const struct _cpuid4_info_regs *base)
 {
-       ci->id = base->id;
-       ci->attributes = CACHE_ID;
-       ci->level = base->eax.split.level;
-       ci->type = cache_type_map[base->eax.split.type];
-       ci->coherency_line_size =
-                               base->ebx.split.coherency_line_size + 1;
-       ci->ways_of_associativity =
-                               base->ebx.split.ways_of_associativity + 1;
-       ci->size = base->size;
-       ci->number_of_sets = base->ecx.split.number_of_sets + 1;
-       ci->physical_line_partition =
-                               base->ebx.split.physical_line_partition + 1;
-       ci->priv = base->nb;
+       ci->id                          = base->id;
+       ci->attributes                  = CACHE_ID;
+       ci->level                       = base->eax.split.level;
+       ci->type                        = cache_type_map[base->eax.split.type];
+       ci->coherency_line_size         = base->ebx.split.coherency_line_size + 1;
+       ci->ways_of_associativity       = base->ebx.split.ways_of_associativity + 1;
+       ci->size                        = base->size;
+       ci->number_of_sets              = base->ecx.split.number_of_sets + 1;
+       ci->physical_line_partition     = base->ebx.split.physical_line_partition + 1;
+       ci->priv                        = base->nb;
 }
 
 int init_cache_level(unsigned int cpu)