aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-01-14 07:30:21 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-05-26 13:45:24 +0000
commit3813ca521a6cd7348ce111c3f46cbee66a1b964d (patch)
tree327922404460cd26388d1f26721670879cb619c9 /src
parent764167b8ca91b136b068f1d3f03adf5f50af615a (diff)
treewide: Remove 'extern' from functions declaration
"extern" is automatically implied with function declaration. Change-Id: Ic40218acab5a009621b6882faacfcac800aaf0b9 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71890 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/arch/riscv/include/arch/pmp.h2
-rw-r--r--src/arch/x86/include/arch/interrupt.h2
-rw-r--r--src/drivers/i2c/ptn3460/ptn3460.h7
-rw-r--r--src/include/assert.h2
-rw-r--r--src/include/cpu/intel/l2_cache.h18
-rw-r--r--src/include/device/device.h2
-rw-r--r--src/include/elog.h22
-rw-r--r--src/mainboard/google/butterfly/ec.h2
-rw-r--r--src/mainboard/google/parrot/ec.h2
-rw-r--r--src/mainboard/intel/emeraldlake2/ec.h2
-rw-r--r--src/mainboard/samsung/lumpy/ec.h2
-rw-r--r--src/soc/mediatek/mt8192/include/soc/srclken_rc.h2
-rw-r--r--src/soc/qualcomm/ipq40xx/include/soc/ipq_uart.h2
-rw-r--r--src/soc/qualcomm/ipq806x/include/soc/ipq_uart.h2
-rw-r--r--src/soc/qualcomm/qcs405/include/soc/uart.h2
15 files changed, 35 insertions, 36 deletions
diff --git a/src/arch/riscv/include/arch/pmp.h b/src/arch/riscv/include/arch/pmp.h
index 663e50a97f..b25fc965bc 100644
--- a/src/arch/riscv/include/arch/pmp.h
+++ b/src/arch/riscv/include/arch/pmp.h
@@ -9,7 +9,7 @@
* this function needs to be implemented by a specific SoC.
* return number of PMP entries for current hart
*/
-extern int pmp_entries_num(void);
+int pmp_entries_num(void);
/* reset PMP setting */
void reset_pmp(void);
diff --git a/src/arch/x86/include/arch/interrupt.h b/src/arch/x86/include/arch/interrupt.h
index a4a80f1da7..3ed711a74d 100644
--- a/src/arch/x86/include/arch/interrupt.h
+++ b/src/arch/x86/include/arch/interrupt.h
@@ -7,7 +7,7 @@
/* setup interrupt handlers for mainboard */
#if CONFIG(PCI_OPTION_ROM_RUN_REALMODE)
-extern void mainboard_interrupt_handlers(int intXX, int (*intXX_func)(void));
+void mainboard_interrupt_handlers(int intXX, int (*intXX_func)(void));
#elif CONFIG(PCI_OPTION_ROM_RUN_YABEL)
#include <device/oprom/yabel/biosemu.h>
#else
diff --git a/src/drivers/i2c/ptn3460/ptn3460.h b/src/drivers/i2c/ptn3460/ptn3460.h
index a3fa60bdc0..ac342abefc 100644
--- a/src/drivers/i2c/ptn3460/ptn3460.h
+++ b/src/drivers/i2c/ptn3460/ptn3460.h
@@ -51,9 +51,8 @@ struct ptn_3460_flash {
} __packed;
/* We need functions which we can call to get mainboard specific data */
-/* These functions can be implemented somewhere else but must exist. */
-extern enum cb_err mainboard_ptn3460_get_edid(uint8_t edid_data[PTN_EDID_LEN]);
-extern uint8_t mainboard_ptn3460_select_edid_table(void);
-extern enum cb_err mainboard_ptn3460_config(struct ptn_3460_config *cfg_ptr);
+enum cb_err mainboard_ptn3460_get_edid(uint8_t edid_data[PTN_EDID_LEN]);
+uint8_t mainboard_ptn3460_select_edid_table(void);
+enum cb_err mainboard_ptn3460_config(struct ptn_3460_config *cfg_ptr);
#endif /* _I2C_PTN3460_H_ */
diff --git a/src/include/assert.h b/src/include/assert.h
index 8729bef9f7..0e09eef392 100644
--- a/src/include/assert.h
+++ b/src/include/assert.h
@@ -96,7 +96,7 @@ void mock_assert(const int result, const char *const expression,
* ramstage/lib/bootmode.o: In function `display_init_required':
* bootmode.c:42: undefined reference to `_dead_code_assertion_failed'
*/
-extern void _dead_code_assertion_failed(void) __attribute__((noreturn));
+void _dead_code_assertion_failed(void) __attribute__((noreturn));
#define dead_code() _dead_code_assertion_failed()
/* This can be used in the context of an expression of type 'type'. */
diff --git a/src/include/cpu/intel/l2_cache.h b/src/include/cpu/intel/l2_cache.h
index ceddf1d150..a859dfaf1e 100644
--- a/src/include/cpu/intel/l2_cache.h
+++ b/src/include/cpu/intel/l2_cache.h
@@ -69,17 +69,17 @@
#define L2CMD_MESI_S 1
#define L2CMD_MESI_I 0
-extern int calculate_l2_latency(void);
-extern int signal_l2(u32 address_low, u32 data_high, u32 data_low, int way,
+int calculate_l2_latency(void);
+int signal_l2(u32 address_low, u32 data_high, u32 data_low, int way,
u8 command);
-extern int read_l2(u32 address);
-extern int write_l2(u32 address, u32 data);
-extern int test_l2_address_alias(u32 address1, u32 address2, u32 data_high,
+int read_l2(u32 address);
+int write_l2(u32 address, u32 data);
+int test_l2_address_alias(u32 address1, u32 address2, u32 data_high,
u32 data_low);
-extern int calculate_l2_cache_size(void);
-extern int calculate_l2_physical_address_range(void);
-extern int set_l2_ecc(void);
+int calculate_l2_cache_size(void);
+int calculate_l2_physical_address_range(void);
+int set_l2_ecc(void);
-extern int p6_configure_l2_cache(void);
+int p6_configure_l2_cache(void);
#endif /* __P6_L2_CACHE_H */
diff --git a/src/include/device/device.h b/src/include/device/device.h
index d044ae2b8f..f86a52d1b2 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -207,7 +207,7 @@ bool is_enabled_pci(const struct device *pci);
bool is_pci_dev_on_bus(const struct device *pci, unsigned int bus);
/* Returns whether there is a hotplug port on the path to the given device. */
-extern bool dev_path_hotplug(const struct device *);
+bool dev_path_hotplug(const struct device *);
/* Option ROM helper functions */
void run_bios(struct device *dev, unsigned long addr);
diff --git a/src/include/elog.h b/src/include/elog.h
index 29904cdb33..db59b76ac8 100644
--- a/src/include/elog.h
+++ b/src/include/elog.h
@@ -8,17 +8,17 @@
#if CONFIG(ELOG)
/* Eventlog backing storage must be initialized before calling elog_init(). */
-extern int elog_init(void);
-extern int elog_clear(void);
+int elog_init(void);
+int elog_clear(void);
/* Event addition functions return < 0 on failure and 0 on success. */
-extern int elog_add_event_raw(u8 event_type, void *data, u8 data_size);
-extern int elog_add_event(u8 event_type);
-extern int elog_add_event_byte(u8 event_type, u8 data);
-extern int elog_add_event_word(u8 event_type, u16 data);
-extern int elog_add_event_dword(u8 event_type, u32 data);
-extern int elog_add_event_wake(u8 source, u32 instance);
-extern int elog_smbios_write_type15(unsigned long *current, int handle);
-extern int elog_add_extended_event(u8 type, u32 complement);
+int elog_add_event_raw(u8 event_type, void *data, u8 data_size);
+int elog_add_event(u8 event_type);
+int elog_add_event_byte(u8 event_type, u8 data);
+int elog_add_event_word(u8 event_type, u16 data);
+int elog_add_event_dword(u8 event_type, u32 data);
+int elog_add_event_wake(u8 source, u32 instance);
+int elog_smbios_write_type15(unsigned long *current, int handle);
+int elog_add_extended_event(u8 type, u32 complement);
#else
/* Stubs to help avoid littering sources with #if CONFIG_ELOG */
static inline int elog_init(void) { return -1; }
@@ -47,7 +47,7 @@ static inline int elog_gsmi_add_event_byte(u8 event_type, u8 data) { return 0; }
static inline int elog_gsmi_add_event_word(u8 event_type, u16 data) { return 0; }
#endif
-extern u32 gsmi_exec(u8 command, u32 *param);
+u32 gsmi_exec(u8 command, u32 *param);
#if CONFIG(ELOG_BOOT_COUNT)
u32 boot_count_read(void);
diff --git a/src/mainboard/google/butterfly/ec.h b/src/mainboard/google/butterfly/ec.h
index 1c837cb649..87021b1fcf 100644
--- a/src/mainboard/google/butterfly/ec.h
+++ b/src/mainboard/google/butterfly/ec.h
@@ -8,7 +8,7 @@
/* EC SMI sources TODO: MLR- make defines */
#ifndef __ACPI__
-extern void butterfly_ec_init(void);
+void butterfly_ec_init(void);
#endif
#endif // BUTTERFLY_EC_H
diff --git a/src/mainboard/google/parrot/ec.h b/src/mainboard/google/parrot/ec.h
index ff9d558e27..a77cf63e28 100644
--- a/src/mainboard/google/parrot/ec.h
+++ b/src/mainboard/google/parrot/ec.h
@@ -41,7 +41,7 @@
*/
#ifndef __ACPI__
-extern void parrot_ec_init(void);
+void parrot_ec_init(void);
u8 parrot_rev(void);
#endif
diff --git a/src/mainboard/intel/emeraldlake2/ec.h b/src/mainboard/intel/emeraldlake2/ec.h
index 17d6a7cc4d..e675083452 100644
--- a/src/mainboard/intel/emeraldlake2/ec.h
+++ b/src/mainboard/intel/emeraldlake2/ec.h
@@ -31,6 +31,6 @@
#define EC_FAN_SPEED_LEVEL_4 0x10 /* Level 4 is off */
#define EC_FAN_SPEED_FLAG_OS 0x80 /* OS control of fan speed */
-extern void lumpy_ec_init(void);
+void lumpy_ec_init(void);
#endif // LUMPY_EC_H
diff --git a/src/mainboard/samsung/lumpy/ec.h b/src/mainboard/samsung/lumpy/ec.h
index 891d7ecacc..cd55df0bcf 100644
--- a/src/mainboard/samsung/lumpy/ec.h
+++ b/src/mainboard/samsung/lumpy/ec.h
@@ -39,6 +39,6 @@
#define EC_LID_CLOSE 0x9c /* Lid close event */
#define EC_LID_OPEN 0x9d /* Lid open event */
-extern void lumpy_ec_init(void);
+void lumpy_ec_init(void);
#endif // LUMPY_EC_H
diff --git a/src/soc/mediatek/mt8192/include/soc/srclken_rc.h b/src/soc/mediatek/mt8192/include/soc/srclken_rc.h
index dc0a076087..240cecd616 100644
--- a/src/soc/mediatek/mt8192/include/soc/srclken_rc.h
+++ b/src/soc/mediatek/mt8192/include/soc/srclken_rc.h
@@ -186,6 +186,6 @@ struct subsys_rc_con {
unsigned int dcxo_settle_blk_en;
};
-extern int srclken_rc_init(void);
+int srclken_rc_init(void);
#endif /* SOC_MEDIATEK_MT8192_SRCLKEN_RC_H */
diff --git a/src/soc/qualcomm/ipq40xx/include/soc/ipq_uart.h b/src/soc/qualcomm/ipq40xx/include/soc/ipq_uart.h
index feac71c7b9..315c2c3253 100644
--- a/src/soc/qualcomm/ipq40xx/include/soc/ipq_uart.h
+++ b/src/soc/qualcomm/ipq40xx/include/soc/ipq_uart.h
@@ -8,7 +8,7 @@
#define MSM_BOOT_UART_DM_EXTR_BITS(value, start_pos, end_pos) \
((value << (32 - end_pos)) >> (32 - (end_pos - start_pos)))
-extern void __udelay(unsigned long usec);
+void __udelay(unsigned long usec);
enum MSM_BOOT_UART_DM_PARITY_MODE {
MSM_BOOT_UART_DM_NO_PARITY,
diff --git a/src/soc/qualcomm/ipq806x/include/soc/ipq_uart.h b/src/soc/qualcomm/ipq806x/include/soc/ipq_uart.h
index 5903652d25..a1db74def8 100644
--- a/src/soc/qualcomm/ipq806x/include/soc/ipq_uart.h
+++ b/src/soc/qualcomm/ipq806x/include/soc/ipq_uart.h
@@ -9,7 +9,7 @@
((value << (32 - end_pos))\
>> (32 - (end_pos - start_pos)))
-extern void __udelay(unsigned long usec);
+void __udelay(unsigned long usec);
enum MSM_BOOT_UART_DM_PARITY_MODE {
MSM_BOOT_UART_DM_NO_PARITY,
diff --git a/src/soc/qualcomm/qcs405/include/soc/uart.h b/src/soc/qualcomm/qcs405/include/soc/uart.h
index c222add717..3d85de90d0 100644
--- a/src/soc/qualcomm/qcs405/include/soc/uart.h
+++ b/src/soc/qualcomm/qcs405/include/soc/uart.h
@@ -8,7 +8,7 @@
#define MSM_BOOT_UART_DM_EXTR_BITS(value, start_pos, end_pos) \
((value << (32 - end_pos)) >> (32 - (end_pos - start_pos)))
-extern void __udelay(unsigned long usec);
+void __udelay(unsigned long usec);
enum MSM_BOOT_UART_DM_PARITY_MODE {
MSM_BOOT_UART_DM_NO_PARITY,