public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 4/7] kms_flip: Remove unreachable condition in wait_for_events
Date: Tue, 5 Mar 2019 12:39:11 +0200	[thread overview]
Message-ID: <20190305103911.GH4038@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <55bbf175b5fc0bee6927cb8de2853be2b4a9cd18.1551712108.git.rodrigosiqueiramelo@gmail.com>

On Mon, Mar 04, 2019 at 12:30:55PM -0300, Rodrigo Siqueira wrote:
> In the function wait_for_events() has a double check in the select()
> function return as described below:
> 
>   igt_assert_f(ret >= 0,
>         "select error (errno %i)\n", errno);
>   igt_assert_f(ret > 0,
>         "select timed out or error (ret %d)\n", ret);
> 
> Note that the second assert condition will not be reached because of the
> first assertion. This commit removes the code duplication and update the
> error message.

It will be reached if ret equals 0.

If select() returns 0, errno is unspecified, the main reason for the
separation.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-03-05 10:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 15:29 [igt-dev] [PATCH i-g-t 0/7] kms_flip: cleanups Rodrigo Siqueira
2019-03-04 15:29 ` [igt-dev] [PATCH i-g-t 1/7] kms_flip: Removes unreachable code related to TEST_RPM Rodrigo Siqueira
2019-03-04 15:30 ` [igt-dev] [PATCH i-g-t 2/7] kms_flip: Removes unreachable code related to TEST_TS_CONT Rodrigo Siqueira
2019-03-04 15:30 ` [igt-dev] [PATCH i-g-t 3/7] kms_flip: Fix warning related to i915 gem dependence Rodrigo Siqueira
2019-03-04 15:30 ` [igt-dev] [PATCH i-g-t 4/7] kms_flip: Remove unreachable condition in wait_for_events Rodrigo Siqueira
2019-03-05 10:39   ` Petri Latvala [this message]
2019-03-04 15:31 ` [igt-dev] [PATCH i-g-t 5/7] kms_flip: Remove magic constant in run_test_on_crtc_set() Rodrigo Siqueira
2019-03-04 15:31 ` [igt-dev] [PATCH i-g-t 6/7] kms_flip: Rework set_mode() Rodrigo Siqueira
2019-03-04 15:32 ` [Intel-gfx] [PATCH i-g-t 7/7] kms_flip: Standardize return value for fb_is_bound Rodrigo Siqueira
2019-03-06 11:25   ` [Intel-gfx] [igt-dev] " Maarten Lankhorst
2019-03-06 21:40     ` Rodrigo Siqueira
2019-03-04 16:18 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_flip: cleanups Patchwork
2019-03-04 20:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20190305103911.GH4038@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigosiqueiramelo@gmail.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