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/commi...
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(a)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