linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
@ 2018-01-24 20:33 Vadim Pasternak
  2018-01-24 20:33 ` [patch v11 - re-ordered 04/12] platform/mellanox: Group create/destroy with attribute functions Vadim Pasternak
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Vadim Pasternak @ 2018-01-24 20:33 UTC (permalink / raw)
  To: dvhart, andy.shevchenko, gregkh
  Cc: linux-kernel, platform-driver-x86, jiri, Vadim Pasternak

The upper layer will manage and report errors returned by the create and
destroy functions.

FIXME: but it doesn't - we don't even check

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[dvhart: refactored into smaller functional changes]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
---
 drivers/platform/mellanox/mlxreg-hotplug.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
index e55f576..0ccd327 100644
--- a/drivers/platform/mellanox/mlxreg-hotplug.c
+++ b/drivers/platform/mellanox/mlxreg-hotplug.c
@@ -187,16 +187,11 @@ static int mlxreg_hotplug_device_create(struct device *dev,
 					struct mlxreg_hotplug_device *item)
 {
 	item->adapter = i2c_get_adapter(item->bus);
-	if (!item->adapter) {
-		dev_err(dev, "Failed to get adapter for bus %d\n",
-			item->bus);
+	if (!item->adapter)
 		return -EFAULT;
-	}
 
 	item->client = i2c_new_device(item->adapter, &item->brdinfo);
 	if (!item->client) {
-		dev_err(dev, "Failed to create client %s at bus %d at addr 0x%02x\n",
-			item->brdinfo.type, item->bus, item->brdinfo.addr);
 		i2c_put_adapter(item->adapter);
 		item->adapter = NULL;
 		return -EFAULT;
-- 
2.1.4

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

* [patch v11 - re-ordered 04/12] platform/mellanox: Group create/destroy with attribute functions
  2018-01-24 20:33 [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Vadim Pasternak
@ 2018-01-24 20:33 ` Vadim Pasternak
  2018-01-24 20:33 ` [patch v11 - re-ordered 05/12] platform/mellanox: Rename i2c bus to nr Vadim Pasternak
  2018-01-25 21:46 ` [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Darren Hart
  2 siblings, 0 replies; 9+ messages in thread
From: Vadim Pasternak @ 2018-01-24 20:33 UTC (permalink / raw)
  To: dvhart, andy.shevchenko, gregkh
  Cc: linux-kernel, platform-driver-x86, jiri, Vadim Pasternak

Move the mlxreg_hotplug_device_create and _destroy functions up with the
related attribute functions. No functional changes.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[dvhart: refactored commit into smaller functional changes]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
---
 drivers/platform/mellanox/mlxreg-hotplug.c | 60 +++++++++++++++---------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
index 0ccd327..4b67909 100644
--- a/drivers/platform/mellanox/mlxreg-hotplug.c
+++ b/drivers/platform/mellanox/mlxreg-hotplug.c
@@ -98,6 +98,36 @@ struct mlxreg_hotplug_priv_data {
 	u8 fan_cache;
 };
 
+static int mlxreg_hotplug_device_create(struct device *dev,
+					struct mlxreg_hotplug_device *item)
+{
+	item->adapter = i2c_get_adapter(item->bus);
+	if (!item->adapter)
+		return -EFAULT;
+
+	item->client = i2c_new_device(item->adapter, &item->brdinfo);
+	if (!item->client) {
+		i2c_put_adapter(item->adapter);
+		item->adapter = NULL;
+		return -EFAULT;
+	}
+
+	return 0;
+}
+
+static void mlxreg_hotplug_device_destroy(struct mlxreg_hotplug_device *item)
+{
+	if (item->client) {
+		i2c_unregister_device(item->client);
+		item->client = NULL;
+	}
+
+	if (item->adapter) {
+		i2c_put_adapter(item->adapter);
+		item->adapter = NULL;
+	}
+}
+
 static ssize_t mlxreg_hotplug_attr_show(struct device *dev,
 					struct device_attribute *attr,
 					char *buf)
@@ -183,36 +213,6 @@ static int mlxreg_hotplug_attr_init(struct mlxreg_hotplug_priv_data *priv)
 	return 0;
 }
 
-static int mlxreg_hotplug_device_create(struct device *dev,
-					struct mlxreg_hotplug_device *item)
-{
-	item->adapter = i2c_get_adapter(item->bus);
-	if (!item->adapter)
-		return -EFAULT;
-
-	item->client = i2c_new_device(item->adapter, &item->brdinfo);
-	if (!item->client) {
-		i2c_put_adapter(item->adapter);
-		item->adapter = NULL;
-		return -EFAULT;
-	}
-
-	return 0;
-}
-
-static void mlxreg_hotplug_device_destroy(struct mlxreg_hotplug_device *item)
-{
-	if (item->client) {
-		i2c_unregister_device(item->client);
-		item->client = NULL;
-	}
-
-	if (item->adapter) {
-		i2c_put_adapter(item->adapter);
-		item->adapter = NULL;
-	}
-}
-
 static inline void
 mlxreg_hotplug_work_helper(struct device *dev,
 			   struct mlxreg_hotplug_device *item, u8 is_inverse,
-- 
2.1.4

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

* [patch v11 - re-ordered 05/12] platform/mellanox: Rename i2c bus to nr
  2018-01-24 20:33 [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Vadim Pasternak
  2018-01-24 20:33 ` [patch v11 - re-ordered 04/12] platform/mellanox: Group create/destroy with attribute functions Vadim Pasternak
@ 2018-01-24 20:33 ` Vadim Pasternak
  2018-01-25 21:46 ` [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Darren Hart
  2 siblings, 0 replies; 9+ messages in thread
From: Vadim Pasternak @ 2018-01-24 20:33 UTC (permalink / raw)
  To: dvhart, andy.shevchenko, gregkh
  Cc: linux-kernel, platform-driver-x86, jiri, Vadim Pasternak

Use Linux convention of nr instead of bus for i2c adapter number.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[dvhart: refactored commit into smaller functional changes]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
---
 drivers/platform/mellanox/mlxreg-hotplug.c |  2 +-
 drivers/platform/x86/mlx-platform.c        | 16 ++++++++--------
 include/linux/platform_data/mlxreg.h       |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
index 4b67909..2b3b82c 100644
--- a/drivers/platform/mellanox/mlxreg-hotplug.c
+++ b/drivers/platform/mellanox/mlxreg-hotplug.c
@@ -101,7 +101,7 @@ struct mlxreg_hotplug_priv_data {
 static int mlxreg_hotplug_device_create(struct device *dev,
 					struct mlxreg_hotplug_device *item)
 {
-	item->adapter = i2c_get_adapter(item->bus);
+	item->adapter = i2c_get_adapter(item->nr);
 	if (!item->adapter)
 		return -EFAULT;
 
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 0fbec1f..5601714 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -141,41 +141,41 @@ static struct i2c_mux_reg_platform_data mlxplat_mux_data[] = {
 static struct mlxreg_hotplug_device mlxplat_mlxcpld_psu[] = {
 	{
 		.brdinfo = { I2C_BOARD_INFO("24c02", 0x51) },
-		.bus = 10,
+		.nr = 10,
 	},
 	{
 		.brdinfo = { I2C_BOARD_INFO("24c02", 0x50) },
-		.bus = 10,
+		.nr = 10,
 	},
 };
 
 static struct mlxreg_hotplug_device mlxplat_mlxcpld_pwr[] = {
 	{
 		.brdinfo = { I2C_BOARD_INFO("dps460", 0x59) },
-		.bus = 10,
+		.nr = 10,
 	},
 	{
 		.brdinfo = { I2C_BOARD_INFO("dps460", 0x58) },
-		.bus = 10,
+		.nr = 10,
 	},
 };
 
 static struct mlxreg_hotplug_device mlxplat_mlxcpld_fan[] = {
 	{
 		.brdinfo = { I2C_BOARD_INFO("24c32", 0x50) },
-		.bus = 11,
+		.nr = 11,
 	},
 	{
 		.brdinfo = { I2C_BOARD_INFO("24c32", 0x50) },
-		.bus = 12,
+		.nr = 12,
 	},
 	{
 		.brdinfo = { I2C_BOARD_INFO("24c32", 0x50) },
-		.bus = 13,
+		.nr = 13,
 	},
 	{
 		.brdinfo = { I2C_BOARD_INFO("24c32", 0x50) },
-		.bus = 14,
+		.nr = 14,
 	},
 };
 
diff --git a/include/linux/platform_data/mlxreg.h b/include/linux/platform_data/mlxreg.h
index 8dcbb8e..ffbcb78 100644
--- a/include/linux/platform_data/mlxreg.h
+++ b/include/linux/platform_data/mlxreg.h
@@ -39,7 +39,7 @@
  * @adapter: I2C device adapter;
  * @client: I2C device client;
  * @brdinfo: device board information;
- * @bus: I2C bus, where device is attached;
+ * @nr: I2C device adapter number, to which device is to be attached;
  *
  * Structure represents I2C hotplug device static data (board topology) and
  * dynamic data (related kernel objects handles).
@@ -48,7 +48,7 @@ struct mlxreg_hotplug_device {
 	struct i2c_adapter *adapter;
 	struct i2c_client *client;
 	struct i2c_board_info brdinfo;
-	u16 bus;
+	int nr;
 };
 
 /**
-- 
2.1.4

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

* Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
  2018-01-24 20:33 [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Vadim Pasternak
  2018-01-24 20:33 ` [patch v11 - re-ordered 04/12] platform/mellanox: Group create/destroy with attribute functions Vadim Pasternak
  2018-01-24 20:33 ` [patch v11 - re-ordered 05/12] platform/mellanox: Rename i2c bus to nr Vadim Pasternak
@ 2018-01-25 21:46 ` Darren Hart
  2018-01-26 16:59   ` Vadim Pasternak
  2 siblings, 1 reply; 9+ messages in thread
From: Darren Hart @ 2018-01-25 21:46 UTC (permalink / raw)
  To: Vadim Pasternak
  Cc: andy.shevchenko, gregkh, linux-kernel, platform-driver-x86, jiri

On Wed, Jan 24, 2018 at 08:33:37PM +0000, Vadim Pasternak wrote:
> The upper layer will manage and report errors returned by the create and
> destroy functions.
> 
> FIXME: but it doesn't - we don't even check

I think we agreed to just drop this patch entirely, since this error is not
checked elsewhere? Keeping the dev_err messages?

> 
> Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> [dvhart: refactored into smaller functional changes]
> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
> ---
>  drivers/platform/mellanox/mlxreg-hotplug.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
> index e55f576..0ccd327 100644
> --- a/drivers/platform/mellanox/mlxreg-hotplug.c
> +++ b/drivers/platform/mellanox/mlxreg-hotplug.c
> @@ -187,16 +187,11 @@ static int mlxreg_hotplug_device_create(struct device *dev,
>  					struct mlxreg_hotplug_device *item)
>  {
>  	item->adapter = i2c_get_adapter(item->bus);
> -	if (!item->adapter) {
> -		dev_err(dev, "Failed to get adapter for bus %d\n",
> -			item->bus);
> +	if (!item->adapter)
>  		return -EFAULT;
> -	}
>  
>  	item->client = i2c_new_device(item->adapter, &item->brdinfo);
>  	if (!item->client) {
> -		dev_err(dev, "Failed to create client %s at bus %d at addr 0x%02x\n",
> -			item->brdinfo.type, item->bus, item->brdinfo.addr);
>  		i2c_put_adapter(item->adapter);
>  		item->adapter = NULL;
>  		return -EFAULT;
> -- 
> 2.1.4
> 
> 

-- 
Darren Hart
VMware Open Source Technology Center

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

* RE: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
  2018-01-25 21:46 ` [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Darren Hart
@ 2018-01-26 16:59   ` Vadim Pasternak
  2018-01-26 23:41     ` Darren Hart
  0 siblings, 1 reply; 9+ messages in thread
From: Vadim Pasternak @ 2018-01-26 16:59 UTC (permalink / raw)
  To: Darren Hart
  Cc: andy.shevchenko, gregkh, linux-kernel, platform-driver-x86, jiri



> -----Original Message-----
> From: Darren Hart [mailto:dvhart@infradead.org]
> Sent: Thursday, January 25, 2018 11:47 PM
> To: Vadim Pasternak <vadimp@mellanox.com>
> Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux-
> kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; jiri@resnulli.us
> Subject: Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove
> redundant dev_err messages on device_create
> 
> On Wed, Jan 24, 2018 at 08:33:37PM +0000, Vadim Pasternak wrote:
> > The upper layer will manage and report errors returned by the create
> > and destroy functions.
> >
> > FIXME: but it doesn't - we don't even check
> 
> I think we agreed to just drop this patch entirely, since this error is not checked
> elsewhere? Keeping the dev_err messages?
> 

Yes, we'll keep it.
We just had conflict in patch order and I wanted to fix it, staying as much as
possible aligned with the top of mellanox v10 branch.

However currently we still  have a problem in mellanox v11 after patch
platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface
It dropped parameter device  in mlxreg_hotplug_device_create, which is
Used inside the routine.

I'll send a separate patch to fix it from top of v11. In other case it'll be
necessary to fix Modify to use a regmap interface  and re-send all from 
5-th patch in series.

Also we  should drop the patch:
platform/x86: mlx-platform: Simplify IO access to regmap context
It introduced the issue reported by sparse.

I am resending two last patches from review-dvhart-mellanox-v11 branch
and also patch with fix for mlxreg_hotplug_device_create, as:
0010-platform-x86-mlx-platform-Extend-register-map-config.patch
0011-platform-mellanox-mlxreg-hotplug-Add-check-for-negat.patch
0012-platform-mellanox-mlxreg-hotplug-Fix-issue-of-commit.patch

Thank you very much for your help,
Vadim.

> >
> > Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
> > Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> > [dvhart: refactored into smaller functional changes]
> > Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
> > ---
> >  drivers/platform/mellanox/mlxreg-hotplug.c | 7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c
> > b/drivers/platform/mellanox/mlxreg-hotplug.c
> > index e55f576..0ccd327 100644
> > --- a/drivers/platform/mellanox/mlxreg-hotplug.c
> > +++ b/drivers/platform/mellanox/mlxreg-hotplug.c
> > @@ -187,16 +187,11 @@ static int mlxreg_hotplug_device_create(struct
> device *dev,
> >  					struct mlxreg_hotplug_device *item)  {
> >  	item->adapter = i2c_get_adapter(item->bus);
> > -	if (!item->adapter) {
> > -		dev_err(dev, "Failed to get adapter for bus %d\n",
> > -			item->bus);
> > +	if (!item->adapter)
> >  		return -EFAULT;
> > -	}
> >
> >  	item->client = i2c_new_device(item->adapter, &item->brdinfo);
> >  	if (!item->client) {
> > -		dev_err(dev, "Failed to create client %s at bus %d at addr
> 0x%02x\n",
> > -			item->brdinfo.type, item->bus, item->brdinfo.addr);
> >  		i2c_put_adapter(item->adapter);
> >  		item->adapter = NULL;
> >  		return -EFAULT;
> > --
> > 2.1.4
> >
> >
> 
> --
> Darren Hart
> VMware Open Source Technology Center

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

* Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
  2018-01-26 16:59   ` Vadim Pasternak
@ 2018-01-26 23:41     ` Darren Hart
  2018-01-27  5:08       ` Vadim Pasternak
  2018-01-31 18:40       ` Darren Hart
  0 siblings, 2 replies; 9+ messages in thread
From: Darren Hart @ 2018-01-26 23:41 UTC (permalink / raw)
  To: Vadim Pasternak
  Cc: andy.shevchenko, gregkh, linux-kernel, platform-driver-x86, jiri

On Fri, Jan 26, 2018 at 04:59:32PM +0000, Vadim Pasternak wrote:
> 
> 
> > -----Original Message-----
> > From: Darren Hart [mailto:dvhart@infradead.org]
> > Sent: Thursday, January 25, 2018 11:47 PM
> > To: Vadim Pasternak <vadimp@mellanox.com>
> > Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux-
> > kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; jiri@resnulli.us
> > Subject: Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove
> > redundant dev_err messages on device_create
> > 
> > On Wed, Jan 24, 2018 at 08:33:37PM +0000, Vadim Pasternak wrote:
> > > The upper layer will manage and report errors returned by the create
> > > and destroy functions.
> > >
> > > FIXME: but it doesn't - we don't even check
> > 
> > I think we agreed to just drop this patch entirely, since this error is not checked
> > elsewhere? Keeping the dev_err messages?
> > 
> 
> Yes, we'll keep it.
> We just had conflict in patch order and I wanted to fix it, staying as much as
> possible aligned with the top of mellanox v10 branch.
> 
> However currently we still  have a problem in mellanox v11 after patch
> platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface
> It dropped parameter device  in mlxreg_hotplug_device_create, which is
> Used inside the routine.
> 
> I'll send a separate patch to fix it from top of v11. In other case it'll be
> necessary to fix Modify to use a regmap interface  and re-send all from 
> 5-th patch in series.
> 
> Also we  should drop the patch:
> platform/x86: mlx-platform: Simplify IO access to regmap context
> It introduced the issue reported by sparse.
> 
> I am resending two last patches from review-dvhart-mellanox-v11 branch
> and also patch with fix for mlxreg_hotplug_device_create, as:
> 0010-platform-x86-mlx-platform-Extend-register-map-config.patch
> 0011-platform-mellanox-mlxreg-hotplug-Add-check-for-negat.patch
> 0012-platform-mellanox-mlxreg-hotplug-Fix-issue-of-commit.patch
> 
> Thank you very much for your help,

OK, please see review-dvhart-mellanox-v12 on infradead or github. I've verified
this passes a clean C=1 (sparse) build at each patch. I believe this is in a
state that can be moved to testing. Please confirm.

If you still want to move the dev_err messages out of the create function, we
can do that separately. Let's get this merged so we can move forward.

-- 
Darren Hart
VMware Open Source Technology Center

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

* RE: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
  2018-01-26 23:41     ` Darren Hart
@ 2018-01-27  5:08       ` Vadim Pasternak
  2018-01-31 18:40       ` Darren Hart
  1 sibling, 0 replies; 9+ messages in thread
From: Vadim Pasternak @ 2018-01-27  5:08 UTC (permalink / raw)
  To: Darren Hart
  Cc: andy.shevchenko, gregkh, linux-kernel, platform-driver-x86, jiri



> -----Original Message-----
> From: Darren Hart [mailto:dvhart@infradead.org]
> Sent: Saturday, January 27, 2018 1:41 AM
> To: Vadim Pasternak <vadimp@mellanox.com>
> Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux-
> kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; jiri@resnulli.us
> Subject: Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove
> redundant dev_err messages on device_create
> 
> On Fri, Jan 26, 2018 at 04:59:32PM +0000, Vadim Pasternak wrote:
> >
> >
> > > -----Original Message-----
> > > From: Darren Hart [mailto:dvhart@infradead.org]
> > > Sent: Thursday, January 25, 2018 11:47 PM
> > > To: Vadim Pasternak <vadimp@mellanox.com>
> > > Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux-
> > > kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org;
> > > jiri@resnulli.us
> > > Subject: Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox:
> > > Remove redundant dev_err messages on device_create
> > >
> > > On Wed, Jan 24, 2018 at 08:33:37PM +0000, Vadim Pasternak wrote:
> > > > The upper layer will manage and report errors returned by the
> > > > create and destroy functions.
> > > >
> > > > FIXME: but it doesn't - we don't even check
> > >
> > > I think we agreed to just drop this patch entirely, since this error
> > > is not checked elsewhere? Keeping the dev_err messages?
> > >
> >
> > Yes, we'll keep it.
> > We just had conflict in patch order and I wanted to fix it, staying as
> > much as possible aligned with the top of mellanox v10 branch.
> >
> > However currently we still  have a problem in mellanox v11 after patch
> > platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface It
> > dropped parameter device  in mlxreg_hotplug_device_create, which is
> > Used inside the routine.
> >
> > I'll send a separate patch to fix it from top of v11. In other case
> > it'll be necessary to fix Modify to use a regmap interface  and
> > re-send all from 5-th patch in series.
> >
> > Also we  should drop the patch:
> > platform/x86: mlx-platform: Simplify IO access to regmap context It
> > introduced the issue reported by sparse.
> >
> > I am resending two last patches from review-dvhart-mellanox-v11 branch
> > and also patch with fix for mlxreg_hotplug_device_create, as:
> > 0010-platform-x86-mlx-platform-Extend-register-map-config.patch
> > 0011-platform-mellanox-mlxreg-hotplug-Add-check-for-negat.patch
> > 0012-platform-mellanox-mlxreg-hotplug-Fix-issue-of-commit.patch
> >
> > Thank you very much for your help,
> 
> OK, please see review-dvhart-mellanox-v12 on infradead or github. I've verified
> this passes a clean C=1 (sparse) build at each patch. I believe this is in a state
> that can be moved to testing. Please confirm.
> 

Confirmed.

> If you still want to move the dev_err messages out of the create function, we
> can do that separately. Let's get this merged so we can move forward.
> 

It's OK with me. Let's leave it as it is now.

Thank you,
Vadim.

> --
> Darren Hart
> VMware Open Source Technology Center

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

* Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
  2018-01-26 23:41     ` Darren Hart
  2018-01-27  5:08       ` Vadim Pasternak
@ 2018-01-31 18:40       ` Darren Hart
  2018-01-31 18:47         ` Vadim Pasternak
  1 sibling, 1 reply; 9+ messages in thread
From: Darren Hart @ 2018-01-31 18:40 UTC (permalink / raw)
  To: Vadim Pasternak
  Cc: andy.shevchenko, gregkh, linux-kernel, platform-driver-x86, jiri

On Fri, Jan 26, 2018 at 03:41:17PM -0800, Darren Hart wrote:
> On Fri, Jan 26, 2018 at 04:59:32PM +0000, Vadim Pasternak wrote:
> > 
> > 
> > > -----Original Message-----
> > > From: Darren Hart [mailto:dvhart@infradead.org]
> > > Sent: Thursday, January 25, 2018 11:47 PM
> > > To: Vadim Pasternak <vadimp@mellanox.com>
> > > Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux-
> > > kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; jiri@resnulli.us
> > > Subject: Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove
> > > redundant dev_err messages on device_create
> > > 
> > > On Wed, Jan 24, 2018 at 08:33:37PM +0000, Vadim Pasternak wrote:
> > > > The upper layer will manage and report errors returned by the create
> > > > and destroy functions.
> > > >
> > > > FIXME: but it doesn't - we don't even check
> > > 
> > > I think we agreed to just drop this patch entirely, since this error is not checked
> > > elsewhere? Keeping the dev_err messages?
> > > 
> > 
> > Yes, we'll keep it.
> > We just had conflict in patch order and I wanted to fix it, staying as much as
> > possible aligned with the top of mellanox v10 branch.
> > 
> > However currently we still  have a problem in mellanox v11 after patch
> > platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface
> > It dropped parameter device  in mlxreg_hotplug_device_create, which is
> > Used inside the routine.
> > 
> > I'll send a separate patch to fix it from top of v11. In other case it'll be
> > necessary to fix Modify to use a regmap interface  and re-send all from 
> > 5-th patch in series.
> > 
> > Also we  should drop the patch:
> > platform/x86: mlx-platform: Simplify IO access to regmap context
> > It introduced the issue reported by sparse.
> > 
> > I am resending two last patches from review-dvhart-mellanox-v11 branch
> > and also patch with fix for mlxreg_hotplug_device_create, as:
> > 0010-platform-x86-mlx-platform-Extend-register-map-config.patch
> > 0011-platform-mellanox-mlxreg-hotplug-Add-check-for-negat.patch
> > 0012-platform-mellanox-mlxreg-hotplug-Fix-issue-of-commit.patch
> > 
> > Thank you very much for your help,
> 
> OK, please see review-dvhart-mellanox-v12 on infradead or github. I've verified
> this passes a clean C=1 (sparse) build at each patch. I believe this is in a
> state that can be moved to testing. Please confirm.
> 
> If you still want to move the dev_err messages out of the create function, we
> can do that separately. Let's get this merged so we can move forward.

I'm pushing v12 into testing, shortly to for-next, and then on to Linus. Please
speak up if there are any objections.

-- 
Darren Hart
VMware Open Source Technology Center

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

* RE: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
  2018-01-31 18:40       ` Darren Hart
@ 2018-01-31 18:47         ` Vadim Pasternak
  0 siblings, 0 replies; 9+ messages in thread
From: Vadim Pasternak @ 2018-01-31 18:47 UTC (permalink / raw)
  To: Darren Hart
  Cc: andy.shevchenko, gregkh, linux-kernel, platform-driver-x86, jiri



> -----Original Message-----
> From: Darren Hart [mailto:dvhart@infradead.org]
> Sent: Wednesday, January 31, 2018 8:41 PM
> To: Vadim Pasternak <vadimp@mellanox.com>
> Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux-
> kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; jiri@resnulli.us
> Subject: Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove
> redundant dev_err messages on device_create
> 
> On Fri, Jan 26, 2018 at 03:41:17PM -0800, Darren Hart wrote:
> > On Fri, Jan 26, 2018 at 04:59:32PM +0000, Vadim Pasternak wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Darren Hart [mailto:dvhart@infradead.org]
> > > > Sent: Thursday, January 25, 2018 11:47 PM
> > > > To: Vadim Pasternak <vadimp@mellanox.com>
> > > > Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux-
> > > > kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org;
> > > > jiri@resnulli.us
> > > > Subject: Re: [patch v11 - re-ordered 03/12] FIXME
> > > > platform/mellanox: Remove redundant dev_err messages on
> > > > device_create
> > > >
> > > > On Wed, Jan 24, 2018 at 08:33:37PM +0000, Vadim Pasternak wrote:
> > > > > The upper layer will manage and report errors returned by the
> > > > > create and destroy functions.
> > > > >
> > > > > FIXME: but it doesn't - we don't even check
> > > >
> > > > I think we agreed to just drop this patch entirely, since this
> > > > error is not checked elsewhere? Keeping the dev_err messages?
> > > >
> > >
> > > Yes, we'll keep it.
> > > We just had conflict in patch order and I wanted to fix it, staying
> > > as much as possible aligned with the top of mellanox v10 branch.
> > >
> > > However currently we still  have a problem in mellanox v11 after
> > > patch
> > > platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface
> > > It dropped parameter device  in mlxreg_hotplug_device_create, which
> > > is Used inside the routine.
> > >
> > > I'll send a separate patch to fix it from top of v11. In other case
> > > it'll be necessary to fix Modify to use a regmap interface  and
> > > re-send all from 5-th patch in series.
> > >
> > > Also we  should drop the patch:
> > > platform/x86: mlx-platform: Simplify IO access to regmap context It
> > > introduced the issue reported by sparse.
> > >
> > > I am resending two last patches from review-dvhart-mellanox-v11
> > > branch and also patch with fix for mlxreg_hotplug_device_create, as:
> > > 0010-platform-x86-mlx-platform-Extend-register-map-config.patch
> > > 0011-platform-mellanox-mlxreg-hotplug-Add-check-for-negat.patch
> > > 0012-platform-mellanox-mlxreg-hotplug-Fix-issue-of-commit.patch
> > >
> > > Thank you very much for your help,
> >
> > OK, please see review-dvhart-mellanox-v12 on infradead or github. I've
> > verified this passes a clean C=1 (sparse) build at each patch. I
> > believe this is in a state that can be moved to testing. Please confirm.
> >
> > If you still want to move the dev_err messages out of the create
> > function, we can do that separately. Let's get this merged so we can move
> forward.
> 
> I'm pushing v12 into testing, shortly to for-next, and then on to Linus. Please
> speak up if there are any objections.
> 

Hi Darren,

Thank you.
I'd like to send one small extra patch for this series - I missed
Removing hotplug driver in case of error here:
       /* Sync registers with hardware. */
       regcache_mark_dirty(mlxplat_hotplug->regmap);
       err = regcache_sync(mlxplat_hotplug->regmap);
       if (err)
               goto fail_platform_mux_register;

I'll do it today.

Thanks,
Vadim.

> --
> Darren Hart
> VMware Open Source Technology Center

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

end of thread, other threads:[~2018-01-31 18:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 20:33 [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Vadim Pasternak
2018-01-24 20:33 ` [patch v11 - re-ordered 04/12] platform/mellanox: Group create/destroy with attribute functions Vadim Pasternak
2018-01-24 20:33 ` [patch v11 - re-ordered 05/12] platform/mellanox: Rename i2c bus to nr Vadim Pasternak
2018-01-25 21:46 ` [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Darren Hart
2018-01-26 16:59   ` Vadim Pasternak
2018-01-26 23:41     ` Darren Hart
2018-01-27  5:08       ` Vadim Pasternak
2018-01-31 18:40       ` Darren Hart
2018-01-31 18:47         ` Vadim Pasternak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).