From: Damien Lespiau <damien.lespiau@intel.com>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Fix the VBT child device parsing for BSW
Date: Thu, 9 Apr 2015 09:49:25 +0100 [thread overview]
Message-ID: <20150409084925.GA5133@strange.config> (raw)
In-Reply-To: <1427301958-11101-1-git-send-email-ville.syrjala@linux.intel.com>
On Wed, Mar 25, 2015 at 06:45:58PM +0200, ville.syrjala@linux.intel.com wrote:
> +static union child_device_config *
> +child_device_ptr(struct bdb_general_definitions *p_defs, int i)
> +{
> + return (void *) &p_defs->devices[i * p_defs->child_dev_size];
> +}
Actually this looks wrong. We're doing:
p_defs->devices + sizeof(union child_device_config) * i * child_dev_size
instead of:
(u8)p_defs->devices + i * child_dev_size
?
I wondered about the (void *) cast precedence over [], because gcc
treats void * pointer arithmetic with a size of 1, but [] will be done
first apparently.
--
Damien
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-04-09 8:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-25 16:45 [PATCH] drm/i915: Fix the VBT child device parsing for BSW ville.syrjala
2015-03-26 4:42 ` shuang.he
2015-04-08 17:09 ` Damien Lespiau
2015-04-09 8:49 ` Damien Lespiau [this message]
2015-04-09 10:37 ` Ville Syrjälä
2015-04-09 10:56 ` Damien Lespiau
2015-04-09 12:28 ` Daniel Vetter
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=20150409084925.GA5133@strange.config \
--to=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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