* drivers/media/platform/st/sti/delta/delta-v4l2.c:63:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2022-06-03 3:23 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-06-03 3:23 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 40427 bytes --]
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/media/platform/st/sti/delta/delta-v4l2.c:63:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]"
::::::
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 50fd82b3a9a9335df5d50c7ddcb81c81d358c4fc
commit: e7b8153e2a4f0c9c8d1450aa7328d54ea64fe8b2 media: platform: place stm32/ and sti/ under st/ dir
date: 3 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 3 months ago
config: arm-randconfig-c002-20220531 (https://download.01.org/0day-ci/archive/20220603/202206031117.sZPa7VLG-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c825abd6b0198fb088d9752f556a70705bc99dfd)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e7b8153e2a4f0c9c8d1450aa7328d54ea64fe8b2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e7b8153e2a4f0c9c8d1450aa7328d54ea64fe8b2
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:31:25: note: expanded from macro '__cmp_once'
typeof(x) unique_x = (x); \
^
drivers/hwmon/max31730.c:219:8: note: '?' condition is false
val = clamp_val(val, MAX31730_TEMP_MIN, MAX31730_TEMP_MAX);
^
include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^
include/linux/minmax.h:124:48: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^
include/linux/minmax.h:112:27: note: expanded from macro 'max_t'
#define max_t(type, x, y) __careful_cmp((type)(x), (type)(y), >)
^
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^
drivers/hwmon/max31730.c:219:8: note: '__UNIQUE_ID___x243' is < '__UNIQUE_ID___y244'
val = clamp_val(val, MAX31730_TEMP_MIN, MAX31730_TEMP_MAX);
^
include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:124:36: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:104:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^~~
drivers/hwmon/max31730.c:219:8: note: '?' condition is true
val = clamp_val(val, MAX31730_TEMP_MIN, MAX31730_TEMP_MAX);
^
include/linux/minmax.h:137:32: note: expanded from macro 'clamp_val'
#define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
^
include/linux/minmax.h:124:36: note: expanded from macro 'clamp_t'
#define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi)
^
include/linux/minmax.h:104:27: note: expanded from macro 'min_t'
#define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
^
include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
__cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
^
include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once'
__cmp(unique_x, unique_y, op); })
^
include/linux/minmax.h:28:26: note: expanded from macro '__cmp'
#define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
^
drivers/hwmon/max31730.c:219:2: note: The value -128000 is assigned to 'val'
val = clamp_val(val, MAX31730_TEMP_MIN, MAX31730_TEMP_MAX);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/hwmon/max31730.c:220:30: note: The result of the left shift is undefined because the left operand is negative
val = DIV_ROUND_CLOSEST(val << 4, 1000) << 4;
^
include/linux/math.h:87:18: note: expanded from macro 'DIV_ROUND_CLOSEST'
typeof(x) __x = x; \
^
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
3 warnings generated.
drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c:699:20: warning: Value stored to 'ctx' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct bdisp_ctx *ctx = fh_to_ctx(fh);
^~~
drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c:699:20: note: Value stored to 'ctx' during its initialization is never read
struct bdisp_ctx *ctx = fh_to_ctx(fh);
^~~
drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c:743:20: warning: Value stored to 'ctx' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct bdisp_ctx *ctx = fh_to_ctx(fh);
^~~
drivers/media/platform/st/sti/bdisp/bdisp-v4l2.c:743:20: note: Value stored to 'ctx' during its initialization is never read
struct bdisp_ctx *ctx = fh_to_ctx(fh);
^~~
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
22 warnings generated.
>> drivers/media/platform/st/sti/delta/delta-v4l2.c:63:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:63:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
>> drivers/media/platform/st/sti/delta/delta-v4l2.c:65:6: warning: Value stored to 'data' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
u8 *data = (u8 *)(au->vaddr);
^~~~ ~~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:65:6: note: Value stored to 'data' during its initialization is never read
u8 *data = (u8 *)(au->vaddr);
^~~~ ~~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:79:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:79:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:81:6: warning: Value stored to 'data' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
u8 *data = (u8 *)(frame->vaddr);
^~~~ ~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:81:6: note: Value stored to 'data' during its initialization is never read
u8 *data = (u8 *)(frame->vaddr);
^~~~ ~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:428:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:428:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
>> drivers/media/platform/st/sti/delta/delta-v4l2.c:431:16: warning: Value stored to 'str' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned char str[100] = "";
^~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:431:16: note: Value stored to 'str' during its initialization is never read
unsigned char str[100] = "";
^~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:456:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:456:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:460:16: warning: Value stored to 'str' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned char str[100] = "";
^~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:460:16: note: Value stored to 'str' during its initialization is never read
unsigned char str[100] = "";
^~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:495:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:495:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:549:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:549:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:609:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:609:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:645:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:645:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:649:16: warning: Value stored to 'str' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned char str[100] = "";
^~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:649:16: note: Value stored to 'str' during its initialization is never read
unsigned char str[100] = "";
^~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:766:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:766:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:809:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:809:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1045:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1045:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1055:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1055:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1118:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1118:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
>> drivers/media/platform/st/sti/delta/delta-v4l2.c:1314:16: warning: Value stored to 'str1' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned char str1[100] = "";
^~~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1314:16: note: Value stored to 'str1' during its initialization is never read
unsigned char str1[100] = "";
^~~~ ~~
>> drivers/media/platform/st/sti/delta/delta-v4l2.c:1315:16: warning: Value stored to 'str2' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned char str2[100] = "";
^~~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1315:16: note: Value stored to 'str2' during its initialization is never read
unsigned char str2[100] = "";
^~~~ ~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1420:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-v4l2.c:1420:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
Suppressed 1 warnings (1 with check filters).
1 warning generated.
drivers/mtd/nand/raw/nand_bbt.c:579:3: warning: Value stored to 'bbtblocks' is never read [clang-analyzer-deadcode.DeadStores]
bbtblocks = mtd->size >> this->bbt_erase_shift;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_bbt.c:579:3: note: Value stored to 'bbtblocks' is never read
bbtblocks = mtd->size >> this->bbt_erase_shift;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
drivers/mtd/nand/raw/nand_onfi.c:254:6: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
1 << (fls(le32_to_cpu(p->pages_per_block)) - 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_onfi.c:147:25: note: Calling 'nand_to_mtd'
struct mtd_info *mtd = nand_to_mtd(chip);
^~~~~~~~~~~~~~~~~
include/linux/mtd/rawnand.h:1315:2: note: Returning without writing to 'chip->parameters.model', which participates in a condition later
return &chip->base.mtd;
^
drivers/mtd/nand/raw/nand_onfi.c:147:25: note: Returning from 'nand_to_mtd'
struct mtd_info *mtd = nand_to_mtd(chip);
^~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_onfi.c:161:6: note: Assuming 'ret' is 0
if (ret || strncmp(id, "ONFI", 4))
^~~
drivers/mtd/nand/raw/nand_onfi.c:161:6: note: Left side of '||' is false
drivers/mtd/nand/raw/nand_onfi.c:161:13: note: Assuming the condition is false
if (ret || strncmp(id, "ONFI", 4))
^~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_onfi.c:161:2: note: Taking false branch
if (ret || strncmp(id, "ONFI", 4))
^
drivers/mtd/nand/raw/nand_onfi.c:165:9: note: Calling 'kzalloc'
pbuf = kzalloc((sizeof(*pbuf) * ONFI_PARAM_PAGES), GFP_KERNEL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h:715:9: note: Calling 'kmalloc'
return kmalloc(size, flags | __GFP_ZERO);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h:569:2: note: Taking false branch
if (__builtin_constant_p(size)) {
^
include/linux/slab.h:586:2: note: Returning pointer, which participates in a condition later
return __kmalloc(size, flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h:715:9: note: Returning from 'kmalloc'
return kmalloc(size, flags | __GFP_ZERO);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h:715:2: note: Returning pointer, which participates in a condition later
return kmalloc(size, flags | __GFP_ZERO);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_onfi.c:165:9: note: Returning from 'kzalloc'
pbuf = kzalloc((sizeof(*pbuf) * ONFI_PARAM_PAGES), GFP_KERNEL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_onfi.c:166:6: note: Assuming 'pbuf' is non-null
if (!pbuf)
^~~~~
drivers/mtd/nand/raw/nand_onfi.c:166:2: note: Taking false branch
if (!pbuf)
^
drivers/mtd/nand/raw/nand_onfi.c:169:7: note: Calling 'nand_has_exec_op'
if (!nand_has_exec_op(chip) ||
^~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/internals.h:117:6: note: Assuming field 'controller' is null
if (!chip->controller || !chip->controller->ops ||
^~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/internals.h:117:24: note: Left side of '||' is true
if (!chip->controller || !chip->controller->ops ||
^
drivers/mtd/nand/raw/internals.h:119:3: note: Returning without writing to 'chip->parameters.model', which participates in a condition later
return false;
^
drivers/mtd/nand/raw/nand_onfi.c:169:7: note: Returning from 'nand_has_exec_op'
if (!nand_has_exec_op(chip) ||
^~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/nand/raw/nand_onfi.c:169:30: note: Left side of '||' is true
if (!nand_has_exec_op(chip) ||
^
drivers/mtd/nand/raw/nand_onfi.c:173:2: note: Loop condition is true. Entering loop body
for (i = 0; i < ONFI_PARAM_PAGES; i++) {
^
drivers/mtd/nand/raw/nand_onfi.c:174:8: note: 'i' is 0
if (!i)
^
drivers/mtd/nand/raw/nand_onfi.c:174:3: note: Taking true branch
if (!i)
^
drivers/mtd/nand/raw/nand_onfi.c:184:7: note: Assuming 'ret' is 0
if (ret) {
^~~
drivers/mtd/nand/raw/nand_onfi.c:184:3: note: Taking false branch
--
if (0) \
^
drivers/i2c/busses/i2c-highlander.c:262:23: note: The value 2 is assigned to 'i'
for (i = 0; i < cnt; i++) {
^~~
drivers/i2c/busses/i2c-highlander.c:262:14: note: Assuming 'i' is < 'cnt'
for (i = 0; i < cnt; i++) {
^~~~~~~
drivers/i2c/busses/i2c-highlander.c:262:2: note: Loop condition is true. Entering loop body
for (i = 0; i < cnt; i++) {
^
drivers/i2c/busses/i2c-highlander.c:263:3: note: 1st function call argument is an uninitialized value
iowrite16(data[i], dev->base + SMTRDR + (i * sizeof(u16)));
^ ~~~~~~~
include/asm-generic/io.h:751:19: note: expanded from macro 'iowrite16'
#define iowrite16 iowrite16
^
include/uapi/linux/swab.h:176:9: warning: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
return __swab16(*p);
^
include/uapi/linux/swab.h:102:28: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
drivers/i2c/busses/i2c-highlander.c:285:2: note: Taking false branch
dev_dbg(dev->dev, "addr %04x, command %02x, read_write %d, size %d\n",
^
include/linux/dev_printk.h:162:2: note: expanded from macro 'dev_dbg'
if (0) \
^
drivers/i2c/busses/i2c-highlander.c:291:2: note: Control jumps to 'case 8:' at line 296
switch (size) {
^
drivers/i2c/busses/i2c-highlander.c:299:3: note: Execution continues on line 308
break;
^
drivers/i2c/busses/i2c-highlander.c:311:2: note: Control jumps to 'case 32:' at line 321
switch (dev->buf_len) {
^
drivers/i2c/busses/i2c-highlander.c:323:3: note: Execution continues on line 329
break;
^
drivers/i2c/busses/i2c-highlander.c:339:6: note: Assuming 'read_write' is equal to I2C_SMBUS_READ
if (read_write == I2C_SMBUS_READ)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-highlander.c:339:2: note: Taking true branch
if (read_write == I2C_SMBUS_READ)
^
drivers/i2c/busses/i2c-highlander.c:340:10: note: Calling 'highlander_i2c_read'
return highlander_i2c_read(dev);
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-highlander.c:214:6: note: Assuming the condition is false
if (highlander_i2c_wait_for_bbsy(dev))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-highlander.c:214:2: note: Taking false branch
if (highlander_i2c_wait_for_bbsy(dev))
^
drivers/i2c/busses/i2c-highlander.c:219:2: note: Taking false branch
if (highlander_i2c_wait_xfer_done(dev)) {
^
drivers/i2c/busses/i2c-highlander.c:236:6: note: Assuming 'iic_read_delay' is 0
if (iic_read_delay && time_before(jiffies, dev->last_read_time +
^~~~~~~~~~~~~~
drivers/i2c/busses/i2c-highlander.c:236:21: note: Left side of '&&' is false
if (iic_read_delay && time_before(jiffies, dev->last_read_time +
^
drivers/i2c/busses/i2c-highlander.c:242:14: note: Assuming 'i' is >= 'cnt'
for (i = 0; i < cnt; i++) {
^~~~~~~
drivers/i2c/busses/i2c-highlander.c:242:2: note: Loop condition is false. Execution continues on line 247
for (i = 0; i < cnt; i++) {
^
drivers/i2c/busses/i2c-highlander.c:247:2: note: Calling 'smbus_read_data'
smbus_read_data(data, dev->buf, dev->buf_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-highlander.c:102:9: note: Assuming 'len' is > 1
for (; len > 1; len -= 2) {
^~~~~~~
drivers/i2c/busses/i2c-highlander.c:102:2: note: Loop condition is true. Entering loop body
for (; len > 1; len -= 2) {
^
drivers/i2c/busses/i2c-highlander.c:103:20: note: Calling '__cpu_to_be16p'
*(__be16 *)dst = cpu_to_be16p(src++);
^
include/linux/byteorder/generic.h:108:22: note: expanded from macro 'cpu_to_be16p'
#define cpu_to_be16p __cpu_to_be16p
^
include/uapi/linux/byteorder/little_endian.h:87:25: note: Calling '__swab16p'
return (__force __be16)__swab16p(p);
^~~~~~~~~~~~
include/uapi/linux/swab.h:176:9: note: 1st function call argument is an uninitialized value
return __swab16(*p);
^
include/uapi/linux/swab.h:102:28: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^ ~~~~~~~~~~
1 warning generated.
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
4 warnings generated.
>> drivers/media/platform/st/sti/delta/delta-debug.c:57:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
drivers/media/platform/st/sti/delta/delta-debug.c:57:20: note: Value stored to 'delta' during its initialization is never read
struct delta_dev *delta = ctx->dev;
^~~~~ ~~~~~~~~
>> drivers/media/platform/st/sti/delta/delta-debug.c:58:27: warning: Value stored to 's' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct delta_streaminfo *s = &ctx->streaminfo;
^ ~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/delta/delta-debug.c:58:27: note: Value stored to 's' during its initialization is never read
struct delta_streaminfo *s = &ctx->streaminfo;
^ ~~~~~~~~~~~~~~~~
>> drivers/media/platform/st/sti/delta/delta-debug.c:59:16: warning: Value stored to 'str' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
unsigned char str[100] = "";
^~~ ~~
drivers/media/platform/st/sti/delta/delta-debug.c:59:16: note: Value stored to 'str' during its initialization is never read
unsigned char str[100] = "";
^~~ ~~
Suppressed 1 warnings (1 with check filters).
1 warning generated.
Suppressed 1 warnings (1 with check filters).
3 warnings generated.
>> drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c:41:2: warning: Value stored to 'b' is never read [clang-analyzer-deadcode.DeadStores]
b += snprintf(b, len,
^ ~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c:41:2: note: Value stored to 'b' is never read
b += snprintf(b, len,
^ ~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c:59:2: warning: Value stored to 'b' is never read [clang-analyzer-deadcode.DeadStores]
b += snprintf(b, len,
^ ~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c:59:2: note: Value stored to 'b' is never read
b += snprintf(b, len,
^ ~~~~~~~~~~~~~~~~
Suppressed 1 warnings (1 with check filters).
16 warnings generated.
drivers/media/platform/st/sti/hva/hva-v4l2.c:230:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:230:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:231:25: warning: Value stored to 'stream' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct hva_streaminfo *stream = &ctx->streaminfo;
^~~~~~ ~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:231:25: note: Value stored to 'stream' during its initialization is never read
struct hva_streaminfo *stream = &ctx->streaminfo;
^~~~~~ ~~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:232:24: warning: Value stored to 'frame' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct hva_frameinfo *frame = &ctx->frameinfo;
^~~~~ ~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:232:24: note: Value stored to 'frame' during its initialization is never read
struct hva_frameinfo *frame = &ctx->frameinfo;
^~~~~ ~~~~~~~~~~~~~~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:339:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:339:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:403:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:403:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:453:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:453:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:483:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:483:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:557:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:557:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:620:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:620:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:695:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:695:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:866:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:866:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:876:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:876:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:914:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:914:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:936:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:936:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = ctx_to_dev(ctx);
^~~
drivers/media/platform/st/sti/hva/hva-v4l2.c:1069:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = ctx_to_dev(ctx);
^~~
vim +/delta +63 drivers/media/platform/st/sti/delta/delta-v4l2.c
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 60
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 61 static void dump_au(struct delta_ctx *ctx, struct delta_au *au)
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 62 {
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 @63 struct delta_dev *delta = ctx->dev;
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 64 u32 size = 10; /* dump first & last 10 bytes */
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 @65 u8 *data = (u8 *)(au->vaddr);
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 66
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 67 if (au->size <= (size * 2))
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 68 dev_dbg(delta->dev, "%s dump au[%d] dts=%lld size=%d data=%*ph\n",
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 69 ctx->name, au->vbuf.vb2_buf.index, au->dts, au->size,
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 70 au->size, data);
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 71 else
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 72 dev_dbg(delta->dev, "%s dump au[%d] dts=%lld size=%d data=%*ph..%*ph\n",
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 73 ctx->name, au->vbuf.vb2_buf.index, au->dts, au->size,
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 74 size, data, size, data + au->size - size);
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 75 }
f386509e495945 drivers/media/platform/sti/delta/delta-v4l2.c Hugues Fruchet 2017-02-02 76
:::::: The code at line 63 was first introduced by commit
:::::: f386509e49594591f80af2e5a73d4c9ce389aa29 [media] st-delta: STiH4xx multi-format video decoder v4l2 driver
:::::: TO: Hugues Fruchet <hugues.fruchet@st.com>
:::::: CC: Mauro Carvalho Chehab <mchehab@s-opensource.com>
--
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-06-03 3:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 3:23 drivers/media/platform/st/sti/delta/delta-v4l2.c:63:20: warning: Value stored to 'delta' during its initialization is never read [clang-analyzer-deadcode.DeadStores] 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.