All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v6 10/14] media: Re-structure TI platform drivers
@ 2022-01-30 22:28 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-01-30 22:28 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 20809 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220121142904.4091481-11-p.yadav@ti.com>
References: <20220121142904.4091481-11-p.yadav@ti.com>
TO: Pratyush Yadav <p.yadav@ti.com>

Hi Pratyush,

I love your patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on robh/for-next linus/master v5.17-rc1 next-20220128]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Pratyush-Yadav/CSI2RX-support-on-J721E/20220121-223208
base:   git://linuxtv.org/media_tree.git master
:::::: branch date: 9 days ago
:::::: commit date: 9 days ago
config: riscv-randconfig-c006-20220125 (https://download.01.org/0day-ci/archive/20220131/202201310557.YHxquGd1-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f32dccb9a43b02ce4e540d6ba5dbbdb188f2dc7d)
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://github.com/0day-ci/linux/commit/3e49ebcb767893f74b04baf777762343d75d36b4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Pratyush-Yadav/CSI2RX-support-on-J721E/20220121-223208
        git checkout 3e49ebcb767893f74b04baf777762343d75d36b4
        # save the config file 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/mux/mmio.c:47:2: note: Taking false branch
           if (of_device_is_compatible(np, "mmio-mux"))
           ^
   drivers/mux/mmio.c:50:12: note: '?' condition is true
                   regmap = dev_get_regmap(dev->parent, NULL) ?: ERR_PTR(-ENODEV);
                            ^
   drivers/mux/mmio.c:51:6: note: Calling 'IS_ERR'
           if (IS_ERR(regmap)) {
               ^~~~~~~~~~~~~~
   include/linux/err.h:36:9: note: Assuming the condition is false
           return IS_ERR_VALUE((unsigned long)ptr);
                  ^
   include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
   #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
           return IS_ERR_VALUE((unsigned long)ptr);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mux/mmio.c:51:6: note: Returning from 'IS_ERR'
           if (IS_ERR(regmap)) {
               ^~~~~~~~~~~~~~
   drivers/mux/mmio.c:51:2: note: Taking false branch
           if (IS_ERR(regmap)) {
           ^
   drivers/mux/mmio.c:58:6: note: Assuming 'ret' is not equal to 0
           if (ret == 0 || ret % 2)
               ^~~~~~~~
   drivers/mux/mmio.c:58:6: note: Left side of '||' is false
   drivers/mux/mmio.c:58:18: note: Assuming the condition is false
           if (ret == 0 || ret % 2)
                           ^~~~~~~
   drivers/mux/mmio.c:58:2: note: Taking false branch
           if (ret == 0 || ret % 2)
           ^
   drivers/mux/mmio.c:60:6: note: Assuming 'ret' is >= 0
           if (ret < 0) {
               ^~~~~~~
   drivers/mux/mmio.c:60:2: note: Taking false branch
           if (ret < 0) {
           ^
   drivers/mux/mmio.c:69:6: note: Calling 'IS_ERR'
           if (IS_ERR(mux_chip))
               ^~~~~~~~~~~~~~~~
   include/linux/err.h:36:9: note: Assuming the condition is false
           return IS_ERR_VALUE((unsigned long)ptr);
                  ^
   include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
   #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
           return IS_ERR_VALUE((unsigned long)ptr);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mux/mmio.c:69:6: note: Returning from 'IS_ERR'
           if (IS_ERR(mux_chip))
               ^~~~~~~~~~~~~~~~
   drivers/mux/mmio.c:69:2: note: Taking false branch
           if (IS_ERR(mux_chip))
           ^
   drivers/mux/mmio.c:74:14: note: Assuming 'i' is < 'num_fields'
           for (i = 0; i < num_fields; i++) {
                       ^~~~~~~~~~~~~~
   drivers/mux/mmio.c:74:2: note: Loop condition is true.  Entering loop body
           for (i = 0; i < num_fields; i++) {
           ^
   drivers/mux/mmio.c:76:3: note: 'field' initialized here
                   struct reg_field field;
                   ^~~~~~~~~~~~~~~~~~~~~~
   drivers/mux/mmio.c:83:7: note: Assuming 'ret' is 0
                   if (!ret)
                       ^~~~
   drivers/mux/mmio.c:83:3: note: Taking true branch
                   if (!ret)
                   ^
   drivers/mux/mmio.c:86:7: note: Assuming 'ret' is >= 0
                   if (ret < 0) {
                       ^~~~~~~
   drivers/mux/mmio.c:86:3: note: Taking false branch
                   if (ret < 0) {
                   ^
   drivers/mux/mmio.c:96:7: note: Assuming the condition is false
                   if (mask != GENMASK(field.msb, field.lsb)) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mux/mmio.c:96:3: note: Taking false branch
                   if (mask != GENMASK(field.msb, field.lsb)) {
                   ^
   drivers/mux/mmio.c:102:15: note: Passed-by-value struct argument contains uninitialized data (e.g., field: 'id_size')
                   fields[i] = devm_regmap_field_alloc(dev, regmap, field);
                               ^                                    ~~~~~
   Suppressed 2 warnings (2 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   4 warnings generated.
>> drivers/media/platform/ti/cal/cal-video.c:213:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = 0;
           ^     ~
   drivers/media/platform/ti/cal/cal-video.c:213:2: note: Value stored to 'ret' is never read
           ret = 0;
           ^     ~
   Suppressed 3 warnings (3 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.
   5 warnings generated.
   drivers/media/platform/ti/vpe/vpe.c:2589:2: warning: Value stored to 'func' is never read [clang-analyzer-deadcode.DeadStores]
           func = read_field_reg(dev, VPE_PID, VPE_PID_FUNC_MASK,
           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:2589:2: note: Value stored to 'func' is never read
           func = read_field_reg(dev, VPE_PID, VPE_PID_FUNC_MASK,
           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult]
           return 1UL << fls_long(n - 1);
                      ^
   drivers/media/platform/ti/vpe/vpe.c:1788:8: note: Calling 'vpe_try_fmt'
           ret = vpe_try_fmt(file, priv, f);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_OUTPUT
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:166:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE         \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_OVERLAY
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:167:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY               \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:168:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY        \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VBI_OUTPUT
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:169:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_VBI_OUTPUT                  \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:170:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT           \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_SDR_OUTPUT
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:171:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_SDR_OUTPUT                  \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))

vim +/ret +213 drivers/media/platform/ti/cal/cal-video.c

9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  191  
e6a800d63a1239 drivers/media/platform/ti-vpe/cal-video.c Tomi Valkeinen   2021-06-14  192  static int cal_legacy_try_fmt_vid_cap(struct file *file, void *priv,
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  193  				      struct v4l2_format *f)
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  194  {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  195  	struct cal_ctx *ctx = video_drvdata(file);
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  196  	const struct cal_format_info *fmtinfo;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  197  	struct v4l2_subdev_frame_size_enum fse;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  198  	int ret, found;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  199  
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  200  	fmtinfo = find_format_by_pix(ctx, f->fmt.pix.pixelformat);
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  201  	if (!fmtinfo) {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  202  		ctx_dbg(3, ctx, "Fourcc format (0x%08x) not found.\n",
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  203  			f->fmt.pix.pixelformat);
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  204  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  205  		/* Just get the first one enumerated */
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  206  		fmtinfo = ctx->active_fmt[0];
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  207  		f->fmt.pix.pixelformat = fmtinfo->fourcc;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  208  	}
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  209  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  210  	f->fmt.pix.field = ctx->v_fmt.fmt.pix.field;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  211  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  212  	/* check for/find a valid width/height */
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06 @213  	ret = 0;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  214  	found = false;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  215  	fse.pad = 0;
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  216  	fse.code = fmtinfo->code;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  217  	fse.which = V4L2_SUBDEV_FORMAT_ACTIVE;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  218  	for (fse.index = 0; ; fse.index++) {
27f86b9bff79e1 drivers/media/platform/ti-vpe/cal-video.c Tomi Valkeinen   2021-06-14  219  		ret = v4l2_subdev_call(ctx->phy->source, pad, enum_frame_size,
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  220  				       NULL, &fse);
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  221  		if (ret)
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  222  			break;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  223  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  224  		if ((f->fmt.pix.width == fse.max_width) &&
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  225  		    (f->fmt.pix.height == fse.max_height)) {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  226  			found = true;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  227  			break;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  228  		} else if ((f->fmt.pix.width >= fse.min_width) &&
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  229  			 (f->fmt.pix.width <= fse.max_width) &&
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  230  			 (f->fmt.pix.height >= fse.min_height) &&
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  231  			 (f->fmt.pix.height <= fse.max_height)) {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  232  			found = true;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  233  			break;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  234  		}
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  235  	}
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  236  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  237  	if (!found) {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  238  		/* use existing values as default */
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  239  		f->fmt.pix.width = ctx->v_fmt.fmt.pix.width;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  240  		f->fmt.pix.height =  ctx->v_fmt.fmt.pix.height;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  241  	}
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  242  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  243  	/*
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  244  	 * Use current colorspace for now, it will get
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  245  	 * updated properly during s_fmt
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  246  	 */
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  247  	f->fmt.pix.colorspace = ctx->v_fmt.fmt.pix.colorspace;
455466400c4164 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  248  	cal_calc_format_size(ctx, fmtinfo, f);
455466400c4164 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  249  	return 0;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  250  }
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  251  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v6 10/14] media: Re-structure TI platform drivers
@ 2022-01-29 12:37 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-01-29 12:37 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 22615 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220121142904.4091481-11-p.yadav@ti.com>
References: <20220121142904.4091481-11-p.yadav@ti.com>
TO: Pratyush Yadav <p.yadav@ti.com>

Hi Pratyush,

I love your patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on robh/for-next linus/master v5.17-rc1 next-20220128]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Pratyush-Yadav/CSI2RX-support-on-J721E/20220121-223208
base:   git://linuxtv.org/media_tree.git master
:::::: branch date: 8 days ago
:::::: commit date: 8 days ago
config: riscv-randconfig-c006-20220125 (https://download.01.org/0day-ci/archive/20220129/202201292035.IqhSdC31-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f32dccb9a43b02ce4e540d6ba5dbbdb188f2dc7d)
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://github.com/0day-ci/linux/commit/3e49ebcb767893f74b04baf777762343d75d36b4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Pratyush-Yadav/CSI2RX-support-on-J721E/20220121-223208
        git checkout 3e49ebcb767893f74b04baf777762343d75d36b4
        # save the config file 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 >>)
   Suppressed 3 warnings (3 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.
   4 warnings generated.
   drivers/media/dvb-frontends/bcm3510.c:818:7: warning: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret' [clang-analyzer-deadcode.DeadStores]
           if ((ret = bcm3510_readB(state,0xe0,&v)) < 0)
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/bcm3510.c:818:7: note: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret'
           if ((ret = bcm3510_readB(state,0xe0,&v)) < 0)
                ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   4 warnings generated.
   drivers/media/dvb-frontends/cx24123.c:518:2: warning: Value stored to 'vco_div' is never read [clang-analyzer-deadcode.DeadStores]
           vco_div = cx24123_bandselect_vals[0].VCOdivider;
           ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/cx24123.c:518:2: note: Value stored to 'vco_div' is never read
           vco_div = cx24123_bandselect_vals[0].VCOdivider;
           ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 3 warnings (3 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   2 warnings generated.
   Suppressed 2 warnings (2 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   2 warnings generated.
   Suppressed 2 warnings (2 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.
   2 warnings generated.
   Suppressed 2 warnings (2 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/gpu/drm/amd/amdgpu/amdgpu_i2c.c:73:2: warning: Value stored to 'temp' is never read [clang-analyzer-deadcode.DeadStores]
           temp = RREG32(rec->mask_clk_reg);
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:73:2: note: Value stored to 'temp' is never read
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:77:2: warning: Value stored to 'temp' is never read [clang-analyzer-deadcode.DeadStores]
           temp = RREG32(rec->mask_data_reg);
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:77:2: note: Value stored to 'temp' is never read
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:92:2: warning: Value stored to 'temp' is never read [clang-analyzer-deadcode.DeadStores]
           temp = RREG32(rec->mask_clk_reg);
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:92:2: note: Value stored to 'temp' is never read
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:96:2: warning: Value stored to 'temp' is never read [clang-analyzer-deadcode.DeadStores]
           temp = RREG32(rec->mask_data_reg);
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:96:2: note: Value stored to 'temp' is never read
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:312:3: warning: 4th function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
                   DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n",
                   ^
   include/drm/drm_print.h:526:2: note: expanded from macro 'DRM_DEBUG'
           __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:371:2: note: 'val' declared without an initial value
           u8 val;
           ^~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:373:6: note: Assuming field 'cd_valid' is true
           if (!amdgpu_connector->router.cd_valid)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:373:2: note: Taking false branch
           if (!amdgpu_connector->router.cd_valid)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:376:6: note: Assuming field 'router_bus' is non-null
           if (!amdgpu_connector->router_bus)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:376:2: note: Taking false branch
           if (!amdgpu_connector->router_bus)
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:379:2: note: Calling 'amdgpu_i2c_get_byte'
           amdgpu_i2c_get_byte(amdgpu_connector->router_bus,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:308:6: note: Assuming the condition is false
           if (i2c_transfer(&i2c_bus->adapter, msgs, 2) == 2) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:308:2: note: Taking false branch
           if (i2c_transfer(&i2c_bus->adapter, msgs, 2) == 2) {
           ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c:312:3: note: 4th function call argument is an uninitialized value
                   DRM_DEBUG("i2c 0x%02x 0x%02x read failed\n",
                   ^
   include/drm/drm_print.h:526:2: note: expanded from macro 'DRM_DEBUG'
           __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
           ^                             ~~~~~~~~~~~
   Suppressed 4 warnings (4 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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   4 warnings generated.
>> drivers/media/platform/ti/cal/cal-video.c:213:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = 0;
           ^     ~
   drivers/media/platform/ti/cal/cal-video.c:213:2: note: Value stored to 'ret' is never read
           ret = 0;
           ^     ~
   Suppressed 3 warnings (3 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.
   5 warnings generated.
   drivers/media/platform/ti/vpe/vpe.c:2589:2: warning: Value stored to 'func' is never read [clang-analyzer-deadcode.DeadStores]
           func = read_field_reg(dev, VPE_PID, VPE_PID_FUNC_MASK,
           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:2589:2: note: Value stored to 'func' is never read
           func = read_field_reg(dev, VPE_PID, VPE_PID_FUNC_MASK,
           ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/log2.h:57:13: warning: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long' [clang-analyzer-core.UndefinedBinaryOperatorResult]
           return 1UL << fls_long(n - 1);
                      ^
   drivers/media/platform/ti/vpe/vpe.c:1788:8: note: Calling 'vpe_try_fmt'
           ret = vpe_try_fmt(file, priv, f);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_OUTPUT
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:166:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE         \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_OVERLAY
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:167:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY               \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:168:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY        \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_VBI_OUTPUT
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:169:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_VBI_OUTPUT                  \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_SLICED_VBI_OUTPUT
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:170:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT           \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:165:3: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
           ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT                   \
            ^
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Assuming field 'type' is not equal to V4L2_BUF_TYPE_SDR_OUTPUT
           if (V4L2_TYPE_IS_OUTPUT(f->type))
               ^
   include/uapi/linux/videodev2.h:171:6: note: expanded from macro 'V4L2_TYPE_IS_OUTPUT'
            || (type) == V4L2_BUF_TYPE_SDR_OUTPUT                  \
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/ti/vpe/vpe.c:1725:6: note: Left side of '||' is false
           if (V4L2_TYPE_IS_OUTPUT(f->type))

vim +/ret +213 drivers/media/platform/ti/cal/cal-video.c

9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  191  
e6a800d63a1239 drivers/media/platform/ti-vpe/cal-video.c Tomi Valkeinen   2021-06-14  192  static int cal_legacy_try_fmt_vid_cap(struct file *file, void *priv,
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  193  				      struct v4l2_format *f)
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  194  {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  195  	struct cal_ctx *ctx = video_drvdata(file);
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  196  	const struct cal_format_info *fmtinfo;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  197  	struct v4l2_subdev_frame_size_enum fse;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  198  	int ret, found;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  199  
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  200  	fmtinfo = find_format_by_pix(ctx, f->fmt.pix.pixelformat);
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  201  	if (!fmtinfo) {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  202  		ctx_dbg(3, ctx, "Fourcc format (0x%08x) not found.\n",
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  203  			f->fmt.pix.pixelformat);
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  204  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  205  		/* Just get the first one enumerated */
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  206  		fmtinfo = ctx->active_fmt[0];
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  207  		f->fmt.pix.pixelformat = fmtinfo->fourcc;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  208  	}
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  209  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  210  	f->fmt.pix.field = ctx->v_fmt.fmt.pix.field;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  211  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  212  	/* check for/find a valid width/height */
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06 @213  	ret = 0;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  214  	found = false;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  215  	fse.pad = 0;
51e8c97df58fcf drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  216  	fse.code = fmtinfo->code;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  217  	fse.which = V4L2_SUBDEV_FORMAT_ACTIVE;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  218  	for (fse.index = 0; ; fse.index++) {
27f86b9bff79e1 drivers/media/platform/ti-vpe/cal-video.c Tomi Valkeinen   2021-06-14  219  		ret = v4l2_subdev_call(ctx->phy->source, pad, enum_frame_size,
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  220  				       NULL, &fse);
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  221  		if (ret)
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  222  			break;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  223  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  224  		if ((f->fmt.pix.width == fse.max_width) &&
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  225  		    (f->fmt.pix.height == fse.max_height)) {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  226  			found = true;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  227  			break;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  228  		} else if ((f->fmt.pix.width >= fse.min_width) &&
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  229  			 (f->fmt.pix.width <= fse.max_width) &&
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  230  			 (f->fmt.pix.height >= fse.min_height) &&
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  231  			 (f->fmt.pix.height <= fse.max_height)) {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  232  			found = true;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  233  			break;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  234  		}
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  235  	}
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  236  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  237  	if (!found) {
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  238  		/* use existing values as default */
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  239  		f->fmt.pix.width = ctx->v_fmt.fmt.pix.width;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  240  		f->fmt.pix.height =  ctx->v_fmt.fmt.pix.height;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  241  	}
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  242  
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  243  	/*
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  244  	 * Use current colorspace for now, it will get
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  245  	 * updated properly during s_fmt
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  246  	 */
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  247  	f->fmt.pix.colorspace = ctx->v_fmt.fmt.pix.colorspace;
455466400c4164 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  248  	cal_calc_format_size(ctx, fmtinfo, f);
455466400c4164 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-12-07  249  	return 0;
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  250  }
9d551891473e35 drivers/media/platform/ti-vpe/cal-video.c Laurent Pinchart 2020-07-06  251  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v6 10/14] media: Re-structure TI platform drivers
  2022-01-21 14:28 [PATCH v6 00/14] CSI2RX support on J721E Pratyush Yadav
@ 2022-01-21 14:29 ` Pratyush Yadav
  0 siblings, 0 replies; 3+ messages in thread
From: Pratyush Yadav @ 2022-01-21 14:29 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Pratyush Yadav, Laurent Pinchart, Nikhil Devshatwar,
	Tomi Valkeinen, Benoit Parrot, Maxime Ripard, Rob Herring,
	Sakari Ailus, Niklas Söderlund, devicetree, linux-kernel,
	linux-media

The ti-vpe/ sub-directory does not only contain the VPE-specific things.
It also contains the CAL driver, which is a completely different
subsystem. This is also not a good place to add new drivers for other TI
platforms since they will all get mixed up.

Separate the VPE and CAL parts into different sub-directories and rename
the ti-vpe/ sub-directory to ti/. This is now the place where new TI
platform drivers can be added.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

---
Compile tested only. There should be no functional change.

(no changes since v5)

Changes in v5:
- Add Laurent's R-by.

Changes in v3:
- Add Tomi's R-by.

Changes in v2:
- New in v2.

 MAINTAINERS                                              | 3 ++-
 drivers/media/platform/Makefile                          | 2 +-
 drivers/media/platform/ti/Makefile                       | 3 +++
 drivers/media/platform/ti/cal/Makefile                   | 3 +++
 drivers/media/platform/{ti-vpe => ti/cal}/cal-camerarx.c | 0
 drivers/media/platform/{ti-vpe => ti/cal}/cal-video.c    | 0
 drivers/media/platform/{ti-vpe => ti/cal}/cal.c          | 0
 drivers/media/platform/{ti-vpe => ti/cal}/cal.h          | 0
 drivers/media/platform/{ti-vpe => ti/cal}/cal_regs.h     | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/Makefile       | 4 ----
 drivers/media/platform/{ti-vpe => ti/vpe}/csc.c          | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/csc.h          | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/sc.c           | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/sc.h           | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/sc_coeff.h     | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/vpdma.c        | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/vpdma.h        | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/vpdma_priv.h   | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/vpe.c          | 0
 drivers/media/platform/{ti-vpe => ti/vpe}/vpe_regs.h     | 0
 20 files changed, 9 insertions(+), 6 deletions(-)
 create mode 100644 drivers/media/platform/ti/Makefile
 create mode 100644 drivers/media/platform/ti/cal/Makefile
 rename drivers/media/platform/{ti-vpe => ti/cal}/cal-camerarx.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/cal}/cal-video.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/cal}/cal.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/cal}/cal.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/cal}/cal_regs.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/Makefile (78%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/csc.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/csc.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/sc.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/sc.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/sc_coeff.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpdma.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpdma.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpdma_priv.h (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpe.c (100%)
 rename drivers/media/platform/{ti-vpe => ti/vpe}/vpe_regs.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 16bc8cdc1492..3b8fa4e5047f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19299,7 +19299,8 @@ W:	http://linuxtv.org/
 Q:	http://patchwork.linuxtv.org/project/linux-media/list/
 F:	Documentation/devicetree/bindings/media/ti,cal.yaml
 F:	Documentation/devicetree/bindings/media/ti,vpe.yaml
-F:	drivers/media/platform/ti-vpe/
+F:	drivers/media/platform/ti/cal/
+F:	drivers/media/platform/ti/vpe/
 
 TI WILINK WIRELESS DRIVERS
 L:	linux-wireless@vger.kernel.org
diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
index 19bcbced7382..ba9405ab2490 100644
--- a/drivers/media/platform/Makefile
+++ b/drivers/media/platform/Makefile
@@ -15,7 +15,7 @@ obj-$(CONFIG_VIDEO_PXA27x)	+= pxa_camera.o
 
 obj-$(CONFIG_VIDEO_VIU) += fsl-viu.o
 
-obj-y	+= ti-vpe/
+obj-y	+= ti/
 
 obj-$(CONFIG_VIDEO_MX2_EMMAPRP)		+= mx2_emmaprp.o
 obj-$(CONFIG_VIDEO_CODA)		+= coda/
diff --git a/drivers/media/platform/ti/Makefile b/drivers/media/platform/ti/Makefile
new file mode 100644
index 000000000000..bbc737ccbbea
--- /dev/null
+++ b/drivers/media/platform/ti/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-y += cal/
+obj-y += vpe/
diff --git a/drivers/media/platform/ti/cal/Makefile b/drivers/media/platform/ti/cal/Makefile
new file mode 100644
index 000000000000..45ac35585f0b
--- /dev/null
+++ b/drivers/media/platform/ti/cal/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_VIDEO_TI_CAL) += ti-cal.o
+ti-cal-y := cal.o cal-camerarx.o cal-video.o
diff --git a/drivers/media/platform/ti-vpe/cal-camerarx.c b/drivers/media/platform/ti/cal/cal-camerarx.c
similarity index 100%
rename from drivers/media/platform/ti-vpe/cal-camerarx.c
rename to drivers/media/platform/ti/cal/cal-camerarx.c
diff --git a/drivers/media/platform/ti-vpe/cal-video.c b/drivers/media/platform/ti/cal/cal-video.c
similarity index 100%
rename from drivers/media/platform/ti-vpe/cal-video.c
rename to drivers/media/platform/ti/cal/cal-video.c
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti/cal/cal.c
similarity index 100%
rename from drivers/media/platform/ti-vpe/cal.c
rename to drivers/media/platform/ti/cal/cal.c
diff --git a/drivers/media/platform/ti-vpe/cal.h b/drivers/media/platform/ti/cal/cal.h
similarity index 100%
rename from drivers/media/platform/ti-vpe/cal.h
rename to drivers/media/platform/ti/cal/cal.h
diff --git a/drivers/media/platform/ti-vpe/cal_regs.h b/drivers/media/platform/ti/cal/cal_regs.h
similarity index 100%
rename from drivers/media/platform/ti-vpe/cal_regs.h
rename to drivers/media/platform/ti/cal/cal_regs.h
diff --git a/drivers/media/platform/ti-vpe/Makefile b/drivers/media/platform/ti/vpe/Makefile
similarity index 78%
rename from drivers/media/platform/ti-vpe/Makefile
rename to drivers/media/platform/ti/vpe/Makefile
index ad624056e039..3fadfe084f87 100644
--- a/drivers/media/platform/ti-vpe/Makefile
+++ b/drivers/media/platform/ti/vpe/Makefile
@@ -10,7 +10,3 @@ ti-sc-y := sc.o
 ti-csc-y := csc.o
 
 ccflags-$(CONFIG_VIDEO_TI_VPE_DEBUG) += -DDEBUG
-
-obj-$(CONFIG_VIDEO_TI_CAL) += ti-cal.o
-
-ti-cal-y := cal.o cal-camerarx.o cal-video.o
diff --git a/drivers/media/platform/ti-vpe/csc.c b/drivers/media/platform/ti/vpe/csc.c
similarity index 100%
rename from drivers/media/platform/ti-vpe/csc.c
rename to drivers/media/platform/ti/vpe/csc.c
diff --git a/drivers/media/platform/ti-vpe/csc.h b/drivers/media/platform/ti/vpe/csc.h
similarity index 100%
rename from drivers/media/platform/ti-vpe/csc.h
rename to drivers/media/platform/ti/vpe/csc.h
diff --git a/drivers/media/platform/ti-vpe/sc.c b/drivers/media/platform/ti/vpe/sc.c
similarity index 100%
rename from drivers/media/platform/ti-vpe/sc.c
rename to drivers/media/platform/ti/vpe/sc.c
diff --git a/drivers/media/platform/ti-vpe/sc.h b/drivers/media/platform/ti/vpe/sc.h
similarity index 100%
rename from drivers/media/platform/ti-vpe/sc.h
rename to drivers/media/platform/ti/vpe/sc.h
diff --git a/drivers/media/platform/ti-vpe/sc_coeff.h b/drivers/media/platform/ti/vpe/sc_coeff.h
similarity index 100%
rename from drivers/media/platform/ti-vpe/sc_coeff.h
rename to drivers/media/platform/ti/vpe/sc_coeff.h
diff --git a/drivers/media/platform/ti-vpe/vpdma.c b/drivers/media/platform/ti/vpe/vpdma.c
similarity index 100%
rename from drivers/media/platform/ti-vpe/vpdma.c
rename to drivers/media/platform/ti/vpe/vpdma.c
diff --git a/drivers/media/platform/ti-vpe/vpdma.h b/drivers/media/platform/ti/vpe/vpdma.h
similarity index 100%
rename from drivers/media/platform/ti-vpe/vpdma.h
rename to drivers/media/platform/ti/vpe/vpdma.h
diff --git a/drivers/media/platform/ti-vpe/vpdma_priv.h b/drivers/media/platform/ti/vpe/vpdma_priv.h
similarity index 100%
rename from drivers/media/platform/ti-vpe/vpdma_priv.h
rename to drivers/media/platform/ti/vpe/vpdma_priv.h
diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti/vpe/vpe.c
similarity index 100%
rename from drivers/media/platform/ti-vpe/vpe.c
rename to drivers/media/platform/ti/vpe/vpe.c
diff --git a/drivers/media/platform/ti-vpe/vpe_regs.h b/drivers/media/platform/ti/vpe/vpe_regs.h
similarity index 100%
rename from drivers/media/platform/ti-vpe/vpe_regs.h
rename to drivers/media/platform/ti/vpe/vpe_regs.h
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-30 22:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 22:28 [PATCH v6 10/14] media: Re-structure TI platform drivers kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-01-29 12:37 kernel test robot
2022-01-21 14:28 [PATCH v6 00/14] CSI2RX support on J721E Pratyush Yadav
2022-01-21 14:29 ` [PATCH v6 10/14] media: Re-structure TI platform drivers Pratyush Yadav

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.