]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: cpu: Mark a few functions static
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 5 Oct 2024 19:11:58 +0000 (22:11 +0300)
committerSimon Glass <sjg@chromium.org>
Fri, 18 Oct 2024 20:10:22 +0000 (14:10 -0600)
Some functions are not used anywhere except the same file
where they are defined. Mark them static. This helps avoiding
the compiler warnings:

  arch/x86/cpu/cpu.c:343:6: warning: no previous prototype for ‘detect_coreboot_table_at’ [-Wmissing-prototypes]
  arch/x86/cpu/mtrr.c:90:6: warning: no previous prototype for ‘mtrr_write_all’ [-Wmissing-prototypes]
  arch/x86/cpu/i386/interrupt.c:240:6: warning: no previous prototype for ‘__do_irq’ [-Wmissing-prototypes]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/cpu.c
arch/x86/cpu/i386/interrupt.c
arch/x86/cpu/mtrr.c

index 40dd5ecb107a1c7e99e6c425ecf1884a9adfa366..a8b21406ac06cc47ea6249691ba849cec7ec2527 100644 (file)
@@ -340,7 +340,7 @@ int reserve_arch(void)
 }
 #endif
 
-long detect_coreboot_table_at(ulong start, ulong size)
+static long detect_coreboot_table_at(ulong start, ulong size)
 {
        u32 *ptr, *end;
 
index b3f4214acdb7729872b66a848d7961e47357871e..6f78b072cde530b4d91b0beb582968014bec55fe 100644 (file)
@@ -237,7 +237,7 @@ void *x86_get_idt(void)
        return &idt_ptr;
 }
 
-void __do_irq(int irq)
+static void __do_irq(int irq)
 {
        printf("Unhandled IRQ : %d\n", irq);
 }
index 50cba5fb88dc49231242d47d8e4cb4eebbbe6d8d..07ea89162dee2ea50a5a56e8a3deaf759966e394 100644 (file)
@@ -87,7 +87,7 @@ void mtrr_read_all(struct mtrr_info *info)
        }
 }
 
-void mtrr_write_all(struct mtrr_info *info)
+static void mtrr_write_all(struct mtrr_info *info)
 {
        int reg_count = mtrr_get_var_count();
        struct mtrr_state state;