drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix compile warning in amdgpu_fru_read_eeprom
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
--- 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +1 -1
@@ -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;
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +2 -0
@@ -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__
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 29.06.20 um 14:13 schrieb Kent Russell:
Quoted 2 lines
This fixes the missing-prototypes warning for the
amdgpu_fru_read_eepromfunction. 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.
Quoted 27 lines
Signed-off-by Kent Russell <[email protected]>Reported-by kernel test robot <[email protected]>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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +1
-1@@ -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;drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h line 31
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +2
-0@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/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
Quoted 52 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, June 29, 2020 8:17 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromAm 29.06.20 um 14:13 schrieb Kent Russell:
Quoted 3 lines
This fixes the missing-prototypes warning for the
amdgpu_fru_read_eepromfunction. Since we declare it in the header, we can make it un-staticWell 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.
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c static bool is_fru_eeprom_supported(struct
Quoted 15 lines
Signed-off-by Kent Russell <[email protected]>Reported-by kernel test robot <[email protected]>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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-0@@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
amdgpu_device*adev)Quoted 19 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +2
-1return 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;drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +0
-0@@ -24,6 +24,8 @@#ifndef __AMDGPU_FRU_EEPROM_H__#define __AMDGPU_FRU_EEPROM_H__
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h line 27
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0+int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_taddrptr,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0+ unsigned char *buff);int amdgpu_fru_get_product_info (struct amdgpu_device *adev);#endif // __AMDGPU_PRODINFO_H__
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
maintainerOk, 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:
Quoted 62 lines
[AMD Public Use]
It's used repeatedly in the
amdgpu_fru_get_product_infofunction, but only in that function which is in theamdgpu_fru_eeprom.cfile. While it could be theoretically be used elsewhere, it isn't currently and any other usage would be best contained in theamdgpu_fru_eeprom.cfile.Kent
Quoted 56 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, June 29, 2020 8:17 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromAm 29.06.20 um 14:13 schrieb Kent Russell:
Quoted 3 lines
This fixes the missing-prototypes warning for the
amdgpu_fru_read_eepromfunction. Since we declare it in the header, we can make it un-staticWell 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.
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c static bool is_fru_eeprom_supported(struct
Quoted 14 lines
Signed-off-by Kent Russell <[email protected]>Reported-by kernel test robot <[email protected]>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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-0@@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
amdgpu_device*adev)Quoted 16 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +2
-1return 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;drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h line 27
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0@@ -24,6 +24,8 @@#ifndef __AMDGPU_FRU_EEPROM_H__#define __AMDGPU_FRU_EEPROM_H__ +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_taddrptr,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0+ unsigned char *buff);int amdgpu_fru_get_product_info (struct amdgpu_device *adev);#endif // __AMDGPU_PRODINFO_H__
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/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
Quoted 14 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Monday, June 29, 2020 8:29 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromOk, 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.
Quoted 67 lines
Am 29.06.20 um 14:20 schrieb Russell, Kent:
Quoted 3 lines
[AMD Public Use]
It's used repeatedly in the
amdgpu_fru_get_product_infofunction, but onlyin that function which is in the
amdgpu_fru_eeprom.cfile. While it could be theoretically be used elsewhere, it isn't currently and any other usage would be best contained in theamdgpu_fru_eeprom.cfile.Quoted 60 lines
Kent
Quoted 57 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, June 29, 2020 8:17 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromAm 29.06.20 um 14:13 schrieb Kent Russell:
Quoted 3 lines
This fixes the missing-prototypes warning for the
amdgpu_fru_read_eepromfunction. Since we declare it in the header, we can make it un-staticWell 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.
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c static bool is_fru_eeprom_supported(struct
Quoted 14 lines
Signed-off-by Kent Russell <[email protected]>Reported-by kernel test robot <[email protected]>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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-0@@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
amdgpu_device*adev)Quoted 16 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +2
-1return 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;drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h line 27
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0@@ -24,6 +24,8 @@#ifndef __AMDGPU_FRU_EEPROM_H__#define __AMDGPU_FRU_EEPROM_H__ +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_taddrptr,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0+ unsigned char *buff);int amdgpu_fru_get_product_info (struct amdgpu_device *adev);#endif // __AMDGPU_PRODINFO_H__
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
maintainerNo, 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:
Quoted 86 lines
[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
Quoted 80 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Monday, June 29, 2020 8:29 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromOk, 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:
Quoted 3 lines
[AMD Public Use]
It's used repeatedly in the
amdgpu_fru_get_product_infofunction, but onlyin that function which is in the
amdgpu_fru_eeprom.cfile. While it could be theoretically be used elsewhere, it isn't currently and any other usage would be best contained in theamdgpu_fru_eeprom.cfile.Quoted 59 lines
Kent
Quoted 57 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, June 29, 2020 8:17 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromAm 29.06.20 um 14:13 schrieb Kent Russell:
Quoted 3 lines
This fixes the missing-prototypes warning for the
amdgpu_fru_read_eepromfunction. Since we declare it in the header, we can make it un-staticWell 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.
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c static bool is_fru_eeprom_supported(struct
Quoted 14 lines
Signed-off-by Kent Russell <[email protected]>Reported-by kernel test robot <[email protected]>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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-0@@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
amdgpu_device*adev)Quoted 16 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +2
-1return 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;drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h line 27
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0@@ -24,6 +24,8 @@#ifndef __AMDGPU_FRU_EEPROM_H__#define __AMDGPU_FRU_EEPROM_H__ +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_taddrptr,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0+ unsigned char *buff);int amdgpu_fru_get_product_info (struct amdgpu_device *adev);#endif // __AMDGPU_PRODINFO_H__
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/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
Quoted 16 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Monday, June 29, 2020 8:41 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromNo, 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:
Quoted 2 lines
[AMD Public Use]
Quoted 92 lines
Quoted 1 line
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.
Quoted 85 lines
Kent
Quoted 82 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Monday, June 29, 2020 8:29 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromOk, 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:
Quoted 4 lines
[AMD Public Use]
It's used repeatedly in the
amdgpu_fru_get_product_infofunction, but onlyin that function which is in the
amdgpu_fru_eeprom.cfile. While it could be theoretically be used elsewhere, it isn't currently and any other usage would be best contained in theamdgpu_fru_eeprom.cfile.Quoted 59 lines
Kent
Quoted 57 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Monday, June 29, 2020 8:17 AM
To: Russell, Kent <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: Fix compile warning inamdgpu_fru_read_eepromAm 29.06.20 um 14:13 schrieb Kent Russell:
Quoted 3 lines
This fixes the missing-prototypes warning for the
amdgpu_fru_read_eepromfunction. Since we declare it in the header, we can make it un-staticWell 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.
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c static bool is_fru_eeprom_supported(struct
Quoted 14 lines
Signed-off-by Kent Russell <[email protected]>Reported-by kernel test robot <[email protected]>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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-0@@ -48,7 +48,7 @@ static bool is_fru_eeprom_supported(struct
amdgpu_device*adev)Quoted 16 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +2
-1return 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;drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h line 27
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0@@ -24,6 +24,8 @@#ifndef __AMDGPU_FRU_EEPROM_H__#define __AMDGPU_FRU_EEPROM_H__ +int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_taddrptr,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h +1
-0+ unsigned char *buff);int amdgpu_fru_get_product_info (struct amdgpu_device *adev);#endif // __AMDGPU_PRODINFO_H__
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx