diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2017-03-09 11:30:23 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-03-22 17:55:37 +0100 |
commit | 70a8e34853d4b01ab7a2089821c35715c59b4415 (patch) | |
tree | b39e19d126491bdf23a2026cc58374b019d169cb /src/northbridge/intel/i945/debug.c | |
parent | 219daafa8fc27483b2a652d9428d874bf960a6a1 (diff) |
nb/intel/i945: Fix errors found by checkpatch.pl
Change-Id: Ic2dd40e73d4a4c091c5ce1f49bbf9ab4d013d7af
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18704
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/northbridge/intel/i945/debug.c')
-rw-r--r-- | src/northbridge/intel/i945/debug.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/northbridge/intel/i945/debug.c b/src/northbridge/intel/i945/debug.c index 4804544555..acf73c4c2d 100644 --- a/src/northbridge/intel/i945/debug.c +++ b/src/northbridge/intel/i945/debug.c @@ -26,7 +26,7 @@ void print_pci_devices(void) pci_devfn_t dev; for (dev = PCI_DEV(0, 0, 0); dev <= PCI_DEV(0, 0x1f, 0x7); - dev += PCI_DEV(0,0,1)) { + dev += PCI_DEV(0, 0, 1)) { uint32_t id; id = pci_read_config32(dev, PCI_VENDOR_ID); if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) || @@ -36,11 +36,11 @@ void print_pci_devices(void) } printk(BIOS_DEBUG, "PCI: %02x:%02x.%02x", (dev >> 20) & 0xff, (dev >> 15) & 0x1f, (dev >> 12) & 7); - printk(BIOS_DEBUG, " [%04x:%04x]\n", id &0xffff, id >> 16); + printk(BIOS_DEBUG, " [%04x:%04x]\n", id & 0xffff, id >> 16); } } -void dump_pci_device(unsigned dev) +void dump_pci_device(unsigned int dev) { int i; @@ -48,14 +48,12 @@ void dump_pci_device(unsigned dev) for (i = 0; i <= 255; i++) { unsigned char val; - if ((i & 0x0f) == 0) { + if ((i & 0x0f) == 0) printk(BIOS_DEBUG, "%02x:", i); - } val = pci_read_config8(dev, i); printk(BIOS_DEBUG, " %02x", val); - if ((i & 0x0f) == 0x0f) { + if ((i & 0x0f) == 0x0f) printk(BIOS_DEBUG, "\n"); - } } } @@ -64,7 +62,7 @@ void dump_pci_devices(void) pci_devfn_t dev; for (dev = PCI_DEV(0, 0, 0); dev <= PCI_DEV(0, 0x1f, 0x7); - dev += PCI_DEV(0,0,1)) { + dev += PCI_DEV(0, 0, 1)) { uint32_t id; id = pci_read_config32(dev, PCI_VENDOR_ID); if (((id & 0xffff) == 0x0000) || ((id & 0xffff) == 0xffff) || @@ -78,7 +76,7 @@ void dump_pci_devices(void) void dump_spd_registers(void) { - unsigned device; + unsigned int device; device = DIMM0; while (device <= DIMM3) { int status = 0; @@ -86,14 +84,12 @@ void dump_spd_registers(void) printk(BIOS_DEBUG, "\ndimm %02x", device); for (i = 0; (i < 256); i++) { - if ((i % 16) == 0) { + if ((i % 16) == 0) printk(BIOS_DEBUG, "\n%02x: ", i); - } status = smbus_read_byte(device, i); - if (status < 0) { + if (status < 0) printk(BIOS_DEBUG, "bad device: %02x\n", -status); break; - } printk(BIOS_DEBUG, "%02x ", status); } device++; @@ -101,14 +97,13 @@ void dump_spd_registers(void) } } -void dump_mem(unsigned start, unsigned end) +void dump_mem(unsigned int start, unsigned int end) { - unsigned i; + unsigned int i; printk(BIOS_DEBUG, "dump_mem:"); for (i = start; i < end; i++) { - if ((i & 0xf)==0) { + if ((i & 0xf) == 0) printk(BIOS_DEBUG, "\n%08x:", i); - } printk(BIOS_DEBUG, " %02x", (unsigned char)*((unsigned char *)i)); } printk(BIOS_DEBUG, "\n"); |