summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Draszik <draszik@google.com>2024-01-19 15:20:09 +0000
committerAndré Draszik <draszik@google.com>2024-01-19 15:42:23 +0000
commit2938264a6abf18c4e2526b89a3b79906f9887cf7 (patch)
treeb7520d0b633580799abdcdc730de1f65e10cfb61
parentd72a7170d79e4de58b842180084282ecd61baae7 (diff)
downloadgpu-android-gs-raviole-mainline.tar.gz
mali_kbase_debug_mem_view: get_file_rcu() update for v6.7 kernelandroid-gs-raviole-mainline
Linux commit [1] has updated get_file_rcu() and this causes this OOT pixel driver to fail compilation: .../gpu/mali_kbase/mali_kbase_debug_mem_view.c:237:19: error: incompatible pointer types passing 'struct file *' to parameter of type 'struct file btf_type_tag(rcu)**' (aka 'struct file **'); take the address with & [-Werror,-Wincompatible-pointer-types] if (get_file_rcu(kctx->filp) == 0) ^~~~~~~~~~ & .../common/include/linux/fs.h:1046:47: note: passing argument to parameter 'f' here struct file *get_file_rcu(struct file __rcu **f); ^ 1 error generated. Note that upstream has fixed this in a completely different way as part of a code-drop: dacf004cc8a4 mini release: update r44p1-01bet1 to r44p1-00dev2 127 files changed, 6818 insertions(+), 3156 deletions(-) which we received as part of pa/2579253 For now, just go with this simple version to make it compile and somewhat work (this here is only used for debugfs access). [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ede61d8589c ("file: convert to SLAB_TYPESAFE_BY_RCU") Test: find /sys/kernel/debug/mali* -name mem_view -exec sh -c 'echo "${1}" ; head "${1}"' _ {} \; Change-Id: I753629270ada2141fb7c863631a90d784b47cff9 Signed-off-by: André Draszik <draszik@google.com>
-rw-r--r--mali_kbase/mali_kbase_debug_mem_view.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mali_kbase/mali_kbase_debug_mem_view.c b/mali_kbase/mali_kbase_debug_mem_view.c
index ce87a00..42e203e 100644
--- a/mali_kbase/mali_kbase_debug_mem_view.c
+++ b/mali_kbase/mali_kbase_debug_mem_view.c
@@ -234,7 +234,7 @@ static int debug_mem_open(struct inode *i, struct file *file)
struct debug_mem_data *mem_data;
int ret;
- if (get_file_rcu(kctx->filp) == 0)
+ if (!get_file_rcu(&kctx->filp))
return -ENOENT;
/* Check if file was opened in write mode. GPU memory contents