Re: [PATCH 2/2 i-g-t] lib/igt.cocci: Add 64-bit and float compare functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 30, 2015 at 03:08:48PM +0100, Michel Thierry wrote:
> On 6/30/2015 2:54 PM, Chris Wilson wrote:
> >On Tue, Jun 30, 2015 at 02:41:09PM +0100, Michel Thierry wrote:
> >>@@ -1109,7 +1109,7 @@ static void setup_sink_crc(void)
> >>  	set_mode_for_params(&prim_mode_params);
> >>
> >>  	sink_crc.fd = igt_debugfs_open("i915_sink_crc_eDP1", O_RDONLY);
> >>-	igt_assert(sink_crc.fd >= 0);
> >>+	igt_assert_lte(0, sink_crc.fd);
> >
> >This one is wrong, and similar transformations.
> 
> I also saw it wrong at the beginning...
> But, I think it's correct because coccinelle changed the operands
> order (the macro is checking for less-than or equals to).

Apparently my logic stinks. I was thinking that '<' was the logical
opposite of '>=' and so that's what I then expected to see.

In this case, just igt_assert_fd(sink_crtc.fd) would be more useful.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux