[coreboot-gerrit] Patch set updated for coreboot: f58aafd drivers/i2c/at24rf08c: Indent files
Ronald G. Minnich (rminnich@gmail.com)
gerrit at coreboot.org
Mon Feb 10 23:25:31 CET 2014
Ronald G. Minnich (rminnich at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5094
-gerrit
commit f58aafdbda5f6d91123a1a8456fe0fedfc6175b0
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date: Sun Feb 2 12:27:12 2014 +0100
drivers/i2c/at24rf08c: Indent files
Change-Id: I0969396aa9230acf6319f62190d8bf303eb97567
Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
src/drivers/i2c/at24rf08c/at24rf08c.c | 11 +++++------
src/drivers/i2c/at24rf08c/lenovo_serials.c | 25 ++++++++++++-------------
2 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c
index a9cf2c5..4c97e60 100644
--- a/src/drivers/i2c/at24rf08c/at24rf08c.c
+++ b/src/drivers/i2c/at24rf08c/at24rf08c.c
@@ -32,15 +32,14 @@ static void at24rf08c_init(device_t dev)
if (!dev->enabled)
return;
- /* Ensure that EEPROM/RFID chip is not accessible through RFID.
+ /* Ensure that EEPROM/RFID chip is not accessible through RFID.
Need to do it only on 5c. */
if (dev->path.type != DEVICE_PATH_I2C || dev->path.i2c.device != 0x5c)
return;
- printk (BIOS_DEBUG, "Locking EEPROM RFID\n");
+ printk(BIOS_DEBUG, "Locking EEPROM RFID\n");
- for (i = 0; i < 8; i++)
- {
+ for (i = 0; i < 8; i++) {
/* After a register write AT24RF08C sometimes stops responding.
Retry several times in case of failure.
*/
@@ -49,7 +48,7 @@ static void at24rf08c_init(device_t dev)
break;
}
- printk (BIOS_DEBUG, "init EEPROM done\n");
+ printk(BIOS_DEBUG, "init EEPROM done\n");
}
static void at24rf08c_noop(device_t dummy)
@@ -70,5 +69,5 @@ static void enable_dev(device_t dev)
struct chip_operations drivers_i2c_at24rf08c_ops = {
CHIP_NAME("AT24RF08C")
- .enable_dev = enable_dev,
+ .enable_dev = enable_dev,
};
diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c
index 8c63d7d..a097b2a 100644
--- a/src/drivers/i2c/at24rf08c/lenovo_serials.c
+++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c
@@ -33,7 +33,7 @@ static void at24rf08c_read_string(u8 bank, u8 start, u8 len, char *result)
dev = dev_find_slot_on_smbus(1, 0x54 | bank);
if (dev == 0) {
printk(BIOS_WARNING, "EEPROM not found\n");
- memcpy(result, "*INVALID*", sizeof ("*INVALID*"));
+ memcpy(result, "*INVALID*", sizeof("*INVALID*"));
return;
}
@@ -42,14 +42,14 @@ static void at24rf08c_read_string(u8 bank, u8 start, u8 len, char *result)
int j;
/* After a register write AT24RF08C (which we issued in init function) sometimes stops responding.
Retry several times in case of failure.
- */
+ */
for (j = 0; j < 100; j++) {
t = smbus_read_byte(dev, start + i);
if (t >= 0)
break;
}
if (t < 0x20 || t > 0x7f) {
- memcpy(result, "*INVALID*", sizeof ("*INVALID*"));
+ memcpy(result, "*INVALID*", sizeof("*INVALID*"));
return;
}
result[i] = t;
@@ -64,7 +64,7 @@ const char *smbios_mainboard_serial_number(void)
if (already_read)
return result;
- memset(result, 0, sizeof (result));
+ memset(result, 0, sizeof(result));
at24rf08c_read_string(0, 0x2e, 7, result);
already_read = 1;
@@ -79,14 +79,14 @@ const char *smbios_mainboard_product_name(void)
if (already_read)
return result;
- memset (result, 0, sizeof (result));
+ memset(result, 0, sizeof(result));
at24rf08c_read_string(0, 0x27, 7, result);
already_read = 1;
return result;
}
-void smbios_mainboard_set_uuid(u8 *uuid)
+void smbios_mainboard_set_uuid(u8 * uuid)
{
static char result[16];
unsigned i;
@@ -97,19 +97,18 @@ void smbios_mainboard_set_uuid(u8 *uuid)
3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15
};
-
if (already_read) {
- memcpy (uuid, result, 16);
+ memcpy(uuid, result, 16);
return;
}
- memset (result, 0, sizeof (result));
+ memset(result, 0, sizeof(result));
dev = dev_find_slot_on_smbus(1, 0x56);
if (dev == 0) {
printk(BIOS_WARNING, "eeprom not found\n");
already_read = 1;
- memset (uuid, 0, 16);
+ memset(uuid, 0, 16);
return;
}
@@ -118,14 +117,14 @@ void smbios_mainboard_set_uuid(u8 *uuid)
int j;
/* After a register write AT24RF08C (which we issued in init function) sometimes stops responding.
Retry several times in case of failure.
- */
+ */
for (j = 0; j < 100; j++) {
t = smbus_read_byte(dev, 0x12 + i);
if (t >= 0)
break;
}
if (t < 0) {
- memset (result, 0, sizeof (result));
+ memset(result, 0, sizeof(result));
break;
}
result[remap[i]] = t;
@@ -133,5 +132,5 @@ void smbios_mainboard_set_uuid(u8 *uuid)
already_read = 1;
- memcpy (uuid, result, 16);
+ memcpy(uuid, result, 16);
}
More information about the coreboot-gerrit
mailing list