public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Navet <laurent.navet@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: bskeggs@redhat.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, airlied@linux.ie,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drivers: nouveau: Bool tests don't need comparison
Date: Thu, 13 Dec 2012 21:45:39 +0100	[thread overview]
Message-ID: <20121213204538.GA7031@gmail.com> (raw)
In-Reply-To: <20121213081657.GV6568@mwanda>

Bool initializations should use true and false.  Bool tests don't need
comparisons.  Based on contributions from Joe Perches, Rusty Russell
and Bruce W Allan.
The semantic patch that makes this output is available
in scripts/coccinelle/misc/boolinit.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/gpu/drm/nouveau/core/subdev/timer/base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/core/subdev/timer/base.c
b/drivers/gpu/drm/nouveau/core/subdev/timer/base.c
index 5d417cc..de6d6b7 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/timer/base.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/timer/base.c
@@ -72,7 +72,7 @@ nouveau_timer_wait_cb(void *obj, u64 nsec, bool
(*func)(void *), void *data)
 
        time0 = ptimer->read(ptimer);
        do {
-               if (func(data) == true)
+               if (func(data))
                        return true;
        } while (ptimer->read(ptimer) - time0 < nsec);
 
-- 
1.7.10.4

      reply	other threads:[~2012-12-13 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 13:54 [PATCH] drivers: nouveau: Bool tests don't need comparison Laurent Navet
2012-12-13  8:16 ` Dan Carpenter
2012-12-13 20:45   ` Laurent Navet [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=20121213204538.GA7031@gmail.com \
    --to=laurent.navet@gmail.com \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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