* [PATCH 0/2] drm/amd: Use ARRAY_SIZE
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
zhengbin (2):
drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/2] drm/amd: Use ARRAY_SIZE
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
zhengbin (2):
drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/2] drm/amd: Use ARRAY_SIZE
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
zhengbin (2):
drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
Fixes coccicheck warning:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:4946:28-29: WARNING: Use ARRAY_SIZE
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index f754fbd..c3f5866 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -4943,7 +4943,7 @@ static int smu7_get_power_profile_mode(struct pp_hwmgr *hwmgr, char *buf)
title[0], title[1], title[2], title[3],
title[4], title[5], title[6], title[7]);
- len = sizeof(smu7_profiling) / sizeof(struct profile_mode_setting);
+ len = ARRAY_SIZE(smu7_profiling);
for (i = 0; i < len; i++) {
if (i == hwmgr->power_profile_mode) {
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/2] drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
Fixes coccicheck warning:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:4946:28-29: WARNING: Use ARRAY_SIZE
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index f754fbd..c3f5866 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -4943,7 +4943,7 @@ static int smu7_get_power_profile_mode(struct pp_hwmgr *hwmgr, char *buf)
title[0], title[1], title[2], title[3],
title[4], title[5], title[6], title[7]);
- len = sizeof(smu7_profiling) / sizeof(struct profile_mode_setting);
+ len = ARRAY_SIZE(smu7_profiling);
for (i = 0; i < len; i++) {
if (i == hwmgr->power_profile_mode) {
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/2] drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
Fixes coccicheck warning:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:4946:28-29: WARNING: Use ARRAY_SIZE
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index f754fbd..c3f5866 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -4943,7 +4943,7 @@ static int smu7_get_power_profile_mode(struct pp_hwmgr *hwmgr, char *buf)
title[0], title[1], title[2], title[3],
title[4], title[5], title[6], title[7]);
- len = sizeof(smu7_profiling) / sizeof(struct profile_mode_setting);
+ len = ARRAY_SIZE(smu7_profiling);
for (i = 0; i < len; i++) {
if (i == hwmgr->power_profile_mode) {
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
Fixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c:182:40-41: WARNING: Use ARRAY_SIZE
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index b4d6427..735c43c 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
@@ -179,7 +179,7 @@ static bool psp_v3_1_match_version(struct amdgpu_device *adev, uint32_t ver)
* Double check if the latest four legacy versions.
* If yes, it is still the right version.
*/
- for (i = 0; i < sizeof(sos_old_versions) / sizeof(uint32_t); i++) {
+ for (i = 0; i < ARRAY_SIZE(sos_old_versions); i++) {
if (sos_old_versions[i] == adev->psp.sos_fw_version)
return true;
}
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
Fixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c:182:40-41: WARNING: Use ARRAY_SIZE
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index b4d6427..735c43c 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
@@ -179,7 +179,7 @@ static bool psp_v3_1_match_version(struct amdgpu_device *adev, uint32_t ver)
* Double check if the latest four legacy versions.
* If yes, it is still the right version.
*/
- for (i = 0; i < sizeof(sos_old_versions) / sizeof(uint32_t); i++) {
+ for (i = 0; i < ARRAY_SIZE(sos_old_versions); i++) {
if (sos_old_versions[i] == adev->psp.sos_fw_version)
return true;
}
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
@ 2019-11-22 3:42 ` zhengbin
0 siblings, 0 replies; 12+ messages in thread
From: zhengbin @ 2019-11-22 3:42 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, rex.zhu, evan.quan, amd-gfx, dri-devel
Cc: zhengbin13
Fixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c:182:40-41: WARNING: Use ARRAY_SIZE
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index b4d6427..735c43c 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
@@ -179,7 +179,7 @@ static bool psp_v3_1_match_version(struct amdgpu_device *adev, uint32_t ver)
* Double check if the latest four legacy versions.
* If yes, it is still the right version.
*/
- for (i = 0; i < sizeof(sos_old_versions) / sizeof(uint32_t); i++) {
+ for (i = 0; i < ARRAY_SIZE(sos_old_versions); i++) {
if (sos_old_versions[i] == adev->psp.sos_fw_version)
return true;
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] drm/amd: Use ARRAY_SIZE
@ 2019-11-22 18:24 ` Alex Deucher
0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2019-11-22 18:24 UTC (permalink / raw)
To: zhengbin
Cc: Chunming Zhou, Dave Airlie, amd-gfx list,
Maling list - DRI developers, Daniel Vetter, Deucher, Alexander,
Quan, Evan, Rex Zhu, Christian Koenig
Applied the series. Thanks!
Alex
On Fri, Nov 22, 2019 at 4:01 AM zhengbin <zhengbin13@huawei.com> wrote:
>
> zhengbin (2):
> drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
> drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
>
> drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] drm/amd: Use ARRAY_SIZE
@ 2019-11-22 18:24 ` Alex Deucher
0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2019-11-22 18:24 UTC (permalink / raw)
To: zhengbin
Cc: Dave Airlie, amd-gfx list, Maling list - DRI developers, Deucher,
Alexander, Quan, Evan, Rex Zhu, Christian Koenig
Applied the series. Thanks!
Alex
On Fri, Nov 22, 2019 at 4:01 AM zhengbin <zhengbin13@huawei.com> wrote:
>
> zhengbin (2):
> drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
> drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
>
> drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] drm/amd: Use ARRAY_SIZE
@ 2019-11-22 18:24 ` Alex Deucher
0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2019-11-22 18:24 UTC (permalink / raw)
To: zhengbin
Cc: Chunming Zhou, Dave Airlie, amd-gfx list,
Maling list - DRI developers, Daniel Vetter, Deucher, Alexander,
Quan, Evan, Rex Zhu, Christian Koenig
Applied the series. Thanks!
Alex
On Fri, Nov 22, 2019 at 4:01 AM zhengbin <zhengbin13@huawei.com> wrote:
>
> zhengbin (2):
> drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling
> drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
>
> drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 +-
> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-11-22 18:24 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 3:42 [PATCH 0/2] drm/amd: Use ARRAY_SIZE zhengbin
2019-11-22 3:42 ` zhengbin
2019-11-22 3:42 ` zhengbin
2019-11-22 3:42 ` [PATCH 1/2] drm/amd/powerplay: Use ARRAY_SIZE for smu7_profiling zhengbin
2019-11-22 3:42 ` zhengbin
2019-11-22 3:42 ` zhengbin
2019-11-22 3:42 ` [PATCH 2/2] drm/amdgpu: Use ARRAY_SIZE for sos_old_versions zhengbin
2019-11-22 3:42 ` zhengbin
2019-11-22 3:42 ` zhengbin
[not found] ` <1574394172-18216-1-git-send-email-zhengbin13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2019-11-22 18:24 ` [PATCH 0/2] drm/amd: Use ARRAY_SIZE Alex Deucher
2019-11-22 18:24 ` Alex Deucher
2019-11-22 18:24 ` Alex Deucher
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.