From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>, Hartmut Knaack <knaack.h@gmx.de>
Cc: linux-iio@vger.kernel.org
Subject: Re: [RFC]coding style for NULL pointer checks
Date: Tue, 18 Feb 2014 08:40:07 +0000 [thread overview]
Message-ID: <53031C67.8060202@kernel.org> (raw)
In-Reply-To: <530109DE.3010607@metafoo.de>
On 16/02/14 18:56, Lars-Peter Clausen wrote:
> On 02/16/2014 01:19 PM, Hartmut Knaack wrote:
>> Hi together,
>> I noticed, that many pointers in the IIO subsystem are checked for successful allocation in the way of "if (pointer == NULL)" or "if (pointer != NULL)", while in a few cases the form of simply "if (!pointer)" or "if (pointer)" is used. So, is there any interest in having a more consistent style, and if so, for which one?
>> My personal preference is for the latter one.
>
> I think enforcing this is a bit to much nitpicking. So if you clean this up the other pattern will probably appear again in new drivers at some point.
>
> Otherwise, if you feel strongly about this, go ahead and send a patch.
My inclination on this is that there are better things to spend time on
but as they say scratch the itch if you really want to!
I'd rather have the nice error patch cleanups you've been doing or
if you are really bored, there are lots of staging drivers in need of
tendour loving care!
J
next prev parent reply other threads:[~2014-02-18 8:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 12:19 [RFC]coding style for NULL pointer checks Hartmut Knaack
2014-02-16 18:56 ` Lars-Peter Clausen
2014-02-18 8:40 ` Jonathan Cameron [this message]
2014-02-19 22:54 ` Hartmut Knaack
2014-02-20 9:04 ` Lars-Peter Clausen
2014-02-20 18:55 ` Jonathan Cameron
2014-02-20 19:13 ` Lars-Peter Clausen
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=53031C67.8060202@kernel.org \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.