[coreboot] [RFC] Error out on implicit declarations

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Mon Dec 22 16:51:56 CET 2008


On 18.12.2008 15:52, Jordan Crouse wrote:
> Myles Watson wrote:
>> On Thu, Dec 18, 2008 at 3:18 AM, Carl-Daniel Hailfinger <
>> c-d.hailfinger.devel.2006 at gmx.net> wrote:
>>
>>> Bao, Zheng found a bug which killed SATA booting on my board.
>>>
>>> This happened because we do not error out on implicit function
>>> declarations. The linker has no way of checking whether the implicitly
>>> assumed function signature is identical to the real signature, so
>>> mismatches can occur and these mismatches are practically impossible to
>>> debug because the code looks completely correct.
>>>
>>> Adding -Werror-implicit-function-declaration to our CFLAGS would solve
>>> this problem nicely, but a lot of files in the tree need to be fixed.

Fix implicit udelay src/southbridge/nvidia/mcp55/mcp55_aza.c
Fix imlicit mdelay in src/southbridge/nvidia/mcp55/mcp55_nic.c

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

abuild tested on all MCP55 targets.

Index: LinuxBIOSv2-implicit_declarations/src/southbridge/nvidia/mcp55/mcp55_nic.c
===================================================================
--- LinuxBIOSv2-implicit_declarations/src/southbridge/nvidia/mcp55/mcp55_nic.c	(Revision 3829)
+++ LinuxBIOSv2-implicit_declarations/src/southbridge/nvidia/mcp55/mcp55_nic.c	(Arbeitskopie)
@@ -28,6 +28,7 @@
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
 #include <arch/io.h>
+#include <delay.h>
 #include "mcp55.h"
 
 static int phy_read(uint8_t *base, unsigned phy_addr, unsigned phy_reg)
Index: LinuxBIOSv2-implicit_declarations/src/southbridge/nvidia/mcp55/mcp55_aza.c
===================================================================
--- LinuxBIOSv2-implicit_declarations/src/southbridge/nvidia/mcp55/mcp55_aza.c	(Revision 3829)
+++ LinuxBIOSv2-implicit_declarations/src/southbridge/nvidia/mcp55/mcp55_aza.c	(Arbeitskopie)
@@ -27,6 +27,7 @@
 #include <device/pci_ids.h>
 #include <device/pci_ops.h>
 #include <arch/io.h>
+#include <delay.h>
 #include "mcp55.h"
 
 static int set_bits(uint8_t *port, uint32_t mask, uint32_t val)


-- 
http://www.hailfinger.org/





More information about the coreboot mailing list