diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/2758-drm-amdkfd-Add-curly-braces-around-idr_for_each_entr.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/2758-drm-amdkfd-Add-curly-braces-around-idr_for_each_entr.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/2758-drm-amdkfd-Add-curly-braces-around-idr_for_each_entr.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/2758-drm-amdkfd-Add-curly-braces-around-idr_for_each_entr.patch new file mode 100644 index 00000000..3ff72dde --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/2758-drm-amdkfd-Add-curly-braces-around-idr_for_each_entr.patch @@ -0,0 +1,62 @@ +From 749a8090b2ef7e943d53663baf378f285cd46d81 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com> +Date: Tue, 5 Mar 2019 12:15:37 +0100 +Subject: [PATCH 2758/2940] drm/amdkfd: Add curly braces around + idr_for_each_entry_continue loop +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The compiler pointed out that one if block unintentionally wasn't part +of the loop: + +In file included from ./include/linux/kernfs.h:14, + from ./include/linux/sysfs.h:16, + from ./include/linux/kobject.h:20, + from ./include/linux/device.h:16, + from ./include/linux/node.h:18, + from ./include/linux/memory.h:19, + from drivers/gpu/drm//amd/amdgpu/../amdkfd/kfd_events.c:30: +drivers/gpu/drm//amd/amdgpu/../amdkfd/kfd_events.c: In function ‘kfd_signal_reset_event’: +./include/linux/idr.h:212:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] + for ((entry) = idr_get_next((idr), &(id)); \ + ^~~ +drivers/gpu/drm//amd/amdgpu/../amdkfd/kfd_events.c:1038:3: note: in expansion of macro ‘idr_for_each_entry_continue’ + idr_for_each_entry_continue(&p->event_idr, ev, id) + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +drivers/gpu/drm//amd/amdgpu/../amdkfd/kfd_events.c:1043:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ + if (ev->type == KFD_EVENT_TYPE_MEMORY && + ^~ + +Fixes: "drm/amdkfd: add RAS ECC event support" +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> +Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> +--- + drivers/gpu/drm/amd/amdkfd/kfd_events.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c +index 1aa1e05131ee..8e2499c2ca01 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c +@@ -1036,7 +1036,7 @@ void kfd_signal_reset_event(struct kfd_dev *dev) + hash_for_each_rcu(kfd_processes_table, temp, p, kfd_processes) { + mutex_lock(&p->event_mutex); + id = KFD_FIRST_NONSIGNAL_EVENT_ID; +- idr_for_each_entry_continue(&p->event_idr, ev, id) ++ idr_for_each_entry_continue(&p->event_idr, ev, id) { + if (ev->type == KFD_EVENT_TYPE_HW_EXCEPTION) { + ev->hw_exception_data = hw_exception_data; + set_event(ev); +@@ -1046,6 +1046,7 @@ void kfd_signal_reset_event(struct kfd_dev *dev) + ev->memory_exception_data = memory_exception_data; + set_event(ev); + } ++ } + mutex_unlock(&p->event_mutex); + } + srcu_read_unlock(&kfd_processes_srcu, idx); +-- +2.17.1 + |