amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
@ 2020-06-29 12:13 Kent Russell
  2020-06-29 12:16 ` Christian König
  0 siblings, 1 reply; 7+ messages in thread
From: Kent Russell @ 2020-06-29 12:13 UTC (permalink / raw)
  To: amd-gfx; +Cc: Kent Russell

This fixes the missing-prototypes warning for the amdgpu_fru_read_eeprom
function. Since we declare it in the header, we can make it un-static

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Change-Id: I2b9419365cb8b38bcfb6582df53b96c83861d6cf
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
index e811fecc540f..68ed16e4d8be 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
@@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev)
 	return false;
 }
 
-static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
+int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
 			   unsigned char *buff)
 {
 	int ret, size;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
index f29a8611d69b..f4024f1d66c9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
@@ -24,6 +24,8 @@
 #ifndef __AMDGPU_FRU_EEPROM_H__
 #define __AMDGPU_FRU_EEPROM_H__
 
+int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
+                           unsigned char *buff);
 int amdgpu_fru_get_product_info(struct amdgpu_device *adev);
 
 #endif  // __AMDGPU_PRODINFO_H__
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
  2020-06-29 12:13 [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom Kent Russell
@ 2020-06-29 12:16 ` Christian König
  2020-06-29 12:20   ` Russell, Kent
  0 siblings, 1 reply; 7+ messages in thread
From: Christian König @ 2020-06-29 12:16 UTC (permalink / raw)
  To: Kent Russell, amd-gfx

Am 29.06.20 um 14:13 schrieb Kent Russell:
> This fixes the missing-prototypes warning for the amdgpu_fru_read_eeprom
> function. Since we declare it in the header, we can make it un-static

Well is it used in different files? Otherwise we might just have unused 
code in the module which can potentially raise a warning as well.

Christian.

>
> Signed-off-by: Kent Russell <kent.russell@amd.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Change-Id: I2b9419365cb8b38bcfb6582df53b96c83861d6cf
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h | 2 ++
>   2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> index e811fecc540f..68ed16e4d8be 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> @@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev)
>   	return false;
>   }
>   
> -static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
>   			   unsigned char *buff)
>   {
>   	int ret, size;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> index f29a8611d69b..f4024f1d66c9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> @@ -24,6 +24,8 @@
>   #ifndef __AMDGPU_FRU_EEPROM_H__
>   #define __AMDGPU_FRU_EEPROM_H__
>   
> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
> +                           unsigned char *buff);
>   int amdgpu_fru_get_product_info(struct amdgpu_device *adev);
>   
>   #endif  // __AMDGPU_PRODINFO_H__

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
  2020-06-29 12:16 ` Christian König
@ 2020-06-29 12:20   ` Russell, Kent
  2020-06-29 12:28     ` Christian König
  0 siblings, 1 reply; 7+ messages in thread
From: Russell, Kent @ 2020-06-29 12:20 UTC (permalink / raw)
  To: Koenig, Christian, amd-gfx

[AMD Public Use]

It's used repeatedly in the amdgpu_fru_get_product_info function, but only in that function which is in the amdgpu_fru_eeprom.c file. While it could be theoretically be used elsewhere, it isn't currently and any other usage would be best contained in the amdgpu_fru_eeprom.c file.

 Kent

> -----Original Message-----
> From: Christian König <ckoenig.leichtzumerken@gmail.com>
> Sent: Monday, June 29, 2020 8:17 AM
> To: Russell, Kent <Kent.Russell@amd.com>; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
> amdgpu_fru_read_eeprom
> 
> Am 29.06.20 um 14:13 schrieb Kent Russell:
> > This fixes the missing-prototypes warning for the
> > amdgpu_fru_read_eeprom function. Since we declare it in the header, we
> > can make it un-static
> 
> Well is it used in different files? Otherwise we might just have unused code in
> the module which can potentially raise a warning as well.
> 
> Christian.
> 
> >
> > Signed-off-by: Kent Russell <kent.russell@amd.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Change-Id: I2b9419365cb8b38bcfb6582df53b96c83861d6cf
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +-
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h | 2 ++
> >   2 files changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > index e811fecc540f..68ed16e4d8be 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > @@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
> amdgpu_device *adev)
> >   	return false;
> >   }
> >
> > -static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev,
> > uint32_t addrptr,
> > +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
> > +addrptr,
> >   			   unsigned char *buff)
> >   {
> >   	int ret, size;
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> > index f29a8611d69b..f4024f1d66c9 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> > @@ -24,6 +24,8 @@
> >   #ifndef __AMDGPU_FRU_EEPROM_H__
> >   #define __AMDGPU_FRU_EEPROM_H__
> >
> > +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
> addrptr,
> > +                           unsigned char *buff);
> >   int amdgpu_fru_get_product_info(struct amdgpu_device *adev);
> >
> >   #endif  // __AMDGPU_PRODINFO_H__
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
  2020-06-29 12:20   ` Russell, Kent
@ 2020-06-29 12:28     ` Christian König
  2020-06-29 12:35       ` Russell, Kent
  0 siblings, 1 reply; 7+ messages in thread
From: Christian König @ 2020-06-29 12:28 UTC (permalink / raw)
  To: Russell, Kent, amd-gfx

Ok, then why does it fix a warning if we make it non-static?

If the function used it compiled under some #ifdef then we should 
probably just compile this under #ifdef as well.

Christian.

Am 29.06.20 um 14:20 schrieb Russell, Kent:
> [AMD Public Use]
>
> It's used repeatedly in the amdgpu_fru_get_product_info function, but only in that function which is in the amdgpu_fru_eeprom.c file. While it could be theoretically be used elsewhere, it isn't currently and any other usage would be best contained in the amdgpu_fru_eeprom.c file.
>
>   Kent
>
>> -----Original Message-----
>> From: Christian König <ckoenig.leichtzumerken@gmail.com>
>> Sent: Monday, June 29, 2020 8:17 AM
>> To: Russell, Kent <Kent.Russell@amd.com>; amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
>> amdgpu_fru_read_eeprom
>>
>> Am 29.06.20 um 14:13 schrieb Kent Russell:
>>> This fixes the missing-prototypes warning for the
>>> amdgpu_fru_read_eeprom function. Since we declare it in the header, we
>>> can make it un-static
>> Well is it used in different files? Otherwise we might just have unused code in
>> the module which can potentially raise a warning as well.
>>
>> Christian.
>>
>>> Signed-off-by: Kent Russell <kent.russell@amd.com>
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Change-Id: I2b9419365cb8b38bcfb6582df53b96c83861d6cf
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +-
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h | 2 ++
>>>    2 files changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
>>> index e811fecc540f..68ed16e4d8be 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
>>> @@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
>> amdgpu_device *adev)
>>>    	return false;
>>>    }
>>>
>>> -static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev,
>>> uint32_t addrptr,
>>> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
>>> +addrptr,
>>>    			   unsigned char *buff)
>>>    {
>>>    	int ret, size;
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
>>> index f29a8611d69b..f4024f1d66c9 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
>>> @@ -24,6 +24,8 @@
>>>    #ifndef __AMDGPU_FRU_EEPROM_H__
>>>    #define __AMDGPU_FRU_EEPROM_H__
>>>
>>> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
>> addrptr,
>>> +                           unsigned char *buff);
>>>    int amdgpu_fru_get_product_info(struct amdgpu_device *adev);
>>>
>>>    #endif  // __AMDGPU_PRODINFO_H__

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
  2020-06-29 12:28     ` Christian König
@ 2020-06-29 12:35       ` Russell, Kent
  2020-06-29 12:41         ` Christian König
  0 siblings, 1 reply; 7+ messages in thread
From: Russell, Kent @ 2020-06-29 12:35 UTC (permalink / raw)
  To: Koenig, Christian, amd-gfx

[AMD Public Use]

Thanks for making me look at it critically (something I should do more after returning from 2 weeks vacation). Nirmoy fixed the issue by using a static define in his " drm/amdgpu: label internally used symbols as static" patch and I was just in autopilot trying to fix the Intel kbot error email that I received while away, not actually realizing that it was fixed and I was breaking and unbreaking it during rebasing. This thread can be ignored. Time for some coffee.

 Kent

> -----Original Message-----
> From: Koenig, Christian <Christian.Koenig@amd.com>
> Sent: Monday, June 29, 2020 8:29 AM
> To: Russell, Kent <Kent.Russell@amd.com>; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
> amdgpu_fru_read_eeprom
> 
> Ok, then why does it fix a warning if we make it non-static?
> 
> If the function used it compiled under some #ifdef then we should probably
> just compile this under #ifdef as well.
> 
> Christian.
> 
> Am 29.06.20 um 14:20 schrieb Russell, Kent:
> > [AMD Public Use]
> >
> > It's used repeatedly in the amdgpu_fru_get_product_info function, but only
> in that function which is in the amdgpu_fru_eeprom.c file. While it could be
> theoretically be used elsewhere, it isn't currently and any other usage would
> be best contained in the amdgpu_fru_eeprom.c file.
> >
> >   Kent
> >
> >> -----Original Message-----
> >> From: Christian König <ckoenig.leichtzumerken@gmail.com>
> >> Sent: Monday, June 29, 2020 8:17 AM
> >> To: Russell, Kent <Kent.Russell@amd.com>;
> >> amd-gfx@lists.freedesktop.org
> >> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
> >> amdgpu_fru_read_eeprom
> >>
> >> Am 29.06.20 um 14:13 schrieb Kent Russell:
> >>> This fixes the missing-prototypes warning for the
> >>> amdgpu_fru_read_eeprom function. Since we declare it in the header,
> >>> we can make it un-static
> >> Well is it used in different files? Otherwise we might just have
> >> unused code in the module which can potentially raise a warning as well.
> >>
> >> Christian.
> >>
> >>> Signed-off-by: Kent Russell <kent.russell@amd.com>
> >>> Reported-by: kernel test robot <lkp@intel.com>
> >>> Change-Id: I2b9419365cb8b38bcfb6582df53b96c83861d6cf
> >>> ---
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +-
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h | 2 ++
> >>>    2 files changed, 3 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> >>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> >>> index e811fecc540f..68ed16e4d8be 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> >>> @@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
> >> amdgpu_device *adev)
> >>>    	return false;
> >>>    }
> >>>
> >>> -static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev,
> >>> uint32_t addrptr,
> >>> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
> >>> +addrptr,
> >>>    			   unsigned char *buff)
> >>>    {
> >>>    	int ret, size;
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> >>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> >>> index f29a8611d69b..f4024f1d66c9 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> >>> @@ -24,6 +24,8 @@
> >>>    #ifndef __AMDGPU_FRU_EEPROM_H__
> >>>    #define __AMDGPU_FRU_EEPROM_H__
> >>>
> >>> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
> >> addrptr,
> >>> +                           unsigned char *buff);
> >>>    int amdgpu_fru_get_product_info(struct amdgpu_device *adev);
> >>>
> >>>    #endif  // __AMDGPU_PRODINFO_H__
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
  2020-06-29 12:35       ` Russell, Kent
@ 2020-06-29 12:41         ` Christian König
  2020-06-29 12:45           ` Russell, Kent
  0 siblings, 1 reply; 7+ messages in thread
From: Christian König @ 2020-06-29 12:41 UTC (permalink / raw)
  To: Russell, Kent, amd-gfx

No, problem. I don't know this code but the patch looked kind of fishy :)

And yes that happens to all of us, that's why we do this review.

Christian.

Am 29.06.20 um 14:35 schrieb Russell, Kent:
> [AMD Public Use]
>
> Thanks for making me look at it critically (something I should do more after returning from 2 weeks vacation). Nirmoy fixed the issue by using a static define in his " drm/amdgpu: label internally used symbols as static" patch and I was just in autopilot trying to fix the Intel kbot error email that I received while away, not actually realizing that it was fixed and I was breaking and unbreaking it during rebasing. This thread can be ignored. Time for some coffee.
>
>   Kent
>
>> -----Original Message-----
>> From: Koenig, Christian <Christian.Koenig@amd.com>
>> Sent: Monday, June 29, 2020 8:29 AM
>> To: Russell, Kent <Kent.Russell@amd.com>; amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
>> amdgpu_fru_read_eeprom
>>
>> Ok, then why does it fix a warning if we make it non-static?
>>
>> If the function used it compiled under some #ifdef then we should probably
>> just compile this under #ifdef as well.
>>
>> Christian.
>>
>> Am 29.06.20 um 14:20 schrieb Russell, Kent:
>>> [AMD Public Use]
>>>
>>> It's used repeatedly in the amdgpu_fru_get_product_info function, but only
>> in that function which is in the amdgpu_fru_eeprom.c file. While it could be
>> theoretically be used elsewhere, it isn't currently and any other usage would
>> be best contained in the amdgpu_fru_eeprom.c file.
>>>    Kent
>>>
>>>> -----Original Message-----
>>>> From: Christian König <ckoenig.leichtzumerken@gmail.com>
>>>> Sent: Monday, June 29, 2020 8:17 AM
>>>> To: Russell, Kent <Kent.Russell@amd.com>;
>>>> amd-gfx@lists.freedesktop.org
>>>> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
>>>> amdgpu_fru_read_eeprom
>>>>
>>>> Am 29.06.20 um 14:13 schrieb Kent Russell:
>>>>> This fixes the missing-prototypes warning for the
>>>>> amdgpu_fru_read_eeprom function. Since we declare it in the header,
>>>>> we can make it un-static
>>>> Well is it used in different files? Otherwise we might just have
>>>> unused code in the module which can potentially raise a warning as well.
>>>>
>>>> Christian.
>>>>
>>>>> Signed-off-by: Kent Russell <kent.russell@amd.com>
>>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>> Change-Id: I2b9419365cb8b38bcfb6582df53b96c83861d6cf
>>>>> ---
>>>>>     drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +-
>>>>>     drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h | 2 ++
>>>>>     2 files changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
>>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
>>>>> index e811fecc540f..68ed16e4d8be 100644
>>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
>>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
>>>>> @@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
>>>> amdgpu_device *adev)
>>>>>     	return false;
>>>>>     }
>>>>>
>>>>> -static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev,
>>>>> uint32_t addrptr,
>>>>> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
>>>>> +addrptr,
>>>>>     			   unsigned char *buff)
>>>>>     {
>>>>>     	int ret, size;
>>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
>>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
>>>>> index f29a8611d69b..f4024f1d66c9 100644
>>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
>>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
>>>>> @@ -24,6 +24,8 @@
>>>>>     #ifndef __AMDGPU_FRU_EEPROM_H__
>>>>>     #define __AMDGPU_FRU_EEPROM_H__
>>>>>
>>>>> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
>>>> addrptr,
>>>>> +                           unsigned char *buff);
>>>>>     int amdgpu_fru_get_product_info(struct amdgpu_device *adev);
>>>>>
>>>>>     #endif  // __AMDGPU_PRODINFO_H__

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
  2020-06-29 12:41         ` Christian König
@ 2020-06-29 12:45           ` Russell, Kent
  0 siblings, 0 replies; 7+ messages in thread
From: Russell, Kent @ 2020-06-29 12:45 UTC (permalink / raw)
  To: Koenig, Christian, amd-gfx

[AMD Public Use]

And I appreciate it. There's always someone who will look at a patch critically instead of just saying "eh, it's his code, he probably knows what he's doing" and doing an automatic RB. Now for the caffeine to kick in 😊

 Kent

> -----Original Message-----
> From: Koenig, Christian <Christian.Koenig@amd.com>
> Sent: Monday, June 29, 2020 8:41 AM
> To: Russell, Kent <Kent.Russell@amd.com>; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
> amdgpu_fru_read_eeprom
> 
> No, problem. I don't know this code but the patch looked kind of fishy :)
> 
> And yes that happens to all of us, that's why we do this review.
> 
> Christian.
> 
> Am 29.06.20 um 14:35 schrieb Russell, Kent:
> > [AMD Public Use]
> >
> > Thanks for making me look at it critically (something I should do more after
> returning from 2 weeks vacation). Nirmoy fixed the issue by using a static
> define in his " drm/amdgpu: label internally used symbols as static" patch and
> I was just in autopilot trying to fix the Intel kbot error email that I received
> while away, not actually realizing that it was fixed and I was breaking and
> unbreaking it during rebasing. This thread can be ignored. Time for some
> coffee.
> >
> >   Kent
> >
> >> -----Original Message-----
> >> From: Koenig, Christian <Christian.Koenig@amd.com>
> >> Sent: Monday, June 29, 2020 8:29 AM
> >> To: Russell, Kent <Kent.Russell@amd.com>;
> >> amd-gfx@lists.freedesktop.org
> >> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
> >> amdgpu_fru_read_eeprom
> >>
> >> Ok, then why does it fix a warning if we make it non-static?
> >>
> >> If the function used it compiled under some #ifdef then we should
> >> probably just compile this under #ifdef as well.
> >>
> >> Christian.
> >>
> >> Am 29.06.20 um 14:20 schrieb Russell, Kent:
> >>> [AMD Public Use]
> >>>
> >>> It's used repeatedly in the amdgpu_fru_get_product_info function,
> >>> but only
> >> in that function which is in the amdgpu_fru_eeprom.c file. While it
> >> could be theoretically be used elsewhere, it isn't currently and any
> >> other usage would be best contained in the amdgpu_fru_eeprom.c file.
> >>>    Kent
> >>>
> >>>> -----Original Message-----
> >>>> From: Christian König <ckoenig.leichtzumerken@gmail.com>
> >>>> Sent: Monday, June 29, 2020 8:17 AM
> >>>> To: Russell, Kent <Kent.Russell@amd.com>;
> >>>> amd-gfx@lists.freedesktop.org
> >>>> Subject: Re: [PATCH] drm/amdgpu: Fix compile warning in
> >>>> amdgpu_fru_read_eeprom
> >>>>
> >>>> Am 29.06.20 um 14:13 schrieb Kent Russell:
> >>>>> This fixes the missing-prototypes warning for the
> >>>>> amdgpu_fru_read_eeprom function. Since we declare it in the
> >>>>> header, we can make it un-static
> >>>> Well is it used in different files? Otherwise we might just have
> >>>> unused code in the module which can potentially raise a warning as well.
> >>>>
> >>>> Christian.
> >>>>
> >>>>> Signed-off-by: Kent Russell <kent.russell@amd.com>
> >>>>> Reported-by: kernel test robot <lkp@intel.com>
> >>>>> Change-Id: I2b9419365cb8b38bcfb6582df53b96c83861d6cf
> >>>>> ---
> >>>>>     drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +-
> >>>>>     drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h | 2 ++
> >>>>>     2 files changed, 3 insertions(+), 1 deletion(-)
> >>>>>
> >>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> >>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> >>>>> index e811fecc540f..68ed16e4d8be 100644
> >>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> >>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> >>>>> @@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
> >>>> amdgpu_device *adev)
> >>>>>     	return false;
> >>>>>     }
> >>>>>
> >>>>> -static int amdgpu_fru_read_eeprom(struct amdgpu_device *adev,
> >>>>> uint32_t addrptr,
> >>>>> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
> >>>>> +addrptr,
> >>>>>     			   unsigned char *buff)
> >>>>>     {
> >>>>>     	int ret, size;
> >>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> >>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> >>>>> index f29a8611d69b..f4024f1d66c9 100644
> >>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> >>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h
> >>>>> @@ -24,6 +24,8 @@
> >>>>>     #ifndef __AMDGPU_FRU_EEPROM_H__
> >>>>>     #define __AMDGPU_FRU_EEPROM_H__
> >>>>>
> >>>>> +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
> >>>> addrptr,
> >>>>> +                           unsigned char *buff);
> >>>>>     int amdgpu_fru_get_product_info(struct amdgpu_device *adev);
> >>>>>
> >>>>>     #endif  // __AMDGPU_PRODINFO_H__
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-29 12:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 12:13 [PATCH] drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom Kent Russell
2020-06-29 12:16 ` Christian König
2020-06-29 12:20   ` Russell, Kent
2020-06-29 12:28     ` Christian König
2020-06-29 12:35       ` Russell, Kent
2020-06-29 12:41         ` Christian König
2020-06-29 12:45           ` Russell, Kent

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).