mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@sirena.org.uk>
Cc: Julien Brunel <brunel@diku.dk>,
	Geoffrey Wossum <geoffrey@pager.net>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] sound/soc/at32: Useless NULL test
Date: Fri, 26 Sep 2008 16:45:54 +0200	[thread overview]
Message-ID: <s5hej37artp.wl%tiwai@suse.de> (raw)
In-Reply-To: <20080926140021.GD15493@sirena.org.uk>

At Fri, 26 Sep 2008 15:00:23 +0100,
Mark Brown wrote:
> 
> On Fri, Sep 26, 2008 at 03:23:46PM +0200, Julien Brunel wrote:
> 
> > The test (ssc != NULL) can only be reached if the call to the function
> > ssc_request, the result of which ssc is assigned, succeeds. Moreover,
> > statements assign NULL to ssc just before a return, which is useless
> > since it is a local variable. So, we suggest to delete the test and
> > the two assignments.
> 
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Applied now.  Thanks.

> For future reference if you're submitting other similar things (which I
> guess you will given that you've got a tool to check for this stuff)
> it'd be helpful if you could rewrite the explanation for the NULL test
> to be something like:
> 
>     The test (ssc != NULL) is redundant since it can only be reached
>     when ssc is guaranteed to have been set to a valid ssc.
> 
> which is much easier to parse.

Agreed :)


Takashi

      reply	other threads:[~2008-09-26 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-26 13:23 Julien Brunel
2008-09-26 14:00 ` Mark Brown
2008-09-26 14:45   ` Takashi Iwai [this message]

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=s5hej37artp.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=broonie@sirena.org.uk \
    --cc=brunel@diku.dk \
    --cc=geoffrey@pager.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®