* drivers/crypto/hisilicon/qm.c:1704:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
@ 2022-08-25 16:08 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-25 16:08 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3632 bytes --]
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/crypto/hisilicon/qm.c:1704:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]"
::::::
BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kai Ye <yekai13@huawei.com>
CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: Longfang Liu <liulongfang@huawei.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c40e8341e3b3bb27e3a65b06b5b454626234c4f0
commit: f1724d397c60d296c0805c95a46ae7fc7163b70c crypto: hisilicon/qm - add register checking for ACC
date: 4 months ago
:::::: branch date: 2 days ago
:::::: commit date: 4 months ago
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout f1724d397c60d296c0805c95a46ae7fc7163b70c
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/crypto/hisilicon/qm.c:4563:8: warning: %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
ret = sscanf(tbuf_bdf, "%u:%x:%u.%u", &tmp1, &bus, &device, &function);
^
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/crypto/hisilicon/qm.c:1704:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
dregs = NULL;
^
>> drivers/crypto/hisilicon/qm.c:4553:8: warning: sscanf() without field width limits can crash with huge input data. [invalidscanf]
ret = sscanf(buf, "%s %s", tbuf_bdf, val_buf);
^
>> drivers/crypto/hisilicon/qm.c:3493:46: warning: Parameter 'pdev' can be declared with const [constParameter]
static int qm_try_frozen_vfs(struct pci_dev *pdev,
^
>> drivers/crypto/hisilicon/qm.c:4229:29: warning: Uninitialized variable: tmp->distance [uninitvar]
if (res->distance < tmp->distance) {
^
drivers/crypto/hisilicon/qm.c:4222:7: note: Assuming condition is false
if (!res)
^
drivers/crypto/hisilicon/qm.c:4229:29: note: Uninitialized variable: tmp->distance
if (res->distance < tmp->distance) {
^
vim +1704 drivers/crypto/hisilicon/qm.c
f1724d397c60d2 Kai Ye 2022-04-09 1692
f1724d397c60d2 Kai Ye 2022-04-09 1693 static void dfx_regs_uninit(struct hisi_qm *qm,
f1724d397c60d2 Kai Ye 2022-04-09 1694 struct dfx_diff_registers *dregs, int reg_len)
f1724d397c60d2 Kai Ye 2022-04-09 1695 {
f1724d397c60d2 Kai Ye 2022-04-09 1696 int i;
f1724d397c60d2 Kai Ye 2022-04-09 1697
f1724d397c60d2 Kai Ye 2022-04-09 1698 /* Setting the pointer is NULL to prevent double free */
f1724d397c60d2 Kai Ye 2022-04-09 1699 for (i = 0; i < reg_len; i++) {
f1724d397c60d2 Kai Ye 2022-04-09 1700 kfree(dregs[i].regs);
f1724d397c60d2 Kai Ye 2022-04-09 1701 dregs[i].regs = NULL;
f1724d397c60d2 Kai Ye 2022-04-09 1702 }
f1724d397c60d2 Kai Ye 2022-04-09 1703 kfree(dregs);
f1724d397c60d2 Kai Ye 2022-04-09 @1704 dregs = NULL;
f1724d397c60d2 Kai Ye 2022-04-09 1705 }
f1724d397c60d2 Kai Ye 2022-04-09 1706
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-25 16:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 16:08 drivers/crypto/hisilicon/qm.c:1704:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] kernel test robot
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.