netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: tipecaml@gmail.com
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	mugunthanvnm@ti.com, zonque@gmail.com, hotforest@gmail.com,
	Julia.Lawall@lip6.fr, netdev@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: ti: remove redundant NULL check.
Date: Tue, 12 Feb 2013 17:06:50 -0500 (EST)	[thread overview]
Message-ID: <20130212.170650.89534546100043269.davem@davemloft.net> (raw)
In-Reply-To: <1360706086-31506-1-git-send-email-tipecaml@gmail.com>

From: Cyril Roelandt <tipecaml@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 <tipecaml@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.

  reply	other threads:[~2013-02-12 22:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 21:54 [PATCH] net: ethernet: ti: remove redundant NULL check Cyril Roelandt
2013-02-12 22:06 ` David Miller [this message]
2013-02-12 22:52   ` Cyril Roelandt
2013-02-13 18:41     ` David Miller
2013-02-12 22:54   ` Cyril Roelandt
2013-02-12 23:48     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130212.170650.89534546100043269.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Julia.Lawall@lip6.fr \
    --cc=hotforest@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=tipecaml@gmail.com \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).