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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ static ssize_t gsp_start_test_write(struct file *file,
|
||||
if (copy_from_user(buf, user_buf, buf_size))
|
||||
return -EFAULT;
|
||||
|
||||
if (strtobool(buf, &bv) == 0) {
|
||||
if (kstrtobool(buf, &bv) == 0) {
|
||||
if (nvgpu_is_powered_on(g) && nvgpu_gsp_get_stress_test_load(g)) {
|
||||
err = gk20a_busy(g);
|
||||
if (err)
|
||||
@@ -258,7 +258,7 @@ static ssize_t gsp_load_test_write(struct file *file,
|
||||
if (copy_from_user(buf, user_buf, buf_size))
|
||||
return -EFAULT;
|
||||
|
||||
if (strtobool(buf, &bv) == 0) {
|
||||
if (kstrtobool(buf, &bv) == 0) {
|
||||
if (nvgpu_is_powered_on(g)) {
|
||||
err = gk20a_busy(g);
|
||||
if (err)
|
||||
|
||||
@@ -59,7 +59,7 @@ static ssize_t ltc_intr_illegal_compstat_write(struct file *file,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (strtobool(buf, &intr_illegal_compstat_enabled) == 0) {
|
||||
if (kstrtobool(buf, &intr_illegal_compstat_enabled) == 0) {
|
||||
g->ops.ltc.intr.en_illegal_compstat(g,
|
||||
intr_illegal_compstat_enabled);
|
||||
g->ltc_intr_en_illegal_compstat = intr_illegal_compstat_enabled;
|
||||
|
||||
Reference in New Issue
Block a user