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


Groups > linux.kernel > #1452782 > unrolled thread

[PATCH 1/1] dsa: b53: remove redundant if

Started byHeinrich Schuchardt <xypron.glpk@gmx.de>
First post2016-07-31 09:50 +0200
Last post2016-08-01 22:50 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] dsa: b53: remove redundant if Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-07-31 09:50 +0200
    Re: [PATCH 1/1] dsa: b53: remove redundant if Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-07-31 12:10 +0200
      [PATCH 1/1 v2] dsa: b53: remove redundant if Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-07-31 13:50 +0200
        Re: [PATCH 1/1 v2] dsa: b53: remove redundant if David Miller <davem@davemloft.net> - 2016-08-01 22:50 +0200

#1452782 — [PATCH 1/1] dsa: b53: remove redundant if

FromHeinrich Schuchardt <xypron.glpk@gmx.de>
Date2016-07-31 09:50 +0200
Subject[PATCH 1/1] dsa: b53: remove redundant if
Message-ID<s0TFv-5Cn-7@gated-at.bofh.it>
For pdata == null the code leaves with an error.
There is need to check the condition again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/net/dsa/b53/b53_mmap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index 21f1068..77ffc43 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -233,8 +233,7 @@ static int b53_mmap_probe(struct platform_device *pdev)
 	if (!dev)
 		return -ENOMEM;
 
-	if (pdata)
-		dev->pdata = pdata;
+	dev->pdata = pdata;
 
 	platform_set_drvdata(pdev, dev);
 
-- 
2.8.1

[toc] | [next] | [standalone]


#1452801

FromSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date2016-07-31 12:10 +0200
Message-ID<s0VR0-79F-25@gated-at.bofh.it>
In reply to#1452782
Hello.

On 7/31/2016 10:42 AM, Heinrich Schuchardt wrote:

> For pdata == null the code leaves with an error.
> There is need to check the condition again.

    No need, you mean?

> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[...]

MBR, Sergei

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


#1452814 — [PATCH 1/1 v2] dsa: b53: remove redundant if

FromHeinrich Schuchardt <xypron.glpk@gmx.de>
Date2016-07-31 13:50 +0200
Subject[PATCH 1/1 v2] dsa: b53: remove redundant if
Message-ID<s0XpM-805-7@gated-at.bofh.it>
In reply to#1452801
For pdata == null the code leaves with an error.
There is no need to check the condition again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/net/dsa/b53/b53_mmap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index 21f1068..77ffc43 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -233,8 +233,7 @@ static int b53_mmap_probe(struct platform_device *pdev)
 	if (!dev)
 		return -ENOMEM;
 
-	if (pdata)
-		dev->pdata = pdata;
+	dev->pdata = pdata;
 
 	platform_set_drvdata(pdev, dev);
 
-- 
2.8.1

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


#1453459 — Re: [PATCH 1/1 v2] dsa: b53: remove redundant if

FromDavid Miller <davem@davemloft.net>
Date2016-08-01 22:50 +0200
SubjectRe: [PATCH 1/1 v2] dsa: b53: remove redundant if
Message-ID<s1sjU-2WL-19@gated-at.bofh.it>
In reply to#1452814
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 31 Jul 2016 13:42:33 +0200

> For pdata == null the code leaves with an error.
> There is no need to check the condition again.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web