All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] net: convert to use new I2C API
@ 2020-03-26 21:09 ` Wolfram Sang
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:09 UTC (permalink / raw)
  To: linux-i2c; +Cc: Wolfram Sang, intel-wired-lan, linux-kernel, netdev

We are deprecating calls which return NULL in favor of new variants which
return an ERR_PTR. Only build tested.


Wolfram Sang (2):
  igb: convert to use i2c_new_client_device()
  sfc: falcon: convert to use i2c_new_client_device()

 drivers/net/ethernet/intel/igb/igb_hwmon.c      | 6 +++---
 drivers/net/ethernet/sfc/falcon/falcon_boards.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 0/2] net: convert to use new I2C API
@ 2020-03-26 21:09 ` Wolfram Sang
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:09 UTC (permalink / raw)
  To: intel-wired-lan

We are deprecating calls which return NULL in favor of new variants which
return an ERR_PTR. Only build tested.


Wolfram Sang (2):
  igb: convert to use i2c_new_client_device()
  sfc: falcon: convert to use i2c_new_client_device()

 drivers/net/ethernet/intel/igb/igb_hwmon.c      | 6 +++---
 drivers/net/ethernet/sfc/falcon/falcon_boards.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] igb: convert to use i2c_new_client_device()
  2020-03-26 21:09 ` [Intel-wired-lan] " Wolfram Sang
@ 2020-03-26 21:09   ` Wolfram Sang
  -1 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:09 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Jeff Kirsher, David S. Miller, intel-wired-lan,
	netdev, linux-kernel

Move away from the deprecated API and return the shiny new ERRPTR where
useful.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/net/ethernet/intel/igb/igb_hwmon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/intel/igb/igb_hwmon.c
index 3b83747b2700..21a29a0ca7f4 100644
--- a/drivers/net/ethernet/intel/igb/igb_hwmon.c
+++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c
@@ -198,11 +198,11 @@ int igb_sysfs_init(struct igb_adapter *adapter)
 	}
 
 	/* init i2c_client */
-	client = i2c_new_device(&adapter->i2c_adap, &i350_sensor_info);
-	if (client == NULL) {
+	client = i2c_new_client_device(&adapter->i2c_adap, &i350_sensor_info);
+	if (IS_ERR(client)) {
 		dev_info(&adapter->pdev->dev,
 			 "Failed to create new i2c device.\n");
-		rc = -ENODEV;
+		rc = PTR_ERR(client);
 		goto exit;
 	}
 	adapter->i2c_client = client;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 1/2] igb: convert to use i2c_new_client_device()
@ 2020-03-26 21:09   ` Wolfram Sang
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:09 UTC (permalink / raw)
  To: intel-wired-lan

Move away from the deprecated API and return the shiny new ERRPTR where
useful.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/net/ethernet/intel/igb/igb_hwmon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/intel/igb/igb_hwmon.c
index 3b83747b2700..21a29a0ca7f4 100644
--- a/drivers/net/ethernet/intel/igb/igb_hwmon.c
+++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c
@@ -198,11 +198,11 @@ int igb_sysfs_init(struct igb_adapter *adapter)
 	}
 
 	/* init i2c_client */
-	client = i2c_new_device(&adapter->i2c_adap, &i350_sensor_info);
-	if (client == NULL) {
+	client = i2c_new_client_device(&adapter->i2c_adap, &i350_sensor_info);
+	if (IS_ERR(client)) {
 		dev_info(&adapter->pdev->dev,
 			 "Failed to create new i2c device.\n");
-		rc = -ENODEV;
+		rc = PTR_ERR(client);
 		goto exit;
 	}
 	adapter->i2c_client = client;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] sfc: falcon: convert to use i2c_new_client_device()
  2020-03-26 21:09 ` [Intel-wired-lan] " Wolfram Sang
  (?)
  (?)
@ 2020-03-26 21:10 ` Wolfram Sang
  2020-03-27  2:31   ` David Miller
  -1 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:10 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Solarflare linux maintainers, Edward Cree,
	Martin Habets, David S. Miller, netdev, linux-kernel

Move away from the deprecated API and return the shiny new ERRPTR where
useful.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/net/ethernet/sfc/falcon/falcon_boards.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/sfc/falcon/falcon_boards.c b/drivers/net/ethernet/sfc/falcon/falcon_boards.c
index 605f486fa675..729a05c1b0cf 100644
--- a/drivers/net/ethernet/sfc/falcon/falcon_boards.c
+++ b/drivers/net/ethernet/sfc/falcon/falcon_boards.c
@@ -88,11 +88,11 @@ static int ef4_init_lm87(struct ef4_nic *efx, const struct i2c_board_info *info,
 			 const u8 *reg_values)
 {
 	struct falcon_board *board = falcon_board(efx);
-	struct i2c_client *client = i2c_new_device(&board->i2c_adap, info);
+	struct i2c_client *client = i2c_new_client_device(&board->i2c_adap, info);
 	int rc;
 
-	if (!client)
-		return -EIO;
+	if (IS_ERR(client))
+		return PTR_ERR(client);
 
 	/* Read-to-clear alarm/interrupt status */
 	i2c_smbus_read_byte_data(client, LM87_REG_ALARMS1);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] igb: convert to use i2c_new_client_device()
  2020-03-26 21:09   ` [Intel-wired-lan] " Wolfram Sang
@ 2020-03-27  2:31     ` David Miller
  -1 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2020-03-27  2:31 UTC (permalink / raw)
  To: wsa+renesas
  Cc: linux-i2c, jeffrey.t.kirsher, intel-wired-lan, netdev, linux-kernel

From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Date: Thu, 26 Mar 2020 22:09:59 +0100

> Move away from the deprecated API and return the shiny new ERRPTR where
> useful.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Intel-wired-lan] [PATCH 1/2] igb: convert to use i2c_new_client_device()
@ 2020-03-27  2:31     ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2020-03-27  2:31 UTC (permalink / raw)
  To: intel-wired-lan

From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Date: Thu, 26 Mar 2020 22:09:59 +0100

> Move away from the deprecated API and return the shiny new ERRPTR where
> useful.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] sfc: falcon: convert to use i2c_new_client_device()
  2020-03-26 21:10 ` [PATCH 2/2] sfc: falcon: " Wolfram Sang
@ 2020-03-27  2:31   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2020-03-27  2:31 UTC (permalink / raw)
  To: wsa+renesas
  Cc: linux-i2c, linux-net-drivers, ecree, mhabets, netdev, linux-kernel

From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Date: Thu, 26 Mar 2020 22:10:00 +0100

> Move away from the deprecated API and return the shiny new ERRPTR where
> useful.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-27  2:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 21:09 [PATCH 0/2] net: convert to use new I2C API Wolfram Sang
2020-03-26 21:09 ` [Intel-wired-lan] " Wolfram Sang
2020-03-26 21:09 ` [PATCH 1/2] igb: convert to use i2c_new_client_device() Wolfram Sang
2020-03-26 21:09   ` [Intel-wired-lan] " Wolfram Sang
2020-03-27  2:31   ` David Miller
2020-03-27  2:31     ` [Intel-wired-lan] " David Miller
2020-03-26 21:10 ` [PATCH 2/2] sfc: falcon: " Wolfram Sang
2020-03-27  2:31   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.