From: Herbert Xu <herbert@gondor.apana.org.au> To: kernel test robot <lkp@intel.com> Cc: Kai Ye <yekai13@huawei.com>, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Linux Crypto Mailing List <linux-crypto@vger.kernel.org> Subject: crypto: hisilicon - Fix sscanf format signedness Date: Fri, 27 Aug 2021 16:43:10 +0800 [thread overview] Message-ID: <20210827084310.GA21801@gondor.apana.org.au> (raw) In-Reply-To: <202108220901.8r4gf0hB-lkp@intel.com> On Sun, Aug 22, 2021 at 09:18:20AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 9ff50bf2f2ff5fab01cac26d8eed21a89308e6ef > commit: 3bbf0783636be8fd672907df25904288f14566f2 crypto: hisilicon/qm - supports to inquiry each function's QoS > date: 9 weeks ago > compiler: ia64-linux-gcc (GCC) 11.2.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@intel.com> ---8<--- The function qm_qos_value_init expects an unsigned integer but is incorrectly supplying a signed format to sscanf. This patch fixes it. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 55be00374468..2e9bbec7d1f5 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -4191,7 +4191,7 @@ static ssize_t qm_qos_value_init(const char *buf, unsigned long *val) return -EINVAL; } - ret = sscanf(buf, "%ld", val); + ret = sscanf(buf, "%lu", val); if (ret != QM_QOS_VAL_NUM) return -EINVAL; -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
WARNING: multiple messages have this Message-ID (diff)
From: Herbert Xu <herbert@gondor.apana.org.au> To: kbuild-all@lists.01.org Subject: crypto: hisilicon - Fix sscanf format signedness Date: Fri, 27 Aug 2021 16:43:10 +0800 [thread overview] Message-ID: <20210827084310.GA21801@gondor.apana.org.au> (raw) In-Reply-To: <202108220901.8r4gf0hB-lkp@intel.com> [-- Attachment #1: Type: text/plain, Size: 1356 bytes --] On Sun, Aug 22, 2021 at 09:18:20AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 9ff50bf2f2ff5fab01cac26d8eed21a89308e6ef > commit: 3bbf0783636be8fd672907df25904288f14566f2 crypto: hisilicon/qm - supports to inquiry each function's QoS > date: 9 weeks ago > compiler: ia64-linux-gcc (GCC) 11.2.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@intel.com> ---8<--- The function qm_qos_value_init expects an unsigned integer but is incorrectly supplying a signed format to sscanf. This patch fixes it. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 55be00374468..2e9bbec7d1f5 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -4191,7 +4191,7 @@ static ssize_t qm_qos_value_init(const char *buf, unsigned long *val) return -EINVAL; } - ret = sscanf(buf, "%ld", val); + ret = sscanf(buf, "%lu", val); if (ret != QM_QOS_VAL_NUM) return -EINVAL; -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2021-08-27 8:43 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-22 1:18 drivers/crypto/hisilicon/qm.c:4077:8: warning: %ld in format string (no. 1) requires 'long *' but the argument type is 'unsigned long *'. [invalidScanfArgType_int] kernel test robot 2021-08-22 1:18 ` kernel test robot 2021-08-27 8:43 ` Herbert Xu [this message] 2021-08-27 8:43 ` crypto: hisilicon - Fix sscanf format signedness Herbert Xu 2021-08-27 19:33 ` Joe Perches 2021-08-27 19:33 ` Joe Perches
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=20210827084310.GA21801@gondor.apana.org.au \ --to=herbert@gondor.apana.org.au \ --cc=kbuild-all@lists.01.org \ --cc=linux-crypto@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lkp@intel.com \ --cc=yekai13@huawei.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.