[sailus-media-tree:devel 22/23] drivers/media/platform/atmel/atmel-isi.c:1075:27: warning: assignment to 'const struct isi_format **' from 'int' makes pointer from integer without a cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://linuxtv.org/sailus/media_tree.git devel
head:   07e07f2cd3ebb7e8b62ccb8f22a16032b599c9e2
commit: 93c8dabd1d1ed94f03eb9a63c0bc291b62595bda [22/23] media: atmel-isi: use devm_kmemdup_array()
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20250311/202503110526.P3GrQ20d-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250311/202503110526.P3GrQ20d-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503110526.P3GrQ20d-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/media/platform/atmel/atmel-isi.c: In function 'isi_formats_init':
   drivers/media/platform/atmel/atmel-isi.c:1075:29: error: implicit declaration of function 'devm_kmemdup_array'; did you mean 'devm_kmalloc_array'? [-Werror=implicit-function-declaration]
    1075 |         isi->user_formats = devm_kmemdup_array(isi->dev, isi_fmts, num_fmts,
         |                             ^~~~~~~~~~~~~~~~~~
         |                             devm_kmalloc_array
>> drivers/media/platform/atmel/atmel-isi.c:1075:27: warning: assignment to 'const struct isi_format **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1075 |         isi->user_formats = devm_kmemdup_array(isi->dev, isi_fmts, num_fmts,
         |                           ^
   cc1: some warnings being treated as errors


vim +1075 drivers/media/platform/atmel/atmel-isi.c

  1043	
  1044	static int isi_formats_init(struct atmel_isi *isi)
  1045	{
  1046		const struct isi_format *isi_fmts[ARRAY_SIZE(isi_formats)];
  1047		unsigned int num_fmts = 0, i, j;
  1048		struct v4l2_subdev *subdev = isi->entity.subdev;
  1049		struct v4l2_subdev_mbus_code_enum mbus_code = {
  1050			.which = V4L2_SUBDEV_FORMAT_ACTIVE,
  1051		};
  1052	
  1053		while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
  1054					 NULL, &mbus_code)) {
  1055			for (i = 0; i < ARRAY_SIZE(isi_formats); i++) {
  1056				if (isi_formats[i].mbus_code != mbus_code.code)
  1057					continue;
  1058	
  1059				/* Code supported, have we got this fourcc yet? */
  1060				for (j = 0; j < num_fmts; j++)
  1061					if (isi_fmts[j]->fourcc == isi_formats[i].fourcc)
  1062						/* Already available */
  1063						break;
  1064				if (j == num_fmts)
  1065					/* new */
  1066					isi_fmts[num_fmts++] = isi_formats + i;
  1067			}
  1068			mbus_code.index++;
  1069		}
  1070	
  1071		if (!num_fmts)
  1072			return -ENXIO;
  1073	
  1074		isi->num_user_formats = num_fmts;
> 1075		isi->user_formats = devm_kmemdup_array(isi->dev, isi_fmts, num_fmts,
  1076						       sizeof(isi_fmts[0]), GFP_KERNEL);
  1077		if (!isi->user_formats)
  1078			return -ENOMEM;
  1079	
  1080		isi->current_fmt = isi->user_formats[0];
  1081		return 0;
  1082	}
  1083	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux