From: Jani Nikula <jani.nikula@intel.com>
To: "Michał Grzelak" <michal.grzelak@intel.com>,
igt-dev@lists.freedesktop.org
Cc: suraj.kandpal@intel.com, "Michał Grzelak" <michal.grzelak@intel.com>
Subject: Re: [PATCH i-g-t v2 3/8] tools/vbt_decode: return 0 from get_device_id()
Date: Thu, 11 Jun 2026 12:47:03 +0300 [thread overview]
Message-ID: <192121754ebb1046a28fcafa5875e906a26ec2d1@intel.com> (raw)
In-Reply-To: <20260608124121.3131410-4-michal.grzelak@intel.com>
On Mon, 08 Jun 2026, Michał Grzelak <michal.grzelak@intel.com> wrote:
> This function returns -1 on errors and the caller checks for 0. This
> leads to -1 being used as the device id. Return 0 instead of -1.
>
> Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> tools/intel_vbt_decode.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index 5b7a6a49e9..6a9c1de7b3 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -3700,13 +3700,13 @@ get_device_id(unsigned char *bios, int size)
> int offset = (bios[0x19] << 8) + bios[0x18];
>
> if (offset + 7 >= size)
> - return -1;
> + return 0;
>
> if (bios[offset] != 'P' ||
> bios[offset+1] != 'C' ||
> bios[offset+2] != 'I' ||
> bios[offset+3] != 'R')
> - return -1;
> + return 0;
>
> device = (bios[offset+7] << 8) + bios[offset+6];
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-06-11 9:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 12:41 [PATCH i-g-t v2 0/8] Vswing / Pre-emphasis Override decoding Michał Grzelak
2026-06-08 12:41 ` [PATCH i-g-t v2 1/8] tools/vbt_decode: fix tables' offset reading Michał Grzelak
2026-06-08 12:41 ` [PATCH i-g-t v2 2/8] tools/vbt_decode: rename VBT#57 related vars Michał Grzelak
2026-06-08 12:41 ` [PATCH i-g-t v2 3/8] tools/vbt_decode: return 0 from get_device_id() Michał Grzelak
2026-06-11 9:47 ` Jani Nikula [this message]
2026-06-08 12:41 ` [PATCH i-g-t v2 4/8] tools/vbt_decode: validate DEVICE env var Michał Grzelak
2026-06-11 9:51 ` Jani Nikula
2026-06-08 12:41 ` [PATCH i-g-t v2 5/8] tools/vbt_decode: guess devid from VBT signature Michał Grzelak
2026-06-10 14:42 ` Jani Nikula
2026-06-10 15:13 ` Ville Syrjälä
2026-06-11 9:58 ` Jani Nikula
2026-06-08 12:41 ` [PATCH i-g-t v2 6/8] tools/vbt_decode: parse & dump VS/PE-O tables for LT Michał Grzelak
2026-06-08 12:41 ` [PATCH i-g-t v2 7/8] tools/vbt_decode: parse & dump VS/PE-O tables for Snps Michał Grzelak
2026-06-08 12:41 ` [PATCH i-g-t v2 8/8] tools/vbt_decode: parse & dump VS/PE-O tables for Combo Michał Grzelak
2026-06-09 0:04 ` ✓ Xe.CI.BAT: success for Vswing / Pre-emphasis Override decoding Patchwork
2026-06-09 0:18 ` ✓ i915.CI.BAT: " Patchwork
2026-06-09 5:04 ` ✗ Xe.CI.FULL: failure " 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=192121754ebb1046a28fcafa5875e906a26ec2d1@intel.com \
--to=jani.nikula@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=michal.grzelak@intel.com \
--cc=suraj.kandpal@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