mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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:
committed by
mobile promotions
parent
3fdada39ff
commit
b702c927da
@@ -211,7 +211,7 @@ static ssize_t disable_bigpage_write(struct file *file, const char __user *user_
|
||||
if (copy_from_user(buf, user_buf, buf_size))
|
||||
return -EFAULT;
|
||||
|
||||
if (strtobool(buf, &bv) == 0) {
|
||||
if (kstrtobool(buf, &bv) == 0) {
|
||||
g->mm.disable_bigpage = bv;
|
||||
err = nvgpu_init_gpu_characteristics(g);
|
||||
if (err != 0) {
|
||||
@@ -319,7 +319,7 @@ static ssize_t timeouts_enabled_write(struct file *file,
|
||||
if (copy_from_user(buf, user_buf, buf_size))
|
||||
return -EFAULT;
|
||||
|
||||
if (strtobool(buf, &timeouts_enabled) == 0) {
|
||||
if (kstrtobool(buf, &timeouts_enabled) == 0) {
|
||||
nvgpu_mutex_acquire(&g->dbg_sessions_lock);
|
||||
if (timeouts_enabled == false) {
|
||||
/* requesting to disable timeouts */
|
||||
@@ -419,7 +419,7 @@ static ssize_t disable_syncpts_write(struct file *file,
|
||||
if (!g->nvhost)
|
||||
return -ENOSYS;
|
||||
|
||||
if (strtobool(buf, &disable_syncpts) == 0)
|
||||
if (kstrtobool(buf, &disable_syncpts) == 0)
|
||||
nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, !disable_syncpts);
|
||||
|
||||
return count;
|
||||
|
||||
Reference in New Issue
Block a user