All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: Yunlian Jiang <yunlian@google.com>, Thomas Wood <thomas.wood@intel.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Benjamin Widawsky <benjamin.widawsky@intel.com>
Subject: Re: PATCH i-g-t Fix a clang compile error.
Date: Thu, 30 Apr 2015 15:15:34 +0100	[thread overview]
Message-ID: <55423906.2060808@intel.com> (raw)
In-Reply-To: <CAMsPy2vpCSZMEoostpdkE1nEbZjs2q+aVsMSbCn6tZ25Lomodg@mail.gmail.com>

On 27/04/15 17:20, Yunlian Jiang wrote:
> Thomas,
>     Thanks for the review. This time I put the patch in the attachment so
> it should be applied cleanly.
>  I added Signed-off-by line too.
>       Thanks
> 
> From c2f6ecc1c8837abd87aa2da5510281a4833b2a27 Mon Sep 17 00:00:00 2001
> From: Yunlian Jiang <yunlian@chromium.com>
> Date: Mon, 27 Apr 2015 09:14:33 -0700
> Subject: [PATCH 3432/3432] Remove struct per_thread_data to make it compile
>  with clang.
> 
> The bug enty is https://code.google.com/p/chromium/issues/detail?id=476001
> This patch makes clang happy.
> 
> Cc:Benjamin Widawsky <benjamin.widawsky at intel.com>
> Cc:Thomas Wood <thomas.wood at intel.com>
> Signed-off-by: Yunlian Jiang <yunlian at chromium.org>
> ---
>  debugger/eudb.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/debugger/eudb.c b/debugger/eudb.c
> index 0e810db..21405ef 100644
> --- a/debugger/eudb.c
> +++ b/debugger/eudb.c
> @@ -207,15 +207,11 @@ wait_for_attn(int timeout, int *out_bits) {
>  #define eu_tid(bit) eu_info->debuggees[bit].tid
>  static struct eu_state *
>  find_eu_shmem(int bit, volatile uint8_t *buf) {
> -	struct per_thread_data {
> -		uint8_t ____[dh.per_thread_scratch];
> -	}__attribute__((packed)) *data;
>  	struct eu_state *eu;
>  	int mem_tid, mem_euid, i;
>  
> -	data = (struct per_thread_data *)buf;
>  	for(i = 0; i < eu_info->num_threads; i++) {
> -		eu = (struct eu_state *)&data[i];
> +		eu = (struct eu_state *)&data[i * dh.per_thread_scratc];

This line can't be right! AFAICS, you don't have anything called 'data'
in scope now (you deleted the declaration); also, there's an 'h' missing
right at the end, just before the closing ']' :(

Perhaps it should say:

+		eu = (struct eu_state *)&buf[i * dh.per_thread_scratch];

or even:

+		eu = (struct eu_state *)(buf + i*dh.per_thread_scratch);

.Dave.

>  		mem_tid = eu->sr0 & 0x7;
>  		mem_euid = (eu->sr0 >> 8) & 0xf;
>  		if (mem_tid == eu_tid(bit) && mem_euid == eu_id(bit))
> -- 2.2.0.rc0.207.ga3a616c 



_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-04-30 14:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 16:54 PATCH i-g-t Fix a clang compile error Yunlian Jiang
2015-04-27 13:36 ` Thomas Wood
2015-04-27 16:20   ` Yunlian Jiang
2015-04-30 14:15     ` Dave Gordon [this message]
2015-05-01 22:03       ` Yunlian Jiang
2015-04-27 18:48 ` Dave Gordon
2015-04-27 19:53   ` Yunlian Jiang

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=55423906.2060808@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=benjamin.widawsky@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.wood@intel.com \
    --cc=yunlian@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.