On 8/30/24 4:05 AM, Hongbo Li wrote:
- num_act_qp = simple_strtoul(buf, NULL, 0); + if (kstrtoul(buf, 0, &num_act_qp)) { + pr_err("host:%ld: fail to parse user buffer into number.", + vha->host_no); + rc = -EINVAL; + goto out_free; + }
The message "fail to parse user buffer into number" is a bit long. "failed to parse" is probably sufficient. Additionally, has it been considered to assign the kstrtoul() return value to rc instead of discarding the returned value? Thanks, Bart.