From 38ddbfb325866716c9c65a460e388f33d1a773dd Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 23 Oct 2019 21:41:00 -0600 Subject: src/[arch-lib]: change "unsigned" to "unsigned int" Signed-off-by: Martin Roth Change-Id: Ibb7b48a7a144421aff29acbb7ac30968ae5fe5ab Reviewed-on: https://review.coreboot.org/c/coreboot/+/36329 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph --- src/device/software_i2c.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/device/software_i2c.c') diff --git a/src/device/software_i2c.c b/src/device/software_i2c.c index 5dc99906da..3bb9708bfa 100644 --- a/src/device/software_i2c.c +++ b/src/device/software_i2c.c @@ -38,7 +38,7 @@ struct software_i2c_ops *software_i2c[SOFTWARE_I2C_MAX_BUS]; * Waits until either timeout_us have passed or (iff for_scl is set) until SCL * goes high. Will report random line changes during the wait and return SCL. */ -static int __wait(unsigned bus, int timeout_us, int for_scl) +static int __wait(unsigned int bus, int timeout_us, int for_scl) { int us; int sda = software_i2c[bus]->get_sda(bus); @@ -63,13 +63,13 @@ static int __wait(unsigned bus, int timeout_us, int for_scl) } /* Waits the default DELAY_US to allow line state to stabilize. */ -static void wait(unsigned bus) +static void wait(unsigned int bus) { __wait(bus, DELAY_US, 0); } /* Waits until SCL goes high. Prints a contextual error message on timeout. */ -static int wait_for_scl(unsigned bus, const char *error_context) +static int wait_for_scl(unsigned int bus, const char *error_context) { if (!__wait(bus, TIMEOUT_US, 1)) { printk(BIOS_ERR, "software_i2c(%d): ERROR: Clock stretching " @@ -80,7 +80,7 @@ static int wait_for_scl(unsigned bus, const char *error_context) return 0; } -static int start_cond(unsigned bus) +static int start_cond(unsigned int bus) { spew("software_i2c(%d): Sending start condition... ", bus); @@ -112,7 +112,7 @@ static int start_cond(unsigned bus) return 0; } -static int stop_cond(unsigned bus) +static int stop_cond(unsigned int bus) { spew("software_i2c(%d): Sending stop condition... ", bus); @@ -141,7 +141,7 @@ static int stop_cond(unsigned bus) return 0; } -static int out_bit(unsigned bus, int bit) +static int out_bit(unsigned int bus, int bit) { spew("software_i2c(%d): Sending a %d bit... ", bus, bit); @@ -174,7 +174,7 @@ static int out_bit(unsigned bus, int bit) return 0; } -static int in_bit(unsigned bus) +static int in_bit(unsigned int bus) { int bit; @@ -202,9 +202,9 @@ static int in_bit(unsigned bus) } /* Write a byte to I2C bus. Return 0 if ack by the slave. */ -static int out_byte(unsigned bus, u8 byte) +static int out_byte(unsigned int bus, u8 byte) { - unsigned bit; + unsigned int bit; int nack, ret; for (bit = 0; bit < 8; bit++) @@ -220,7 +220,7 @@ static int out_byte(unsigned bus, u8 byte) return nack > 0 ? ERR_NACK : nack; } -static int in_byte(unsigned bus, int ack) +static int in_byte(unsigned int bus, int ack) { u8 byte = 0; int i, ret; @@ -241,7 +241,7 @@ static int in_byte(unsigned bus, int ack) return byte; } -int software_i2c_transfer(unsigned bus, struct i2c_msg *segments, int count) +int software_i2c_transfer(unsigned int bus, struct i2c_msg *segments, int count) { int i, ret; struct i2c_msg *seg; @@ -269,7 +269,7 @@ int software_i2c_transfer(unsigned bus, struct i2c_msg *segments, int count) return 0; } -void software_i2c_wedge_ack(unsigned bus, u8 chip) +void software_i2c_wedge_ack(unsigned int bus, u8 chip) { int i; @@ -292,7 +292,7 @@ void software_i2c_wedge_ack(unsigned bus, u8 chip) software_i2c[bus]->get_scl(bus)); } -void software_i2c_wedge_read(unsigned bus, u8 chip, u8 reg, int bits) +void software_i2c_wedge_read(unsigned int bus, u8 chip, u8 reg, int bits) { int i; @@ -321,7 +321,7 @@ void software_i2c_wedge_read(unsigned bus, u8 chip, u8 reg, int bits) software_i2c[bus]->get_scl(bus)); } -void software_i2c_wedge_write(unsigned bus, u8 chip, u8 reg, int bits) +void software_i2c_wedge_write(unsigned int bus, u8 chip, u8 reg, int bits) { int i; -- cgit v1.2.3