From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Maninder Singh <maninder1.s@samsung.com>
Cc: lgirdwood@gmail.com, broonie@kernel.org,
patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org, pankaj.m@samsung.com
Subject: Re: [PATCH v2] regulator: wm831x-dcdc: Use pointer after NULL check
Date: Thu, 2 Jul 2015 11:18:49 +0100 [thread overview]
Message-ID: <20150702101849.GB16517@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1435823829-3174-1-git-send-email-maninder1.s@samsung.com>
On Thu, Jul 02, 2015 at 01:27:09PM +0530, Maninder Singh wrote:
> pdata is used before NULL check, so it looks misleading.
> If pdata validation is required then we have to
> first check for pdata validation, then calculate id,
> and then second check for pdata->dcdc[id].
>
> and it is better to use !pointer than (pointer == NULL)
>
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> ---
The patch basically looks fine, but it feels a bit like needless
churn. The current code is perfectly correct and feels clear
enough to me.
Thanks,
Charles
next prev parent reply other threads:[~2015-07-02 10:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 7:57 Maninder Singh
2015-07-02 10:18 ` Charles Keepax [this message]
2015-07-02 11:14 ` Mark Brown
2015-07-02 11:19 ` Charles Keepax
2015-07-02 11:33 ` Mark Brown
2015-07-02 11:02 Maninder Singh
2015-07-02 11:12 ` Charles Keepax
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=20150702101849.GB16517@opensource.wolfsonmicro.com \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maninder1.s@samsung.com \
--cc=pankaj.m@samsung.com \
--cc=patches@opensource.wolfsonmicro.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
Powered by JetHome