Commit edfc7e76 authored by ye xingchen's avatar ye xingchen Committed by Herbert Xu

crypto: marvell/octeontx - use sysfs_emit() to instead of scnprintf()

Replace the open-code with sysfs_emit() to simplify the code.
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b006c439
......@@ -661,7 +661,7 @@ static ssize_t vf_type_show(struct device *dev,
msg = "Invalid";
}
return scnprintf(buf, PAGE_SIZE, "%s\n", msg);
return sysfs_emit(buf, "%s\n", msg);
}
static ssize_t vf_engine_group_show(struct device *dev,
......@@ -670,7 +670,7 @@ static ssize_t vf_engine_group_show(struct device *dev,
{
struct otx_cptvf *cptvf = dev_get_drvdata(dev);
return scnprintf(buf, PAGE_SIZE, "%d\n", cptvf->vfgrp);
return sysfs_emit(buf, "%d\n", cptvf->vfgrp);
}
static ssize_t vf_engine_group_store(struct device *dev,
......@@ -706,7 +706,7 @@ static ssize_t vf_coalesc_time_wait_show(struct device *dev,
{
struct otx_cptvf *cptvf = dev_get_drvdata(dev);
return scnprintf(buf, PAGE_SIZE, "%d\n",
return sysfs_emit(buf, "%d\n",
cptvf_read_vq_done_timewait(cptvf));
}
......@@ -716,7 +716,7 @@ static ssize_t vf_coalesc_num_wait_show(struct device *dev,
{
struct otx_cptvf *cptvf = dev_get_drvdata(dev);
return scnprintf(buf, PAGE_SIZE, "%d\n",
return sysfs_emit(buf, "%d\n",
cptvf_read_vq_done_numwait(cptvf));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment