From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 2/2] tools/intel_vbt_decode: check inconsistent sequence element size
Date: Fri, 8 Mar 2019 21:09:40 +0200 [thread overview]
Message-ID: <20190308190940.GV3888@intel.com> (raw)
In-Reply-To: <20190308190107.32514-2-jani.nikula@intel.com>
On Fri, Mar 08, 2019 at 09:01:07PM +0200, Jani Nikula wrote:
> Cross check against the element dumper return value to catch
> inconsistencies.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> tools/intel_vbt_decode.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index de4cc88a06dd..5f3db808d70d 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -1289,7 +1289,13 @@ static const uint8_t *dump_sequence(const uint8_t *data, uint8_t seq_version)
> operation_size = *data++;
>
> if (mipi_elem_dump) {
> + const uint8_t *next = data + operation_size;
> +
> data = mipi_elem_dump(data, seq_version);
> +
> + if (operation_size && next != data)
> + printf("Error: Inconsistent operation size: %d\n",
> + operation_size);
I guess non-fatal error is better than the assert I had.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
for both
> } else if (operation_size) {
> /* We have size, skip. */
> data += operation_size;
> --
> 2.20.1
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-03-08 19:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 19:01 [igt-dev] [PATCH i-g-t 1/2] tools/intel_vbt_decode: fix mipi gpio element dumping for sequence v3 Jani Nikula
2019-03-08 19:01 ` [igt-dev] [PATCH i-g-t 2/2] tools/intel_vbt_decode: check inconsistent sequence element size Jani Nikula
2019-03-08 19:09 ` Ville Syrjälä [this message]
2019-03-08 19:28 ` Jani Nikula
2019-03-09 1:42 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] tools/intel_vbt_decode: fix mipi gpio element dumping for sequence v3 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=20190308190940.GV3888@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@intel.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