Re: [PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-13 Thread David Miller
From: Cyril Roelandt 
Date: Tue, 12 Feb 2013 23:52:30 +0100

> cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
> cpdma_ctlr_destroy() can safely be removed.
> 
> Signed-off-by: Cyril Roelandt 

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-13 Thread David Miller
From: Cyril Roelandt tipec...@gmail.com
Date: Tue, 12 Feb 2013 23:52:30 +0100

 cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
 cpdma_ctlr_destroy() can safely be removed.
 
 Signed-off-by: Cyril Roelandt tipec...@gmail.com

Applied, thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread David Miller
From: Cyril Roelandt 
Date: Tue, 12 Feb 2013 23:54:41 +0100

> Ok, I resent, though I forgot to add "v2".

Don't worry about that.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread Cyril Roelandt

On 02/12/2013 11:06 PM, David Miller wrote:

From: Cyril Roelandt
Date: Tue, 12 Feb 2013 22:54:46 +0100


cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.

Signed-off-by: Cyril Roelandt

  ...

@@ -450,8 +450,7 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
cpdma_ctlr_stop(ctlr);

for (i = 0; i<  ARRAY_SIZE(ctlr->channels); i++) {
-   if (ctlr->channels[i])
-   cpdma_chan_destroy(ctlr->channels[i]);
+   cpdma_chan_destroy(ctlr->channels[i]);
}


SInce this is now a single statement basic block, remove the
surrounding braces.


Ok, I resent, though I forgot to add "v2".

Regards,
Cyril Roelandt.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread Cyril Roelandt
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.

Signed-off-by: Cyril Roelandt 
---
 drivers/net/ethernet/ti/davinci_cpdma.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c 
b/drivers/net/ethernet/ti/davinci_cpdma.c
index f862918..1c4b0aa 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -449,10 +449,8 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
if (ctlr->state != CPDMA_STATE_IDLE)
cpdma_ctlr_stop(ctlr);
 
-   for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++) {
-   if (ctlr->channels[i])
-   cpdma_chan_destroy(ctlr->channels[i]);
-   }
+   for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++)
+   cpdma_chan_destroy(ctlr->channels[i]);
 
cpdma_desc_pool_destroy(ctlr->pool);
spin_unlock_irqrestore(>lock, flags);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread David Miller
From: Cyril Roelandt 
Date: Tue, 12 Feb 2013 22:54:46 +0100

> cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
> cpdma_ctlr_destroy() can safely be removed.
> 
> Signed-off-by: Cyril Roelandt 
 ...
> @@ -450,8 +450,7 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
>   cpdma_ctlr_stop(ctlr);
>  
>   for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++) {
> - if (ctlr->channels[i])
> - cpdma_chan_destroy(ctlr->channels[i]);
> + cpdma_chan_destroy(ctlr->channels[i]);
>   }

SInce this is now a single statement basic block, remove the
surrounding braces.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread Cyril Roelandt
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.

Signed-off-by: Cyril Roelandt 
---
 drivers/net/ethernet/ti/davinci_cpdma.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c 
b/drivers/net/ethernet/ti/davinci_cpdma.c
index f862918..aba787b 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -450,8 +450,7 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
cpdma_ctlr_stop(ctlr);
 
for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++) {
-   if (ctlr->channels[i])
-   cpdma_chan_destroy(ctlr->channels[i]);
+   cpdma_chan_destroy(ctlr->channels[i]);
}
 
cpdma_desc_pool_destroy(ctlr->pool);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread Cyril Roelandt
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.

Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
 drivers/net/ethernet/ti/davinci_cpdma.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c 
b/drivers/net/ethernet/ti/davinci_cpdma.c
index f862918..aba787b 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -450,8 +450,7 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
cpdma_ctlr_stop(ctlr);
 
for (i = 0; i  ARRAY_SIZE(ctlr-channels); i++) {
-   if (ctlr-channels[i])
-   cpdma_chan_destroy(ctlr-channels[i]);
+   cpdma_chan_destroy(ctlr-channels[i]);
}
 
cpdma_desc_pool_destroy(ctlr-pool);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread David Miller
From: Cyril Roelandt tipec...@gmail.com
Date: Tue, 12 Feb 2013 22:54:46 +0100

 cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
 cpdma_ctlr_destroy() can safely be removed.
 
 Signed-off-by: Cyril Roelandt tipec...@gmail.com
 ...
 @@ -450,8 +450,7 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
   cpdma_ctlr_stop(ctlr);
  
   for (i = 0; i  ARRAY_SIZE(ctlr-channels); i++) {
 - if (ctlr-channels[i])
 - cpdma_chan_destroy(ctlr-channels[i]);
 + cpdma_chan_destroy(ctlr-channels[i]);
   }

SInce this is now a single statement basic block, remove the
surrounding braces.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread Cyril Roelandt
cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.

Signed-off-by: Cyril Roelandt tipec...@gmail.com
---
 drivers/net/ethernet/ti/davinci_cpdma.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c 
b/drivers/net/ethernet/ti/davinci_cpdma.c
index f862918..1c4b0aa 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -449,10 +449,8 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
if (ctlr-state != CPDMA_STATE_IDLE)
cpdma_ctlr_stop(ctlr);
 
-   for (i = 0; i  ARRAY_SIZE(ctlr-channels); i++) {
-   if (ctlr-channels[i])
-   cpdma_chan_destroy(ctlr-channels[i]);
-   }
+   for (i = 0; i  ARRAY_SIZE(ctlr-channels); i++)
+   cpdma_chan_destroy(ctlr-channels[i]);
 
cpdma_desc_pool_destroy(ctlr-pool);
spin_unlock_irqrestore(ctlr-lock, flags);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread Cyril Roelandt

On 02/12/2013 11:06 PM, David Miller wrote:

From: Cyril Roelandttipec...@gmail.com
Date: Tue, 12 Feb 2013 22:54:46 +0100


cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.

Signed-off-by: Cyril Roelandttipec...@gmail.com

  ...

@@ -450,8 +450,7 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
cpdma_ctlr_stop(ctlr);

for (i = 0; i  ARRAY_SIZE(ctlr-channels); i++) {
-   if (ctlr-channels[i])
-   cpdma_chan_destroy(ctlr-channels[i]);
+   cpdma_chan_destroy(ctlr-channels[i]);
}


SInce this is now a single statement basic block, remove the
surrounding braces.


Ok, I resent, though I forgot to add v2.

Regards,
Cyril Roelandt.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net: ethernet: ti: remove redundant NULL check.

2013-02-12 Thread David Miller
From: Cyril Roelandt tipec...@gmail.com
Date: Tue, 12 Feb 2013 23:54:41 +0100

 Ok, I resent, though I forgot to add v2.

Don't worry about that.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/