amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: "André Almeida" <andrealmeid@igalia.com>, "Roy Sun" <Roy.Sun@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: Fix the incomplete product number
Date: Wed, 20 Jul 2022 16:30:01 +0200	[thread overview]
Message-ID: <579fc4f4-679a-1e7d-d511-14102b9c1692@gmail.com> (raw)
In-Reply-To: <619fc381-04e0-bc1f-62ad-a1169a63febc@igalia.com>

Am 20.07.22 um 16:26 schrieb André Almeida:
> Às 05:26 de 20/07/22, Roy Sun escreveu:
>> The comments say that the product number is a 16-digit HEX string so the
>> buffer needs to be at least 17 characters to hold the NUL terminator.
>>
> Which comment?

In internal documentation of the eeprom layout I think.

>
>> Signed-off-by: Roy Sun <Roy.Sun@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> index 9f729a648005..187e3dae3965 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> @@ -1019,7 +1019,7 @@ struct amdgpu_device {
>>   	bool                            psp_sysfs_en;
>>   
>>   	/* Chip product information */
>> -	char				product_number[16];
>> +	char				product_number[20];
> If 17 is enough, why setting as 20?

That's the next multiple of 4 and so avoids alignment issues.


Christian.

>
>>   	char				product_name[AMDGPU_PRODUCT_NAME_LEN];
>>   	char				serial[20];
>>   


  reply	other threads:[~2022-07-20 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20  8:26 [PATCH] drm/amdgpu: Fix the incomplete product number Roy Sun
2022-07-20  8:28 ` Sun, Roy
2022-07-20 12:48 ` Christian König
2022-07-20 14:26 ` André Almeida
2022-07-20 14:30   ` Christian König [this message]
2022-07-20 17:23 ` André Almeida
  -- strict thread matches above, loose matches on Subject: below --
2022-07-22  4:56 Roy Sun
2022-07-25  7:29 ` Sun, Roy
2022-07-25 13:35   ` Alex Deucher
2022-07-25 19:38 ` André Almeida
2022-07-18 12:08 yehonsun
2022-07-18 12:35 ` Christian König

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=579fc4f4-679a-1e7d-d511-14102b9c1692@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=Roy.Sun@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrealmeid@igalia.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;
as well as URLs for NNTP newsgroup(s).