CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Mauro Carvalho Chehab <mche...@kernel.org>
CC: linux-me...@vger.kernel.org
CC: Laurent Pinchart <laurent.pinch...@ideasonboard.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: 46fb99951fe2c71adfd7f4ea4439af5ed5ebb7f7 media: platform: place NXP 
drivers on a separate dir
date:   5 weeks ago
:::::: branch date: 7 hours ago
:::::: commit date: 5 weeks ago
config: arm-randconfig-c002-20220418 
(https://download.01.org/0day-ci/archive/20220418/202204181240.xatjpvjs-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
ef94609d6ebe981767788e6877b0b3b731d425af)
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=46fb99951fe2c71adfd7f4ea4439af5ed5ebb7f7
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 46fb99951fe2c71adfd7f4ea4439af5ed5ebb7f7
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:933:6: note: Left side of 
'||' is false
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:933:18: note: Assuming 
'dst_buf' is non-null
           if (!src_buf || !dst_buf) {
                           ^~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:933:2: note: Taking false 
branch
           if (!src_buf || !dst_buf) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:939:7: note: 'q_data_cap' is 
non-null
           if (!q_data_cap)
                ^~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:939:2: note: Taking false 
branch
           if (!q_data_cap)
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:942:7: note: 'q_data_out' is 
non-null
           if (!q_data_out)
                ^~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:942:2: note: Taking false 
branch
           if (!q_data_out)
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:950:6: note: Assuming field 
'colplanes' is equal to field 'num_planes'
           if (q_data_cap->fmt->colplanes != dst_buf->vb2_buf.num_planes) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:950:2: note: Taking false 
branch
           if (q_data_cap->fmt->colplanes != dst_buf->vb2_buf.num_planes) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:956:6: note: Assuming field 
'jpeg_parse_error' is false
           if (jpeg_src_buf->jpeg_parse_error) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:956:2: note: Taking false 
branch
           if (jpeg_src_buf->jpeg_parse_error) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:971:11: note: Field 'slot' is 
< MXC_MAX_SLOTS
           if (ctx->slot >= MXC_MAX_SLOTS) {
                    ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:971:2: note: Taking false 
branch
           if (ctx->slot >= MXC_MAX_SLOTS) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:975:2: note: Taking false 
branch
           if (!mxc_jpeg_alloc_slot_data(jpeg, ctx->slot)) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:983:6: note: Assuming field 
'mode' is equal to MXC_JPEG_ENCODE
           if (jpeg->mode == MXC_JPEG_ENCODE) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:983:2: note: Taking true 
branch
           if (jpeg->mode == MXC_JPEG_ENCODE) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:984:3: note: Taking false 
branch
                   dev_dbg(dev, "Encoding on slot %d\n", ctx->slot);
                   ^
   include/linux/dev_printk.h:162:2: note: expanded from macro 'dev_dbg'
           if (0)                                                          \
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:986:3: note: Calling 
'mxc_jpeg_config_enc_desc'
                   mxc_jpeg_config_enc_desc(&dst_buf->vb2_buf, ctx,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:901:12: note: Calling 
'mxc_jpeg_fourcc_to_imgfmt'
           img_fmt = mxc_jpeg_fourcc_to_imgfmt(q_data->fmt->fourcc);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:402:2: note: Control jumps to 
the 'default' case at line 415
           switch (fourcc) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:416:3: note: Returning the 
value -1
                   return MXC_JPEG_INVALID;
                   ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:901:12: note: Returning from 
'mxc_jpeg_fourcc_to_imgfmt'
           img_fmt = mxc_jpeg_fourcc_to_imgfmt(q_data->fmt->fourcc);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:901:2: note: The value -1 is 
assigned to 'img_fmt'
           img_fmt = mxc_jpeg_fourcc_to_imgfmt(q_data->fmt->fourcc);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:902:6: note: 'img_fmt' is 
equal to MXC_JPEG_INVALID
           if (img_fmt == MXC_JPEG_INVALID)
               ^~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:902:2: note: Taking true 
branch
           if (img_fmt == MXC_JPEG_INVALID)
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:903:3: note: Loop condition 
is false.  Exiting loop
                   dev_err(jpeg->dev, "No valid image format detected\n");
                   ^
   include/linux/dev_printk.h:144:2: note: expanded from macro 'dev_err'
           dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), 
##__VA_ARGS__)
           ^
   include/linux/dev_printk.h:109:3: note: expanded from macro 
'dev_printk_index_wrap'
                   dev_printk_index_emit(level, fmt);                      \
                   ^
   include/linux/dev_printk.h:105:2: note: expanded from macro 
'dev_printk_index_emit'
           printk_index_subsys_emit("%s %s: ", level, fmt)
           ^
   include/linux/printk.h:413:2: note: expanded from macro 
'printk_index_subsys_emit'
           __printk_index_emit(fmt, level, subsys_fmt_prefix)
           ^
   include/linux/printk.h:392:34: note: expanded from macro 
'__printk_index_emit'
   #define __printk_index_emit(...) do {} while (0)
                                    ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:905:5: note: The result of 
the left shift is undefined because the left operand is negative
                            STM_CTRL_IMAGE_FORMAT(img_fmt);
                            ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h:84:52: note: expanded from 
macro 'STM_CTRL_IMAGE_FORMAT'
   #define STM_CTRL_IMAGE_FORMAT(img_fmt)          ((img_fmt) << 3)
                                                    ~~~~~~~~~ ^
>> drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1019:17: warning: Value 
>> stored to 'dev' during its initialization is never read 
>> [clang-analyzer-deadcode.DeadStores]
           struct device *dev = ctx->mxc_jpeg->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1019:17: note: Value stored 
to 'dev' during its initialization is never read
           struct device *dev = ctx->mxc_jpeg->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1046:17: warning: Value 
stored to 'dev' during its initialization is never read 
[clang-analyzer-deadcode.DeadStores]
           struct device *dev = ctx->mxc_jpeg->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1046:17: note: Value stored 
to 'dev' during its initialization is never read
           struct device *dev = ctx->mxc_jpeg->dev;
                          ^~~   ~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:7: warning: Branch 
>> condition evaluates to a garbage value 
>> [clang-analyzer-core.uninitialized.Branch]
                   if (!q->sizeimage[0])
                       ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1823:8: note: Calling 
'mxc_jpeg_try_fmt_vid_out'
           ret = mxc_jpeg_try_fmt_vid_out(file, priv, f);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1720:16: note: Assuming field 
'mode' is not equal to MXC_JPEG_ENCODE
           int q_type = (jpeg->mode == MXC_JPEG_ENCODE) ?
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1720:15: note: '?' condition 
is false
           int q_type = (jpeg->mode == MXC_JPEG_ENCODE) ?
                        ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Assuming field 
'type' is not equal to V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
           if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
                ^
   include/uapi/linux/videodev2.h:161:3: note: expanded from macro 
'V4L2_TYPE_IS_MULTIPLANAR'
           ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE   \
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Left side of 
'||' is false
           if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
                ^
   include/uapi/linux/videodev2.h:161:3: note: expanded from macro 
'V4L2_TYPE_IS_MULTIPLANAR'
           ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE   \
            ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Assuming field 
'type' is equal to V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
           if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
                ^
   include/uapi/linux/videodev2.h:162:6: note: expanded from macro 
'V4L2_TYPE_IS_MULTIPLANAR'
            || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:2: note: Taking false 
branch
           if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:7: note: 'fmt' is 
non-null
           if (!fmt || fmt->flags != q_type) {
                ^~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:6: note: Left side of 
'||' is false
           if (!fmt || fmt->flags != q_type) {
               ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:14: note: Assuming 
'q_type' is equal to field 'flags'
           if (!fmt || fmt->flags != q_type) {
                       ^~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:2: note: Taking false 
branch
           if (!fmt || fmt->flags != q_type) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1739:9: note: Calling 
'mxc_jpeg_try_fmt'
           return mxc_jpeg_try_fmt(f, fmt, ctx, q_type);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1615:11: note: Assuming field 
'width' is >= MXC_JPEG_MAX_WIDTH
           u32 w = (pix_mp->width < MXC_JPEG_MAX_WIDTH) ?
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1615:10: note: '?' condition 
is false
           u32 w = (pix_mp->width < MXC_JPEG_MAX_WIDTH) ?
                   ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1617:11: note: Assuming field 
'height' is >= MXC_JPEG_MAX_HEIGHT
           u32 h = (pix_mp->height < MXC_JPEG_MAX_HEIGHT) ?
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1617:10: note: '?' condition 
is false
           u32 h = (pix_mp->height < MXC_JPEG_MAX_HEIGHT) ?
                   ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:14: note: Assuming 'i' 
is >= field 'num_planes'
           for (i = 0; i < pix_mp->num_planes; i++) {
                       ^~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:2: note: Loop condition 
is false. Execution continues on line 1655
           for (i = 0; i < pix_mp->num_planes; i++) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1655:2: note: Calling 
'mxc_jpeg_bytesperline'
           mxc_jpeg_bytesperline(&tmp_q, 8);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1207:6: note: Assuming the 
condition is true
           if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1207:2: note: Taking true 
branch
           if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1655:2: note: Returning from 
'mxc_jpeg_bytesperline'
           mxc_jpeg_bytesperline(&tmp_q, 8);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1656:2: note: Calling 
'mxc_jpeg_sizeimage'
           mxc_jpeg_sizeimage(&tmp_q);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1229:2: note: Taking true 
branch
           if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:7: note: Branch 
condition evaluates to a garbage value
                   if (!q->sizeimage[0])
                       ^~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1522:17: warning: Value 
stored to 'dev' during its initialization is never read 
[clang-analyzer-deadcode.DeadStores]
           struct device *dev = mxc_jpeg->dev;
                          ^~~   ~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1522:17: note: Value stored 
to 'dev' during its initialization is never read
           struct device *dev = mxc_jpeg->dev;
                          ^~~   ~~~~~~~~~~~~~
>> drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1662:22: warning: Assigned 
>> value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
                   pfmt->bytesperline = tmp_q.bytesperline[i];
                                      ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1823:8: note: Calling 
'mxc_jpeg_try_fmt_vid_out'
           ret = mxc_jpeg_try_fmt_vid_out(file, priv, f);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1720:16: note: Assuming field 
'mode' is not equal to MXC_JPEG_ENCODE
           int q_type = (jpeg->mode == MXC_JPEG_ENCODE) ?
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1720:15: note: '?' condition 
is false
           int q_type = (jpeg->mode == MXC_JPEG_ENCODE) ?
                        ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Assuming field 
'type' is not equal to V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
           if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
                ^
   include/uapi/linux/videodev2.h:161:3: note: expanded from macro 
'V4L2_TYPE_IS_MULTIPLANAR'
           ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE   \
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Left side of 
'||' is false
           if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
                ^
   include/uapi/linux/videodev2.h:161:3: note: expanded from macro 
'V4L2_TYPE_IS_MULTIPLANAR'
           ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE   \
            ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:7: note: Assuming field 
'type' is equal to V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
           if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
                ^
   include/uapi/linux/videodev2.h:162:6: note: expanded from macro 
'V4L2_TYPE_IS_MULTIPLANAR'
            || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1723:2: note: Taking false 
branch
           if (!V4L2_TYPE_IS_MULTIPLANAR(f->type)) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:7: note: 'fmt' is 
non-null
           if (!fmt || fmt->flags != q_type) {
                ^~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:6: note: Left side of 
'||' is false
           if (!fmt || fmt->flags != q_type) {
               ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:14: note: Assuming 
'q_type' is equal to field 'flags'
           if (!fmt || fmt->flags != q_type) {
                       ^~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1729:2: note: Taking false 
branch
           if (!fmt || fmt->flags != q_type) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1739:9: note: Calling 
'mxc_jpeg_try_fmt'
           return mxc_jpeg_try_fmt(f, fmt, ctx, q_type);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1615:11: note: Assuming field 
'width' is >= MXC_JPEG_MAX_WIDTH
           u32 w = (pix_mp->width < MXC_JPEG_MAX_WIDTH) ?
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1615:10: note: '?' condition 
is false
           u32 w = (pix_mp->width < MXC_JPEG_MAX_WIDTH) ?
                   ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1617:11: note: Assuming field 
'height' is >= MXC_JPEG_MAX_HEIGHT
           u32 h = (pix_mp->height < MXC_JPEG_MAX_HEIGHT) ?
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1617:10: note: '?' condition 
is false
           u32 h = (pix_mp->height < MXC_JPEG_MAX_HEIGHT) ?
                   ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:14: note: Assuming 'i' 
is < field 'num_planes'
           for (i = 0; i < pix_mp->num_planes; i++) {
                       ^~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:2: note: Loop condition 
is true.  Entering loop body
           for (i = 0; i < pix_mp->num_planes; i++) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:14: note: Assuming 'i' 
is >= field 'num_planes'
           for (i = 0; i < pix_mp->num_planes; i++) {
                       ^~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1648:2: note: Loop condition 
is false. Execution continues on line 1655
           for (i = 0; i < pix_mp->num_planes; i++) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1655:2: note: Calling 
'mxc_jpeg_bytesperline'
           mxc_jpeg_bytesperline(&tmp_q, 8);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1207:6: note: Assuming the 
condition is true
           if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1207:2: note: Taking true 
branch
           if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1655:2: note: Returning from 
'mxc_jpeg_bytesperline'
           mxc_jpeg_bytesperline(&tmp_q, 8);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1656:2: note: Calling 
'mxc_jpeg_sizeimage'
           mxc_jpeg_sizeimage(&tmp_q);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1229:2: note: Taking true 
branch
           if (q->fmt->fourcc == V4L2_PIX_FMT_JPEG) {
           ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:7: note: Assuming the 
condition is false
                   if (!q->sizeimage[0])
                       ^~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1231:3: note: Taking false 
branch
                   if (!q->sizeimage[0])
                   ^
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1235:7: note: Assuming the 
condition is false
                   if (q->sizeimage[0] > MXC_JPEG_MAX_SIZEIMAGE)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:1235:3: note: Taking false 
branch
                   if (q->sizeimage[0] > MXC_JPEG_MAX_SIZEIMAGE)

vim +/dev +1019 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c

d8ebe298d008ccb drivers/media/platform/imx-jpeg/mxc-jpeg.c Ming Qian      
2022-02-22  1013  
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1014  static int mxc_jpeg_decoder_cmd(struct file *file, void *priv,
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1015                              struct v4l2_decoder_cmd *cmd)
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1016  {
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1017      struct v4l2_fh *fh = file->private_data;
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1018      struct mxc_jpeg_ctx *ctx = mxc_jpeg_fh_to_ctx(fh);
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11 @1019      struct device *dev = ctx->mxc_jpeg->dev;
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1020      int ret;
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1021  
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1022      ret = v4l2_m2m_ioctl_try_decoder_cmd(file, fh, cmd);
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1023      if (ret < 0)
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1024              return ret;
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1025  
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1026      if (cmd->cmd == V4L2_DEC_CMD_STOP) {
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1027              dev_dbg(dev, "Received V4L2_DEC_CMD_STOP");
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1028              if (v4l2_m2m_num_src_bufs_ready(fh->m2m_ctx) == 
0) {
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1029                      /* No more src bufs, notify app EOS */
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1030                      notify_eos(ctx);
d8ebe298d008ccb drivers/media/platform/imx-jpeg/mxc-jpeg.c Ming Qian      
2022-02-22  1031                      mxc_jpeg_set_last_buffer_dequeued(ctx);
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1032              } else {
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1033                      /* will send EOS later*/
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1034                      ctx->stopping = 1;
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1035              }
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1036      }
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1037  
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1038      return 0;
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1039  }
2db16c6ed72ce64 drivers/media/platform/imx-jpeg/mxc-jpeg.c Mirela Rabulea 
2021-03-11  1040  

:::::: The code at line 1019 was first introduced by commit
:::::: 2db16c6ed72ce644d5639b3ed15e5817442db4ba media: imx-jpeg: Add V4L2 
driver for i.MX8 JPEG Encoder/Decoder

:::::: TO: Mirela Rabulea <mirela.rabu...@nxp.com>
:::::: CC: Mauro Carvalho Chehab <mchehab+hua...@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to