All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipmi: use simple i2c probe function
@ 2022-03-24 17:11 Stephen Kitt
  2022-03-30  9:29 ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Kitt @ 2022-03-24 17:11 UTC (permalink / raw)
  To: Corey Minyard
  Cc: openipmi-developer, linux-kernel, Wolfram Sang, Stephen Kitt

The i2c probe functions here don't use the id information provided in
their second argument, so the single-parameter i2c probe function
("probe_new") can be used instead.

This avoids scanning the identifier tables during probes.

Signed-off-by: Stephen Kitt <steve@sk2.org>
---
 drivers/char/ipmi/ipmb_dev_int.c | 5 ++---
 drivers/char/ipmi/ipmi_ipmb.c    | 5 ++---
 drivers/char/ipmi/ipmi_ssif.c    | 4 ++--
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/char/ipmi/ipmb_dev_int.c b/drivers/char/ipmi/ipmb_dev_int.c
index 49b8f22fdcf0..db40037eb347 100644
--- a/drivers/char/ipmi/ipmb_dev_int.c
+++ b/drivers/char/ipmi/ipmb_dev_int.c
@@ -299,8 +299,7 @@ static int ipmb_slave_cb(struct i2c_client *client,
 	return 0;
 }
 
-static int ipmb_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
+static int ipmb_probe(struct i2c_client *client)
 {
 	struct ipmb_dev *ipmb_dev;
 	int ret;
@@ -369,7 +368,7 @@ static struct i2c_driver ipmb_driver = {
 		.name = "ipmb-dev",
 		.acpi_match_table = ACPI_PTR(acpi_ipmb_id),
 	},
-	.probe = ipmb_probe,
+	.probe_new = ipmb_probe,
 	.remove = ipmb_remove,
 	.id_table = ipmb_id,
 };
diff --git a/drivers/char/ipmi/ipmi_ipmb.c b/drivers/char/ipmi/ipmi_ipmb.c
index ba0c2d2c6bbe..845387d17efb 100644
--- a/drivers/char/ipmi/ipmi_ipmb.c
+++ b/drivers/char/ipmi/ipmi_ipmb.c
@@ -436,8 +436,7 @@ static int ipmi_ipmb_remove(struct i2c_client *client)
 	return 0;
 }
 
-static int ipmi_ipmb_probe(struct i2c_client *client,
-			   const struct i2c_device_id *id)
+static int ipmi_ipmb_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct ipmi_ipmb_dev *iidev;
@@ -528,7 +527,7 @@ static struct i2c_driver ipmi_ipmb_driver = {
 		.name = DEVICE_NAME,
 		.of_match_table = of_ipmi_ipmb_match,
 	},
-	.probe		= ipmi_ipmb_probe,
+	.probe_new	= ipmi_ipmb_probe,
 	.remove		= ipmi_ipmb_remove,
 	.id_table	= ipmi_ipmb_id,
 };
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index 48aab77abebf..9fa8755bbb6a 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1619,7 +1619,7 @@ static int ssif_check_and_remove(struct i2c_client *client,
 	return 0;
 }
 
-static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
+static int ssif_probe(struct i2c_client *client)
 {
 	unsigned char     msg[3];
 	unsigned char     *resp;
@@ -2037,7 +2037,7 @@ static struct i2c_driver ssif_i2c_driver = {
 	.driver		= {
 		.name			= DEVICE_NAME
 	},
-	.probe		= ssif_probe,
+	.probe_new	= ssif_probe,
 	.remove		= ssif_remove,
 	.alert		= ssif_alert,
 	.id_table	= ssif_id,
-- 
2.27.0


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

* Re: [PATCH] ipmi: use simple i2c probe function
  2022-03-24 17:11 [PATCH] ipmi: use simple i2c probe function Stephen Kitt
@ 2022-03-30  9:29 ` Wolfram Sang
  2022-03-30 13:31   ` Corey Minyard
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2022-03-30  9:29 UTC (permalink / raw)
  To: Stephen Kitt; +Cc: Corey Minyard, openipmi-developer, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

On Thu, Mar 24, 2022 at 06:11:59PM +0100, Stephen Kitt wrote:
> The i2c probe functions here don't use the id information provided in
> their second argument, so the single-parameter i2c probe function
> ("probe_new") can be used instead.
> 
> This avoids scanning the identifier tables during probes.
> 
> Signed-off-by: Stephen Kitt <steve@sk2.org>

Looks good and builds fine:

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] ipmi: use simple i2c probe function
  2022-03-30  9:29 ` Wolfram Sang
@ 2022-03-30 13:31   ` Corey Minyard
  0 siblings, 0 replies; 3+ messages in thread
From: Corey Minyard @ 2022-03-30 13:31 UTC (permalink / raw)
  To: Wolfram Sang, Stephen Kitt, openipmi-developer, linux-kernel

On Wed, Mar 30, 2022 at 11:29:12AM +0200, Wolfram Sang wrote:
> On Thu, Mar 24, 2022 at 06:11:59PM +0100, Stephen Kitt wrote:
> > The i2c probe functions here don't use the id information provided in
> > their second argument, so the single-parameter i2c probe function
> > ("probe_new") can be used instead.
> > 
> > This avoids scanning the identifier tables during probes.
> > 
> > Signed-off-by: Stephen Kitt <steve@sk2.org>
> 
> Looks good and builds fine:
> 
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 


Thanks, I have this queued and I've added the review.

I'm just waiting for the merge window to close before I put it into the
next tree.

-corey

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

end of thread, other threads:[~2022-03-30 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24 17:11 [PATCH] ipmi: use simple i2c probe function Stephen Kitt
2022-03-30  9:29 ` Wolfram Sang
2022-03-30 13:31   ` Corey Minyard

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.