* [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]
[not found] <202110172146.wMBY6qzo-lkp@intel.com>
@ 2021-10-19 7:40 ` kernel test robot
2021-10-19 8:55 ` Tzung-Bi Shih
0 siblings, 1 reply; 2+ 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] 2+ 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 ` [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 8:55 ` Tzung-Bi Shih
0 siblings, 0 replies; 2+ 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] 2+ messages in thread
end of thread, other threads:[~2021-10-19 8:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <202110172146.wMBY6qzo-lkp@intel.com>
2021-10-19 7:40 ` [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 8:55 ` Tzung-Bi Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).