* drivers/nvme/host/core.c:2915:2: warning: Address of local auto-variable assigned to a function parameter.
@ 2020-12-26 20:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-26 20:44 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 5765 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Keith Busch <keith.busch@wdc.com>
CC: Christoph Hellwig <hch@lst.de>
CC: "Matias Bjørling" <matias.bjorling@wdc.com>
CC: "Javier González" <javier.gonz@samsung.com>
CC: Himanshu Madhani <himanshu.madhani@oracle.com>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: Hannes Reinecke <hare@suse.de>
CC: Johannes Thumshirn <johannes.thumshirn@wdc.com>
CC: Daniel Wagner <dwagner@suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f838f8d2b694cf9d524dc4423e9dd2db13892f3f
commit: be93e87e780253780df9bb6ecc9bc1199b0d94c3 nvme: support for multiple Command Sets Supported and Effects log pages
date: 6 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 6 months ago
compiler: c6x-elf-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> net/netfilter/x_tables.c:1339:22: warning: Variable 'mem' is not assigned a value. [unassignedVariable]
struct xt_counters *mem;
^
>> net/netfilter/nft_fib.c:144:56: warning: Same expression in both branches of ternary operator. [duplicateExpressionTernary]
*dreg = (priv->flags & NFTA_FIB_F_PRESENT) ? !!index : index;
^
--
>> net/ipv4/esp4.c:762:10: warning: Redundant condition: xo. '!xo || (xo && !(xo->flags&CRYPTO_DONE))' is equivalent to '!xo || !(xo->flags&CRYPTO_DONE)' [redundantCondition]
if (!xo || (xo && !(xo->flags & CRYPTO_DONE)))
^
drivers/nvme/host/core.c:2307:35: warning: Same expression on both sides of '-'. [knownConditionTrueFalse]
ctrl->ctrl_config |= (page_shift - 12) << NVME_CC_MPS_SHIFT;
^
drivers/nvme/host/core.c:2284:38: note: 'page_shift' is assigned value '12' here.
unsigned dev_page_min, page_shift = 12;
^
drivers/nvme/host/core.c:2307:35: note: Same expression on both sides of '-'.
ctrl->ctrl_config |= (page_shift - 12) << NVME_CC_MPS_SHIFT;
^
drivers/nvme/host/core.c:2122:26: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned]
cdw10 |= (1 << 30) | (1 << 31); /* PTPL=1 */
^
>> drivers/nvme/host/core.c:2915:2: warning: Address of local auto-variable assigned to a function parameter. [autoVariables]
*log = &cel->log;
^
--
>> net/mpls/af_mpls.c:759:6: warning: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch]
err = 0;
^
net/mpls/af_mpls.c:721:0: note: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing?
int err = -EINVAL;
^
net/mpls/af_mpls.c:759:6: note: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing?
err = 0;
^
>> net/ipv6/esp6.c:796:10: warning: Redundant condition: xo. '!xo || (xo && !(xo->flags&CRYPTO_DONE))' is equivalent to '!xo || !(xo->flags&CRYPTO_DONE)' [redundantCondition]
if (!xo || (xo && !(xo->flags & CRYPTO_DONE)))
^
vim +2915 drivers/nvme/host/core.c
be93e87e7802537 Keith Busch 2020-06-29 2888
be93e87e7802537 Keith Busch 2020-06-29 2889 static int nvme_get_effects_log(struct nvme_ctrl *ctrl, u8 csi,
be93e87e7802537 Keith Busch 2020-06-29 2890 struct nvme_effects_log **log)
be93e87e7802537 Keith Busch 2020-06-29 2891 {
be93e87e7802537 Keith Busch 2020-06-29 2892 struct nvme_cel *cel = nvme_find_cel(ctrl, csi);
84fef62d135b6e4 Keith Busch 2017-11-07 2893 int ret;
84fef62d135b6e4 Keith Busch 2017-11-07 2894
be93e87e7802537 Keith Busch 2020-06-29 2895 if (cel)
be93e87e7802537 Keith Busch 2020-06-29 2896 goto out;
84fef62d135b6e4 Keith Busch 2017-11-07 2897
be93e87e7802537 Keith Busch 2020-06-29 2898 cel = kzalloc(sizeof(*cel), GFP_KERNEL);
be93e87e7802537 Keith Busch 2020-06-29 2899 if (!cel)
be93e87e7802537 Keith Busch 2020-06-29 2900 return -ENOMEM;
84fef62d135b6e4 Keith Busch 2017-11-07 2901
be93e87e7802537 Keith Busch 2020-06-29 2902 ret = nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_CMD_EFFECTS, 0, csi,
be93e87e7802537 Keith Busch 2020-06-29 2903 &cel->log, sizeof(cel->log), 0);
84fef62d135b6e4 Keith Busch 2017-11-07 2904 if (ret) {
be93e87e7802537 Keith Busch 2020-06-29 2905 kfree(cel);
84fef62d135b6e4 Keith Busch 2017-11-07 2906 return ret;
180de0070048340 Christoph Hellwig 2017-06-26 2907 }
180de0070048340 Christoph Hellwig 2017-06-26 2908
be93e87e7802537 Keith Busch 2020-06-29 2909 cel->csi = csi;
be93e87e7802537 Keith Busch 2020-06-29 2910
be93e87e7802537 Keith Busch 2020-06-29 2911 spin_lock(&ctrl->lock);
be93e87e7802537 Keith Busch 2020-06-29 2912 list_add_tail(&cel->entry, &ctrl->cels);
be93e87e7802537 Keith Busch 2020-06-29 2913 spin_unlock(&ctrl->lock);
be93e87e7802537 Keith Busch 2020-06-29 2914 out:
be93e87e7802537 Keith Busch 2020-06-29 @2915 *log = &cel->log;
be93e87e7802537 Keith Busch 2020-06-29 2916 return 0;
be93e87e7802537 Keith Busch 2020-06-29 2917 }
be93e87e7802537 Keith Busch 2020-06-29 2918
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-26 20:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-26 20:44 drivers/nvme/host/core.c:2915:2: warning: Address of local auto-variable assigned to a function parameter 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.