mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: Fix debugfs_create_bool usage for Linux v5.14
Upstream Linux commit 393b06383fb7 ("debugfs: remove return value of
debugfs_create_bool()") updated the function debugfs_create_bool() to
remove the return value because it was not needed and user do not need
to check the return value. This breaks building the NVGPU driver against
the current upstream Linux kernel and the following error messages are
seen ...
nvgpu/drivers/gpu/nvgpu/os/linux/debug.c: In function ‘gk20a_debug_init’:
nvgpu/drivers/gpu/nvgpu/os/linux/debug.c:469:25: error: void value not ignored as it ought to be
l->debugfs_ltc_enabled =
^
nvgpu/drivers/gpu/nvgpu/os/linux/debug.c:507:32: error: void value not ignored as it ought to be
l->debugfs_runlist_interleave =
^
Fix this by not saving the value returned from debugfs_create_bool() and
remove the variables debugfs_ltc_enabled and debugfs_runlist_interleave
from the nvgpu_os_linux structure. Note that these variables are not
used anywhere in the driver and currently we don't check the return
value from debugfs_create_bool() and so there is no impact from this
change for older kernel versions.
JIRA LS-114
Change-Id: I539388c8645f2026292d8b9f33f55921dfda648f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2555299
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
4856e709f8
commit
e0ffd1a217
@@ -466,10 +466,8 @@ void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink)
|
||||
debugfs_create_u32("log_trace", S_IRUGO|S_IWUSR,
|
||||
l->debugfs, &g->log_trace);
|
||||
|
||||
l->debugfs_ltc_enabled =
|
||||
debugfs_create_bool("ltc_enabled", S_IRUGO|S_IWUSR,
|
||||
l->debugfs,
|
||||
&g->mm.ltc_enabled_target);
|
||||
debugfs_create_bool("ltc_enabled", S_IRUGO|S_IWUSR, l->debugfs,
|
||||
&g->mm.ltc_enabled_target);
|
||||
|
||||
debugfs_create_u32("poll_timeout_default_ms", S_IRUGO|S_IWUSR,
|
||||
l->debugfs, &g->poll_timeout_default);
|
||||
@@ -504,11 +502,8 @@ void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink)
|
||||
l->debugfs, g,
|
||||
&dbg_tsg_timeslice_max_fops);
|
||||
|
||||
l->debugfs_runlist_interleave =
|
||||
debugfs_create_bool("runlist_interleave",
|
||||
S_IRUGO|S_IWUSR,
|
||||
l->debugfs,
|
||||
&g->runlist_interleave);
|
||||
debugfs_create_bool("runlist_interleave", S_IRUGO|S_IWUSR, l->debugfs,
|
||||
&g->runlist_interleave);
|
||||
|
||||
gr_gk20a_debugfs_init(g);
|
||||
gk20a_pmu_debugfs_init(g);
|
||||
|
||||
@@ -110,13 +110,11 @@ struct nvgpu_os_linux {
|
||||
struct dentry *debugfs;
|
||||
struct dentry *debugfs_alias;
|
||||
|
||||
struct dentry *debugfs_ltc_enabled;
|
||||
struct dentry *debugfs_timeouts_enabled;
|
||||
struct dentry *debugfs_disable_bigpage;
|
||||
struct dentry *debugfs_dbg_tsg_timeslice_max_us;
|
||||
struct dentry *debugfs_disable_syncpts;
|
||||
|
||||
struct dentry *debugfs_runlist_interleave;
|
||||
struct dentry *debugfs_allocators;
|
||||
struct dentry *debugfs_xve;
|
||||
struct dentry *debugfs_kmem;
|
||||
|
||||
Reference in New Issue
Block a user