Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1723540 > unrolled thread

[PATCH 0/5] net: mdio-mux: Misc fix

Started byCorentin Labbe <clabbe.montjoie@gmail.com>
First post2017-08-30 19:50 +0200
Last post2017-09-01 10:40 +0200
Articles 11 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/5] net: mdio-mux: Misc fix Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 19:50 +0200
    [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 19:50 +0200
      Re: [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory'  message Andrew Lunn <andrew@lunn.ch> - 2017-08-30 20:50 +0200
    [PATCH 3/5] net: mdio-mux: printing driver version is useless Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 20:00 +0200
      Re: [PATCH 3/5] net: mdio-mux: printing driver version is useless Andrew Lunn <andrew@lunn.ch> - 2017-08-30 20:50 +0200
    [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 20:00 +0200
      Re: [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits  registers Andrew Lunn <andrew@lunn.ch> - 2017-08-30 20:50 +0200
    [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 20:00 +0200
      Re: [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style Andrew Lunn <andrew@lunn.ch> - 2017-08-30 20:50 +0200
    Re: [PATCH 0/5] net: mdio-mux: Misc fix Andrew Lunn <andrew@lunn.ch> - 2017-08-30 21:10 +0200
      Re: [PATCH 0/5] net: mdio-mux: Misc fix Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-01 10:40 +0200

#1723540 — [PATCH 0/5] net: mdio-mux: Misc fix

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-08-30 19:50 +0200
Subject[PATCH 0/5] net: mdio-mux: Misc fix
Message-ID<ukfhM-2SU-13@gated-at.bofh.it>
Hello

This patch series fix minor problems found when working on the
dwmac-sun8i syscon mdio-mux.

Regards

Corentin Labbe (5):
  net: mdio-mux: Fix NULL Comparison style
  net: mdio-mux: Remove unnecessary 'out of memory' message
  net: mdio-mux: printing driver version is useless
  net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers
  net: mdio-mux: fix unbalanced put_device

 drivers/net/phy/Kconfig    |  2 +-
 drivers/net/phy/mdio-mux.c | 15 ++++-----------
 2 files changed, 5 insertions(+), 12 deletions(-)

-- 
2.13.5

[toc] | [next] | [standalone]


#1723542 — [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-08-30 19:50 +0200
Subject[PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message
Message-ID<ukfhM-2SU-23@gated-at.bofh.it>
In reply to#1723540
This patch fix checkpatch warning about unnecessary 'out of memory'
message.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/net/phy/mdio-mux.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index b18ad7082b88..5e08e89465c5 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -145,9 +145,6 @@ int mdio_mux_init(struct device *dev,
 
 		cb = devm_kzalloc(dev, sizeof(*cb), GFP_KERNEL);
 		if (!cb) {
-			dev_err(dev,
-				"Error: Failed to allocate memory for child %pOF\n",
-				child_bus_node);
 			ret_val = -ENOMEM;
 			continue;
 		}
@@ -156,9 +153,6 @@ int mdio_mux_init(struct device *dev,
 
 		cb->mii_bus = mdiobus_alloc();
 		if (!cb->mii_bus) {
-			dev_err(dev,
-				"Error: Failed to allocate MDIO bus for child %pOF\n",
-				child_bus_node);
 			ret_val = -ENOMEM;
 			devm_kfree(dev, cb);
 			continue;
-- 
2.13.5

[toc] | [prev] | [next] | [standalone]


#1723589 — Re: [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message

FromAndrew Lunn <andrew@lunn.ch>
Date2017-08-30 20:50 +0200
SubjectRe: [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message
Message-ID<ukgdQ-3tX-13@gated-at.bofh.it>
In reply to#1723542
On Wed, Aug 30, 2017 at 07:46:48PM +0200, Corentin Labbe wrote:
> This patch fix checkpatch warning about unnecessary 'out of memory'
> message.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [next] | [standalone]


#1723547 — [PATCH 3/5] net: mdio-mux: printing driver version is useless

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-08-30 20:00 +0200
Subject[PATCH 3/5] net: mdio-mux: printing driver version is useless
Message-ID<ukfrs-2W1-9@gated-at.bofh.it>
In reply to#1723540
Remove the driver version information because this information
is not useful in an upstream kernel driver.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/net/phy/mdio-mux.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index 5e08e89465c5..9a889a529b9c 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -179,7 +179,6 @@ int mdio_mux_init(struct device *dev,
 	}
 	if (pb->children) {
 		*mux_handle = pb;
-		dev_info(dev, "Version " DRV_VERSION "\n");
 		return 0;
 	}
 
-- 
2.13.5

[toc] | [prev] | [next] | [standalone]


#1723588 — Re: [PATCH 3/5] net: mdio-mux: printing driver version is useless

FromAndrew Lunn <andrew@lunn.ch>
Date2017-08-30 20:50 +0200
SubjectRe: [PATCH 3/5] net: mdio-mux: printing driver version is useless
Message-ID<ukgdQ-3tX-9@gated-at.bofh.it>
In reply to#1723547
On Wed, Aug 30, 2017 at 07:46:49PM +0200, Corentin Labbe wrote:
> Remove the driver version information because this information
> is not useful in an upstream kernel driver.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Hi Corentin

You may as well remove DRV_VERSION from this file, not just here.

    Andrew

[toc] | [prev] | [next] | [standalone]


#1723552 — [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-08-30 20:00 +0200
Subject[PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers
Message-ID<ukfrs-2W1-23@gated-at.bofh.it>
In reply to#1723540
This patch fix an old information that mdio-mux-mmioreg can only handle
8bit registers.
This is not true anymore.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/net/phy/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 5afe6fdcc968..a9d16a3af514 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -85,7 +85,7 @@ config MDIO_BUS_MUX_MMIOREG
 	  parent bus.  Child bus selection is under the control of one of
 	  the FPGA's registers.
 
-	  Currently, only 8-bit registers are supported.
+	  Currently, only 8/16/32 bits registers are supported.
 
 config MDIO_CAVIUM
 	tristate
-- 
2.13.5

[toc] | [prev] | [next] | [standalone]


#1723593 — Re: [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers

FromAndrew Lunn <andrew@lunn.ch>
Date2017-08-30 20:50 +0200
SubjectRe: [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers
Message-ID<ukgdR-3tX-29@gated-at.bofh.it>
In reply to#1723552
On Wed, Aug 30, 2017 at 07:46:50PM +0200, Corentin Labbe wrote:
> This patch fix an old information that mdio-mux-mmioreg can only handle
> 8bit registers.
> This is not true anymore.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [next] | [standalone]


#1723554 — [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-08-30 20:00 +0200
Subject[PATCH 1/5] net: mdio-mux: Fix NULL Comparison style
Message-ID<ukfrs-2W1-25@gated-at.bofh.it>
In reply to#1723540
This patch fix checkpatch warning about NULL Comparison style.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/net/phy/mdio-mux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index 942ceaf3fd3f..b18ad7082b88 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -120,7 +120,7 @@ int mdio_mux_init(struct device *dev,
 	}
 
 	pb = devm_kzalloc(dev, sizeof(*pb), GFP_KERNEL);
-	if (pb == NULL) {
+	if (!pb) {
 		ret_val = -ENOMEM;
 		goto err_pb_kz;
 	}
@@ -144,7 +144,7 @@ int mdio_mux_init(struct device *dev,
 		}
 
 		cb = devm_kzalloc(dev, sizeof(*cb), GFP_KERNEL);
-		if (cb == NULL) {
+		if (!cb) {
 			dev_err(dev,
 				"Error: Failed to allocate memory for child %pOF\n",
 				child_bus_node);
-- 
2.13.5

[toc] | [prev] | [next] | [standalone]


#1723592 — Re: [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style

FromAndrew Lunn <andrew@lunn.ch>
Date2017-08-30 20:50 +0200
SubjectRe: [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style
Message-ID<ukgdR-3tX-27@gated-at.bofh.it>
In reply to#1723554
On Wed, Aug 30, 2017 at 07:46:47PM +0200, Corentin Labbe wrote:
> This patch fix checkpatch warning about NULL Comparison style.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [next] | [standalone]


#1723601

FromAndrew Lunn <andrew@lunn.ch>
Date2017-08-30 21:10 +0200
Message-ID<ukgxb-3Pz-3@gated-at.bofh.it>
In reply to#1723540
On Wed, Aug 30, 2017 at 07:46:46PM +0200, Corentin Labbe wrote:
> Hello
> 
> This patch series fix minor problems found when working on the
> dwmac-sun8i syscon mdio-mux.

Hi Corentin

In general, a nice patchset.

Looking at the code, there are a few calls to devm_kfree() which look
redundant. This one should probably stay:

	   	if (r) {
			mdiobus_free(cb->mii_bus);
			devm_kfree(dev, cb);
		} else {

but i think the others can go.

Just a suggestion, not a problem if you don't feel like doing this...

   Andrew

[toc] | [prev] | [next] | [standalone]


#1724878

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-09-01 10:40 +0200
Message-ID<ukPEC-1pS-17@gated-at.bofh.it>
In reply to#1723601
On Wed, Aug 30, 2017 at 09:01:19PM +0200, Andrew Lunn wrote:
> On Wed, Aug 30, 2017 at 07:46:46PM +0200, Corentin Labbe wrote:
> > Hello
> > 
> > This patch series fix minor problems found when working on the
> > dwmac-sun8i syscon mdio-mux.
> 
> Hi Corentin
> 
> In geineral, a nice patchset.

Thanks, I will send a v2 with your suggestions.

> 
> Looking at the code, there are a few calls to devm_kfree() which look
> redundant. This one should probably stay:
> 
> 	   	if (r) {
> 			mdiobus_free(cb->mii_bus);
> 			devm_kfree(dev, cb);
> 		} else {
> 
> but i think the others can go.
> 
> Just a suggestion, not a problem if you don't feel like doing this...
> 

I will try but in another serie. For letting more time for test.

Regards

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web