diff mbox

[2/3] i2c-piix4: Always use the same type for port

Message ID 20160129104530.1ba78e8b@endymion.delvare
State Accepted
Headers show

Commit Message

Jean Delvare Jan. 29, 2016, 9:45 a.m. UTC
Sometimes u8 is used to store the port number, sometimes unsigned
short is used. Consistently stick to a single type, for consistency
and to avoid implicit casts.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Christian Fetzer <fetzer.ch@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/i2c/busses/i2c-piix4.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mika Westerberg Jan. 29, 2016, 10:59 a.m. UTC | #1
On Fri, Jan 29, 2016 at 10:45:30AM +0100, Jean Delvare wrote:
> Sometimes u8 is used to store the port number, sometimes unsigned
> short is used. Consistently stick to a single type, for consistency
> and to avoid implicit casts.
> 
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang Feb. 24, 2016, 10:40 a.m. UTC | #2
On Fri, Jan 29, 2016 at 10:45:30AM +0100, Jean Delvare wrote:
> Sometimes u8 is used to store the port number, sometimes unsigned
> short is used. Consistently stick to a single type, for consistency
> and to avoid implicit casts.
> 
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: Christian Fetzer <fetzer.ch@gmail.com>
> Cc: Wolfram Sang <wsa@the-dreams.de>

Applied to for-next, thanks!
diff mbox

Patch

--- linux-4.5-rc0.orig/drivers/i2c/busses/i2c-piix4.c	2016-01-29 07:54:35.135765313 +0100
+++ linux-4.5-rc0/drivers/i2c/busses/i2c-piix4.c	2016-01-29 07:57:13.706365999 +0100
@@ -158,7 +158,7 @@  struct i2c_piix4_adapdata {
 
 	/* SB800 */
 	bool sb800_main;
-	unsigned short port;
+	u8 port;
 };
 
 static int piix4_setup(struct pci_dev *PIIX4_dev,
@@ -649,7 +649,7 @@  static struct i2c_adapter *piix4_main_ad
 static struct i2c_adapter *piix4_aux_adapter;
 
 static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
-			     bool sb800_main, unsigned short port,
+			     bool sb800_main, u8 port,
 			     const char *name, struct i2c_adapter **padap)
 {
 	struct i2c_adapter *adap;