nvgpu: Use kstrtobool instead of strtobool

The function strtobool() is implemented inline with
using kstrtobool(). The function strtobool() is removed
from mainline Linux 6.7 with below change.

**
commit 9bf2850c9170b52a6ab052085feced55effa78ef
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

        kstrtox: remove strtobool()
**

Use the kstrtobool() now.

Bug 4346767

Change-Id: I2b22eb4668ae2b3e693b6b3177cc23270f14b557
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3019995
(cherry picked from commit 475e8e07cf5d22da5721e2ac21b767bfb94a2746)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3037015
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-11-21 16:59:47 +00:00
committed by mobile promotions
parent 3fdada39ff
commit b702c927da
4 changed files with 9 additions and 9 deletions

View File

@@ -344,7 +344,7 @@ static ssize_t force_preemption_gfxp_write(struct file *file,
return -EFAULT;
}
if (strtobool(buf, &val) == 0) {
if (kstrtobool(buf, &val) == 0) {
g->gr->gr_ctx_desc->force_preemption_gfxp = val;
}
@@ -396,7 +396,7 @@ static ssize_t force_preemption_cilp_write(struct file *file,
return -EFAULT;
}
if (strtobool(buf, &val) == 0) {
if (kstrtobool(buf, &val) == 0) {
g->gr->gr_ctx_desc->force_preemption_cilp = val;
}
@@ -448,7 +448,7 @@ static ssize_t dump_ctxsw_stats_on_channel_close_write(struct file *file,
return -EFAULT;
}
if (strtobool(buf, &val) == 0) {
if (kstrtobool(buf, &val) == 0) {
g->gr->gr_ctx_desc->dump_ctxsw_stats_on_channel_close = val;
}