public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: nouveau: Bool tests don't need comparison
@ 2012-12-12 13:54 Laurent Navet
  2012-12-13  8:16 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Navet @ 2012-12-12 13:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: bskeggs, dri-devel, airlied, kernel-janitors, Laurent Navet

 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: nouveau: Bool tests don't need comparison
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-12-13  8:16 UTC (permalink / raw)
  To: Laurent Navet; +Cc: linux-kernel, bskeggs, dri-devel, airlied, kernel-janitors

On Wed, Dec 12, 2012 at 02:54:10PM +0100, Laurent Navet wrote:
>  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/
> 

For some reason the commit message is indented by one space.  Don't
do whatever caused that.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: nouveau: Bool tests don't need comparison
  2012-12-13  8:16 ` Dan Carpenter
@ 2012-12-13 20:45   ` Laurent Navet
  0 siblings, 0 replies; 3+ messages in thread
From: Laurent Navet @ 2012-12-13 20:45 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: bskeggs, linux-kernel, dri-devel, airlied, kernel-janitors

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-13 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox