mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
Eliminate all 'inline's from the flashrom code
They serve pretty much no purpose, compilers can optimize pretty much all of what we might mark as inline anyway, _and_ inlines are not enforced in any way by the compiler either. They're totally unneeded. Kill them. Corresponding to flashrom svn r522. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
60
flash.h
60
flash.h
@ -104,55 +104,17 @@ struct programmer_entry {
|
||||
|
||||
extern const struct programmer_entry programmer_table[];
|
||||
|
||||
static inline int programmer_init(void)
|
||||
{
|
||||
return programmer_table[programmer].init();
|
||||
}
|
||||
|
||||
static inline int programmer_shutdown(void)
|
||||
{
|
||||
return programmer_table[programmer].shutdown();
|
||||
}
|
||||
|
||||
static inline void *programmer_map_flash_region(const char *descr, unsigned long phys_addr, size_t len)
|
||||
{
|
||||
return programmer_table[programmer].map_flash_region(descr, phys_addr, len);
|
||||
}
|
||||
|
||||
static inline void programmer_unmap_flash_region(void *virt_addr, size_t len)
|
||||
{
|
||||
programmer_table[programmer].unmap_flash_region(virt_addr, len);
|
||||
}
|
||||
|
||||
static inline void chip_writeb(uint8_t val, chipaddr addr)
|
||||
{
|
||||
programmer_table[programmer].chip_writeb(val, addr);
|
||||
}
|
||||
|
||||
static inline void chip_writew(uint16_t val, chipaddr addr)
|
||||
{
|
||||
programmer_table[programmer].chip_writew(val, addr);
|
||||
}
|
||||
|
||||
static inline void chip_writel(uint32_t val, chipaddr addr)
|
||||
{
|
||||
programmer_table[programmer].chip_writel(val, addr);
|
||||
}
|
||||
|
||||
static inline uint8_t chip_readb(const chipaddr addr)
|
||||
{
|
||||
return programmer_table[programmer].chip_readb(addr);
|
||||
}
|
||||
|
||||
static inline uint16_t chip_readw(const chipaddr addr)
|
||||
{
|
||||
return programmer_table[programmer].chip_readw(addr);
|
||||
}
|
||||
|
||||
static inline uint32_t chip_readl(const chipaddr addr)
|
||||
{
|
||||
return programmer_table[programmer].chip_readl(addr);
|
||||
}
|
||||
int programmer_init(void);
|
||||
int programmer_shutdown(void);
|
||||
void *programmer_map_flash_region(const char *descr, unsigned long phys_addr,
|
||||
size_t len);
|
||||
void programmer_unmap_flash_region(void *virt_addr, size_t len);
|
||||
void chip_writeb(uint8_t val, chipaddr addr);
|
||||
void chip_writew(uint16_t val, chipaddr addr);
|
||||
void chip_writel(uint32_t val, chipaddr addr);
|
||||
uint8_t chip_readb(const chipaddr addr);
|
||||
uint16_t chip_readw(const chipaddr addr);
|
||||
uint32_t chip_readl(const chipaddr addr);
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
|
||||
|
Reference in New Issue
Block a user