linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Yunfei Dong <yunfei.dong@mediatek.com>
Cc: <llvm@lists.linux.dev>, <kbuild-all@lists.01.org>,
	"Linux Memory Management List" <linux-mm@kvack.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	<linux-media@vger.kernel.org>,
	Alexandre Courbot <acourbot@chromium.org>,
	Tzung-Bi Shih <tzungbi@google.com>,
	Hans Verkuil <hverkuil@xs4all.nl>
Subject: [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]
Date: Tue, 19 Oct 2021 15:40:14 +0800	[thread overview]
Message-ID: <eb2b58dc-3600-70d3-147a-c356d24feabd@intel.com> (raw)
In-Reply-To: <202110172146.wMBY6qzo-lkp@intel.com>

[-- 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 --]

       reply	other threads:[~2021-10-19  7:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202110172146.wMBY6qzo-lkp@intel.com>
2021-10-19  7:40 ` kernel test robot [this message]
2021-10-19  8:55   ` [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] Tzung-Bi Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb2b58dc-3600-70d3-147a-c356d24feabd@intel.com \
    --to=yujie.liu@intel.com \
    --cc=acourbot@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=tzungbi@google.com \
    --cc=yunfei.dong@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).