[sailus-media-tree:devel 22/23] drivers/media/platform/atmel/atmel-isi.c:1075:22: error: call to undeclared function 'devm_kmemdup_array'; ISO C99 and later do not support implicit function declarations

[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: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20250311/202503110545.xrh6sBcJ-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250311/202503110545.xrh6sBcJ-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/202503110545.xrh6sBcJ-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/media/platform/atmel/atmel-isi.c:1075:22: error: call to undeclared function 'devm_kmemdup_array'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1075 |         isi->user_formats = devm_kmemdup_array(isi->dev, isi_fmts, num_fmts,
         |                             ^
>> drivers/media/platform/atmel/atmel-isi.c:1075:20: error: incompatible integer to pointer conversion assigning to 'const struct isi_format **' from 'int' [-Wint-conversion]
    1075 |         isi->user_formats = devm_kmemdup_array(isi->dev, isi_fmts, num_fmts,
         |                           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1076 |                                                sizeof(isi_fmts[0]), GFP_KERNEL);
         |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/devm_kmemdup_array +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