From: Bart Van Assche <bvanassche@acm.org>
To: "Bao D. Nguyen" <quic_nguyenb@quicinc.com>,
quic_cang@quicinc.com, quic_nitirawa@quicinc.com,
avri.altman@wdc.com, peter.wang@mediatek.com,
manivannan.sadhasivam@linaro.org, minwoo.im@samsung.com,
adrian.hunter@intel.com, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, Alim Akhtar <alim.akhtar@samsung.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Bean Huo <beanhuo@micron.com>,
Maramaina Naresh <quic_mnaresh@quicinc.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] scsi: ufs: core: Support Updating UIC Command Timeout
Date: Tue, 9 Jul 2024 11:10:24 -0700 [thread overview]
Message-ID: <a89910ad-da5b-42c2-8a0f-9f4908fa2c1a@acm.org> (raw)
In-Reply-To: <6513429b6d3b10829263bf33ace5c5128f106e59.1720503791.git.quic_nguyenb@quicinc.com>
On 7/8/24 11:06 PM, Bao D. Nguyen wrote:
> +static int uic_cmd_timeout_set(const char *val, const struct kernel_param *kp)
> +{
> + unsigned int n;
> + int ret;
> +
> + ret = kstrtou32(val, 0, &n);
> + if (ret != 0 || n < UIC_CMD_TIMEOUT_DEFAULT || n > UIC_CMD_TIMEOUT_MAX)
> + return -EINVAL;
> +
> + return param_set_int(val, kp);
> +}
The above code converts 'val' twice to an integer: a first time by
calling kstrtou32() and a second time by calling param_set_int().
Please remove one of the two string-to-integer conversions, e.g. by
changing "param_set_int(val, kp)" into "uic_cmd_timeout = n" or
*(unsigned int *)kp->arg = n".
Thanks,
Bart.
next prev parent reply other threads:[~2024-07-09 18:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1720503791.git.quic_nguyenb@quicinc.com>
2024-07-09 6:06 ` Bao D. Nguyen
2024-07-09 18:10 ` Bart Van Assche [this message]
2024-07-11 5:46 ` Bao D. Nguyen
2024-07-12 1:20 ` Bao D. Nguyen
2024-07-12 17:51 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a89910ad-da5b-42c2-8a0f-9f4908fa2c1a@acm.org \
--to=bvanassche@acm.org \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=minwoo.im@samsung.com \
--cc=peter.wang@mediatek.com \
--cc=quic_cang@quicinc.com \
--cc=quic_mnaresh@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=quic_nitirawa@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®