All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chen, Guchun" <Guchun.Chen@amd.com>
To: "Grodzovsky, Andrey" <Andrey.Grodzovsky@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Zhang, Hawking" <Hawking.Zhang@amd.com>,
	"Li, Dennis" <Dennis.Li@amd.com>,
	"Yang, Stanley" <Stanley.Yang@amd.com>,
	"Zhou1, Tao" <Tao.Zhou1@amd.com>,
	"Clements, John" <John.Clements@amd.com>
Subject: RE: [PATCH 5/5] drm/amdgpu: calculate actual size instead of hardcode size
Date: Wed, 22 Jul 2020 14:29:17 +0000	[thread overview]
Message-ID: <CY4PR12MB128738650981C51241CB3895F1790@CY4PR12MB1287.namprd12.prod.outlook.com> (raw)
In-Reply-To: <c735b1ba-569a-0969-b9ea-d6f33c29ccc7@amd.com>

[AMD Public Use]

Hi Andrey,

Aha, thanks for your reminding, I ignore that comment. Let me update it later.

Regards,
Guchun

-----Original Message-----
From: Grodzovsky, Andrey <Andrey.Grodzovsky@amd.com> 
Sent: Wednesday, July 22, 2020 10:26 PM
To: Chen, Guchun <Guchun.Chen@amd.com>; amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Li, Dennis <Dennis.Li@amd.com>; Yang, Stanley <Stanley.Yang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Clements, John <John.Clements@amd.com>
Subject: Re: [PATCH 5/5] drm/amdgpu: calculate actual size instead of hardcode size


On 7/21/20 11:14 PM, Guchun Chen wrote:
> Use sizeof to get actual size.
>
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
> index 96b63c026bad..a5da108e43c3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
> @@ -34,11 +34,9 @@
>   /*
>    * The 2 macros bellow represent the actual size in bytes that
>    * those entities occupy in the EEPROM memory.
> - * EEPROM_TABLE_RECORD_SIZE is different than 
> sizeof(eeprom_table_record) which
> - * uses uint64 to store 6b fields such as retired_page.


Did you find out the comment above was wrong ?

Andrey


>    */
> -#define EEPROM_TABLE_HEADER_SIZE 20
> -#define EEPROM_TABLE_RECORD_SIZE 24
> +#define EEPROM_TABLE_HEADER_SIZE (sizeof(struct 
> +amdgpu_ras_eeprom_table_header)) #define EEPROM_TABLE_RECORD_SIZE 
> +(sizeof(struct eeprom_table_record))
>   
>   #define EEPROM_ADDRESS_SIZE 0x2
>   
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      reply	other threads:[~2020-07-22 14:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22  3:14 [PATCH 0/5] BAD GPU retirement policy by total bad pages Guchun Chen
2020-07-22  3:14 ` [PATCH 1/5] drm/amdgpu: add bad page count threshold in module parameter Guchun Chen
2020-07-23  0:31   ` Li, Dennis
2020-07-23  3:47     ` Chen, Guchun
2020-07-23 13:10       ` Christian König
2020-07-23 13:39         ` Alex Deucher
2020-07-22  3:14 ` [PATCH 2/5] drm/amdgpu: validate bad page threshold in ras Guchun Chen
2020-07-22  7:51   ` Yang, Stanley
2020-07-23  3:40     ` Chen, Guchun
2020-07-22  3:14 ` [PATCH 3/5] drm/amdgpu: conduct bad gpu check during bootup/reset Guchun Chen
2020-07-23  2:51   ` Zhou1, Tao
2020-07-23  3:38     ` Chen, Guchun
2020-07-23  4:03       ` Zhou1, Tao
2020-07-22  3:14 ` [PATCH 4/5] drm/amdgpu: restore ras flags when user resets eeprom Guchun Chen
2020-07-22  3:14 ` [PATCH 5/5] drm/amdgpu: calculate actual size instead of hardcode size Guchun Chen
2020-07-22 14:26   ` Andrey Grodzovsky
2020-07-22 14:29     ` Chen, Guchun [this message]

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=CY4PR12MB128738650981C51241CB3895F1790@CY4PR12MB1287.namprd12.prod.outlook.com \
    --to=guchun.chen@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Andrey.Grodzovsky@amd.com \
    --cc=Dennis.Li@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=John.Clements@amd.com \
    --cc=Stanley.Yang@amd.com \
    --cc=Tao.Zhou1@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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.