* [linux-next:master 4131/8410] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-10-17 13:39 kernel test robot
2021-10-19 7:40 ` kernel test robot
0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2021-10-17 13:39 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 18849 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Yunfei Dong <yunfei.dong@mediatek.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Alexandre Courbot <acourbot@chromium.org>
CC: "Tzung-Bi Shih" <tzungbi@google.com>
CC: Hans Verkuil <hverkuil@xs4all.nl>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7c832d2f9b959e3181370c8b0dacaf9efe13fc05
commit: 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75 [4131/8410] media: mtk-vcodec: vdec: support stateless API
:::::: branch date: 2 days ago
:::::: commit date: 2 weeks ago
config: riscv-randconfig-c006-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
drivers/bcma/driver_mips.c:43:10: note: Left side of '||' is false
drivers/bcma/driver_mips.c:44:3: note: Assuming field 'id' is not equal to BCMA_CHIP_ID_BCM4749
dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM4749) &&
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bcma/driver_mips.c:44:50: note: Left side of '&&' is false
dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM4749) &&
^
drivers/bcma/driver_mips.c:43:2: note: Returning zero, which participates in a condition later
return (dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM5357 ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bcma/driver_mips.c:61:6: note: Returning from 'bcma_core_mips_bcm5357b0_quirk'
if (bcma_core_mips_bcm5357b0_quirk(dev))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bcma/driver_mips.c:61:2: note: Taking false branch
if (bcma_core_mips_bcm5357b0_quirk(dev))
^
drivers/bcma/driver_mips.c:65:6: note: Assuming 'flag' is 0
if (flag)
^~~~
drivers/bcma/driver_mips.c:65:2: note: Taking false branch
if (flag)
^
drivers/bcma/driver_mips.c:68:3: note: Returning the value 63
return 0x3f;
^~~~~~~~~~~
drivers/bcma/driver_mips.c:129:15: note: Returning from 'bcma_core_mips_irqflag'
if ((1 << bcma_core_mips_irqflag(core)) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/bcma/driver_mips.c:129:12: note: The result of the left shift is undefined due to shifting by '63', which is greater or equal to the width of type 'int'
if ((1 << bcma_core_mips_irqflag(core)) ==
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 9 warnings (8 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
drivers/target/target_core_rd.c:95:2: warning: Value stored to 'page_count' is never read [clang-analyzer-deadcode.DeadStores]
page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_table_array,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_rd.c:95:2: note: Value stored to 'page_count' is never read
page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_table_array,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_rd.c:221:2: warning: Value stored to 'page_count' is never read [clang-analyzer-deadcode.DeadStores]
page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_prot_array,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_rd.c:221:2: note: Value stored to 'page_count' is never read
page_count = rd_release_sgl_table(rd_dev, rd_dev->sg_prot_array,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 10 warnings (10 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
11 warnings generated.
drivers/target/target_core_stat.c:226:5: warning: Null pointer passed as 1st argument to string length function [clang-analyzer-unix.cstring.NullArg]
(strlen(dev->t10_wwn.unit_serial)) ?
^ ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/target/target_core_stat.c:226:5: note: Null pointer passed as 1st argument to string length function
(strlen(dev->t10_wwn.unit_serial)) ?
^ ~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 10 warnings (10 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:419:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EBUSY;
^ ~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:419:3: note: Value stored to 'ret' is never read
ret = -EBUSY;
^ ~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:429:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = -EBUSY;
^ ~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c:429:3: note: Value stored to 'ret' is never read
ret = -EBUSY;
^ ~~~~~~
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c:342:3: warning: Value stored to 'src_buf' is never read [clang-analyzer-deadcode.DeadStores]
src_buf = v4l2_m2m_src_buf_remove(ctx->m2m_ctx);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c:342:3: note: Value stored to 'src_buf' is never read
src_buf = v4l2_m2m_src_buf_remove(ctx->m2m_ctx);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c:405:2: warning: Value stored to 'dst_buf' is never read [clang-analyzer-deadcode.DeadStores]
dst_buf = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c:405:2: note: Value stored to 'dst_buf' is never read
dst_buf = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
>> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct vdec_fb *pfb = &framebuf->frame_buffer;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: note: Value stored to 'pfb' during its initialization is never read
struct vdec_fb *pfb = &framebuf->frame_buffer;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
13 warnings generated.
drivers/media/i2c/imx258.c:781:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = imx258_write_reg(imx258, IMX258_REG_TEST_PATTERN,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/imx258.c:781:3: note: Value stored to 'ret' is never read
ret = imx258_write_reg(imx258, IMX258_REG_TEST_PATTERN,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
14 warnings generated.
drivers/media/i2c/imx274.c:955:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &imx274->client->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/imx274.c:955:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = &imx274->client->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/imx274.c:1014:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct device *dev = &imx274->client->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/imx274.c:1014:17: note: Value stored to 'dev' during its initialization is never read
struct device *dev = &imx274->client->dev;
^~~ ~~~~~~~~~~~~~~~~~~~~
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
Suppressed 12 warnings (12 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
drivers/base/regmap/regcache.c:137:7: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
if (config->reg_defaults[i].reg % map->reg_stride)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/base/regmap/regcache.c:121:6: note: Assuming field 'cache_type' is not equal to REGCACHE_NONE
if (map->cache_type == REGCACHE_NONE) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/base/regmap/regcache.c:121:2: note: Taking false branch
if (map->cache_type == REGCACHE_NONE) {
^
drivers/base/regmap/regcache.c:130:6: note: Assuming field 'reg_defaults' is null
if (config->reg_defaults && !config->num_reg_defaults) {
^~~~~~~~~~~~~~~~~~~~
drivers/base/regmap/regcache.c:130:27: note: Left side of '&&' is false
if (config->reg_defaults && !config->num_reg_defaults) {
^
drivers/base/regmap/regcache.c:136:14: note: Assuming 'i' is < field 'num_reg_defaults'
for (i = 0; i < config->num_reg_defaults; i++)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/base/regmap/regcache.c:136:2: note: Loop condition is true. Entering loop body
for (i = 0; i < config->num_reg_defaults; i++)
^
drivers/base/regmap/regcache.c:137:7: note: Dereference of null pointer
if (config->reg_defaults[i].reg % map->reg_stride)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
8 warnings generated.
Suppressed 8 warnings (8 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
10 warnings generated.
include/linux/list.h:135:13: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
__list_del(entry->prev, entry->next);
^
drivers/base/regmap/regmap-debugfs.c:657:6: note: Assuming field 'debugfs' is non-null
if (map->debugfs) {
vim +/pfb +133 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
8cdc3794b2e34b Yunfei Dong 2021-08-06 127
8cdc3794b2e34b Yunfei Dong 2021-08-06 128 static struct vdec_fb *vdec_get_cap_buffer(struct mtk_vcodec_ctx *ctx,
8cdc3794b2e34b Yunfei Dong 2021-08-06 129 struct vb2_v4l2_buffer *vb2_v4l2)
8cdc3794b2e34b Yunfei Dong 2021-08-06 130 {
8cdc3794b2e34b Yunfei Dong 2021-08-06 131 struct mtk_video_dec_buf *framebuf =
8cdc3794b2e34b Yunfei Dong 2021-08-06 132 container_of(vb2_v4l2, struct mtk_video_dec_buf, m2m_buf.vb);
8cdc3794b2e34b Yunfei Dong 2021-08-06 @133 struct vdec_fb *pfb = &framebuf->frame_buffer;
8cdc3794b2e34b Yunfei Dong 2021-08-06 134 struct vb2_buffer *dst_buf = &vb2_v4l2->vb2_buf;
8cdc3794b2e34b Yunfei Dong 2021-08-06 135
8cdc3794b2e34b Yunfei Dong 2021-08-06 136 pfb = &framebuf->frame_buffer;
8cdc3794b2e34b Yunfei Dong 2021-08-06 137 pfb->base_y.va = NULL;
8cdc3794b2e34b Yunfei Dong 2021-08-06 138 pfb->base_y.dma_addr = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
8cdc3794b2e34b Yunfei Dong 2021-08-06 139 pfb->base_y.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[0];
8cdc3794b2e34b Yunfei Dong 2021-08-06 140
8cdc3794b2e34b Yunfei Dong 2021-08-06 141 if (ctx->q_data[MTK_Q_DATA_DST].fmt->num_planes == 2) {
8cdc3794b2e34b Yunfei Dong 2021-08-06 142 pfb->base_c.va = NULL;
8cdc3794b2e34b Yunfei Dong 2021-08-06 143 pfb->base_c.dma_addr =
8cdc3794b2e34b Yunfei Dong 2021-08-06 144 vb2_dma_contig_plane_dma_addr(dst_buf, 1);
8cdc3794b2e34b Yunfei Dong 2021-08-06 145 pfb->base_c.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[1];
8cdc3794b2e34b Yunfei Dong 2021-08-06 146 }
8cdc3794b2e34b Yunfei Dong 2021-08-06 147 mtk_v4l2_debug(1, "id=%d Framebuf pfb=%p VA=%p Y_DMA=%pad C_DMA=%pad Size=%zx frame_count = %d",
8cdc3794b2e34b Yunfei Dong 2021-08-06 148 dst_buf->index, pfb, pfb->base_y.va, &pfb->base_y.dma_addr,
8cdc3794b2e34b Yunfei Dong 2021-08-06 149 &pfb->base_c.dma_addr, pfb->base_y.size, ctx->decoded_frame_cnt);
8cdc3794b2e34b Yunfei Dong 2021-08-06 150
8cdc3794b2e34b Yunfei Dong 2021-08-06 151 return pfb;
8cdc3794b2e34b Yunfei Dong 2021-08-06 152 }
8cdc3794b2e34b Yunfei Dong 2021-08-06 153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26298 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [linux-next:master 4131/8410] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
2021-10-17 13:39 [linux-next:master 4131/8410] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
@ 2021-10-19 7:40 ` kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-10-19 7:40 UTC (permalink / raw)
To: Yunfei Dong
Cc: llvm, kbuild-all, Linux Memory Management List,
Mauro Carvalho Chehab, linux-media, Alexandre Courbot,
Tzung-Bi Shih, Hans Verkuil
[-- Attachment #1: Type: text/plain, Size: 4012 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7c832d2f9b959e3181370c8b0dacaf9efe13fc05
commit: 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75 [4131/8410] media: mtk-vcodec: vdec: support stateless API
config: riscv-randconfig-c006-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct vdec_fb *pfb = &framebuf->frame_buffer;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~
vim +/pfb +133 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
8cdc3794b2e34b Yunfei Dong 2021-08-06 127
8cdc3794b2e34b Yunfei Dong 2021-08-06 128 static struct vdec_fb *vdec_get_cap_buffer(struct mtk_vcodec_ctx *ctx,
8cdc3794b2e34b Yunfei Dong 2021-08-06 129 struct vb2_v4l2_buffer *vb2_v4l2)
8cdc3794b2e34b Yunfei Dong 2021-08-06 130 {
8cdc3794b2e34b Yunfei Dong 2021-08-06 131 struct mtk_video_dec_buf *framebuf =
8cdc3794b2e34b Yunfei Dong 2021-08-06 132 container_of(vb2_v4l2, struct mtk_video_dec_buf, m2m_buf.vb);
8cdc3794b2e34b Yunfei Dong 2021-08-06 @133 struct vdec_fb *pfb = &framebuf->frame_buffer;
8cdc3794b2e34b Yunfei Dong 2021-08-06 134 struct vb2_buffer *dst_buf = &vb2_v4l2->vb2_buf;
8cdc3794b2e34b Yunfei Dong 2021-08-06 135
8cdc3794b2e34b Yunfei Dong 2021-08-06 @136 pfb = &framebuf->frame_buffer;
8cdc3794b2e34b Yunfei Dong 2021-08-06 137 pfb->base_y.va = NULL;
8cdc3794b2e34b Yunfei Dong 2021-08-06 138 pfb->base_y.dma_addr = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
8cdc3794b2e34b Yunfei Dong 2021-08-06 139 pfb->base_y.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[0];
8cdc3794b2e34b Yunfei Dong 2021-08-06 140
8cdc3794b2e34b Yunfei Dong 2021-08-06 141 if (ctx->q_data[MTK_Q_DATA_DST].fmt->num_planes == 2) {
8cdc3794b2e34b Yunfei Dong 2021-08-06 142 pfb->base_c.va = NULL;
8cdc3794b2e34b Yunfei Dong 2021-08-06 143 pfb->base_c.dma_addr =
8cdc3794b2e34b Yunfei Dong 2021-08-06 144 vb2_dma_contig_plane_dma_addr(dst_buf, 1);
8cdc3794b2e34b Yunfei Dong 2021-08-06 145 pfb->base_c.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[1];
8cdc3794b2e34b Yunfei Dong 2021-08-06 146 }
8cdc3794b2e34b Yunfei Dong 2021-08-06 147 mtk_v4l2_debug(1, "id=%d Framebuf pfb=%p VA=%p Y_DMA=%pad C_DMA=%pad Size=%zx frame_count = %d",
8cdc3794b2e34b Yunfei Dong 2021-08-06 148 dst_buf->index, pfb, pfb->base_y.va, &pfb->base_y.dma_addr,
8cdc3794b2e34b Yunfei Dong 2021-08-06 149 &pfb->base_c.dma_addr, pfb->base_y.size, ctx->decoded_frame_cnt);
8cdc3794b2e34b Yunfei Dong 2021-08-06 150
8cdc3794b2e34b Yunfei Dong 2021-08-06 151 return pfb;
8cdc3794b2e34b Yunfei Dong 2021-08-06 152 }
8cdc3794b2e34b Yunfei Dong 2021-08-06 153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26298 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [linux-next:master 4131/8410] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-10-19 7:40 ` kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-10-19 7:40 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4076 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7c832d2f9b959e3181370c8b0dacaf9efe13fc05
commit: 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75 [4131/8410] media: mtk-vcodec: vdec: support stateless API
config: riscv-randconfig-c006-20211017 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct vdec_fb *pfb = &framebuf->frame_buffer;
^~~ ~~~~~~~~~~~~~~~~~~~~~~~
vim +/pfb +133 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c
8cdc3794b2e34b Yunfei Dong 2021-08-06 127
8cdc3794b2e34b Yunfei Dong 2021-08-06 128 static struct vdec_fb *vdec_get_cap_buffer(struct mtk_vcodec_ctx *ctx,
8cdc3794b2e34b Yunfei Dong 2021-08-06 129 struct vb2_v4l2_buffer *vb2_v4l2)
8cdc3794b2e34b Yunfei Dong 2021-08-06 130 {
8cdc3794b2e34b Yunfei Dong 2021-08-06 131 struct mtk_video_dec_buf *framebuf =
8cdc3794b2e34b Yunfei Dong 2021-08-06 132 container_of(vb2_v4l2, struct mtk_video_dec_buf, m2m_buf.vb);
8cdc3794b2e34b Yunfei Dong 2021-08-06 @133 struct vdec_fb *pfb = &framebuf->frame_buffer;
8cdc3794b2e34b Yunfei Dong 2021-08-06 134 struct vb2_buffer *dst_buf = &vb2_v4l2->vb2_buf;
8cdc3794b2e34b Yunfei Dong 2021-08-06 135
8cdc3794b2e34b Yunfei Dong 2021-08-06 @136 pfb = &framebuf->frame_buffer;
8cdc3794b2e34b Yunfei Dong 2021-08-06 137 pfb->base_y.va = NULL;
8cdc3794b2e34b Yunfei Dong 2021-08-06 138 pfb->base_y.dma_addr = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
8cdc3794b2e34b Yunfei Dong 2021-08-06 139 pfb->base_y.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[0];
8cdc3794b2e34b Yunfei Dong 2021-08-06 140
8cdc3794b2e34b Yunfei Dong 2021-08-06 141 if (ctx->q_data[MTK_Q_DATA_DST].fmt->num_planes == 2) {
8cdc3794b2e34b Yunfei Dong 2021-08-06 142 pfb->base_c.va = NULL;
8cdc3794b2e34b Yunfei Dong 2021-08-06 143 pfb->base_c.dma_addr =
8cdc3794b2e34b Yunfei Dong 2021-08-06 144 vb2_dma_contig_plane_dma_addr(dst_buf, 1);
8cdc3794b2e34b Yunfei Dong 2021-08-06 145 pfb->base_c.size = ctx->q_data[MTK_Q_DATA_DST].sizeimage[1];
8cdc3794b2e34b Yunfei Dong 2021-08-06 146 }
8cdc3794b2e34b Yunfei Dong 2021-08-06 147 mtk_v4l2_debug(1, "id=%d Framebuf pfb=%p VA=%p Y_DMA=%pad C_DMA=%pad Size=%zx frame_count = %d",
8cdc3794b2e34b Yunfei Dong 2021-08-06 148 dst_buf->index, pfb, pfb->base_y.va, &pfb->base_y.dma_addr,
8cdc3794b2e34b Yunfei Dong 2021-08-06 149 &pfb->base_c.dma_addr, pfb->base_y.size, ctx->decoded_frame_cnt);
8cdc3794b2e34b Yunfei Dong 2021-08-06 150
8cdc3794b2e34b Yunfei Dong 2021-08-06 151 return pfb;
8cdc3794b2e34b Yunfei Dong 2021-08-06 152 }
8cdc3794b2e34b Yunfei Dong 2021-08-06 153
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26298 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 4131/8410] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
2021-10-19 7:40 ` kernel test robot
@ 2021-10-19 8:55 ` Tzung-Bi Shih
-1 siblings, 0 replies; 5+ messages in thread
From: Tzung-Bi Shih @ 2021-10-19 8:55 UTC (permalink / raw)
To: kernel test robot
Cc: Yunfei Dong, llvm, kbuild-all, Linux Memory Management List,
Mauro Carvalho Chehab, linux-media, Alexandre Courbot,
Hans Verkuil
On Tue, Oct 19, 2021 at 9:40 AM kernel test robot <yujie.liu@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 7c832d2f9b959e3181370c8b0dacaf9efe13fc05
> commit: 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75 [4131/8410] media: mtk-vcodec: vdec: support stateless API
> config: riscv-randconfig-c006-20211017 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515)
> 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 riscv cross compiling tool for clang build
> # apt-get install binutils-riscv64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> clang-analyzer warnings: (new ones prefixed by >>)
>
> >> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
> struct vdec_fb *pfb = &framebuf->frame_buffer;
> ^~~ ~~~~~~~~~~~~~~~~~~~~~~~
Proposed a fix:
https://patchwork.linuxtv.org/project/linux-media/patch/20211019085244.1403-1-tzungbi@google.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 4131/8410] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-10-19 8:55 ` Tzung-Bi Shih
0 siblings, 0 replies; 5+ messages in thread
From: Tzung-Bi Shih @ 2021-10-19 8:55 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]
On Tue, Oct 19, 2021 at 9:40 AM kernel test robot <yujie.liu@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 7c832d2f9b959e3181370c8b0dacaf9efe13fc05
> commit: 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75 [4131/8410] media: mtk-vcodec: vdec: support stateless API
> config: riscv-randconfig-c006-20211017 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515)
> 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 riscv cross compiling tool for clang build
> # apt-get install binutils-riscv64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 8cdc3794b2e34b3ee11ddfccf4af3f64344a1a75
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> clang-analyzer warnings: (new ones prefixed by >>)
>
> >> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
> struct vdec_fb *pfb = &framebuf->frame_buffer;
> ^~~ ~~~~~~~~~~~~~~~~~~~~~~~
Proposed a fix:
https://patchwork.linuxtv.org/project/linux-media/patch/20211019085244.1403-1-tzungbi(a)google.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-19 8:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17 13:39 [linux-next:master 4131/8410] drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c:133:18: warning: Value stored to 'pfb' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2021-10-19 7:40 ` kernel test robot
2021-10-19 7:40 ` kernel test robot
2021-10-19 8:55 ` Tzung-Bi Shih
2021-10-19 8:55 ` Tzung-Bi Shih
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.