[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208151308.69iCbGZv-lkp@intel.com>
Date: Mon, 15 Aug 2022 13:10:36 +0800
From: kernel test robot <lkp@...el.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans Verkuil <hverkuil@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org,
Mark-PK Tsai <mark-pk.tsai@...iatek.com>
Subject: [stable:linux-5.4.y 3701/4798]
drivers/media/platform/vim2m.c:1384:1: warning: label 'error_v4l2' defined
but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
head: de0cd3ea700d1e8ed76705d02e33b524cbb84cf3
commit: b7248281afb165ebd2f64dfd5ef4de3c5cc2a81f [3701/4798] media: vim2m: Register video device after setting up internals
config: x86_64-buildonly-randconfig-r002-20220815
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=b7248281afb165ebd2f64dfd5ef4de3c5cc2a81f
git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git fetch --no-tags stable linux-5.4.y
git checkout b7248281afb165ebd2f64dfd5ef4de3c5cc2a81f
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/media/platform/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/media/platform/vim2m.c: In function 'vim2m_probe':
>> drivers/media/platform/vim2m.c:1384:1: warning: label 'error_v4l2' defined but not used [-Wunused-label]
1384 | error_v4l2:
| ^~~~~~~~~~
At top level:
drivers/media/platform/vim2m.c:1309:38: warning: 'm2m_media_ops' defined but not used [-Wunused-const-variable=]
1309 | static const struct media_device_ops m2m_media_ops = {
| ^~~~~~~~~~~~~
vim +/error_v4l2 +1384 drivers/media/platform/vim2m.c
1313
1314 static int vim2m_probe(struct platform_device *pdev)
1315 {
1316 struct vim2m_dev *dev;
1317 struct video_device *vfd;
1318 int ret;
1319
1320 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
1321 if (!dev)
1322 return -ENOMEM;
1323
1324 ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
1325 if (ret)
1326 goto error_free;
1327
1328 atomic_set(&dev->num_inst, 0);
1329 mutex_init(&dev->dev_mutex);
1330
1331 dev->vfd = vim2m_videodev;
1332 vfd = &dev->vfd;
1333 vfd->lock = &dev->dev_mutex;
1334 vfd->v4l2_dev = &dev->v4l2_dev;
1335
1336 video_set_drvdata(vfd, dev);
1337 v4l2_info(&dev->v4l2_dev,
1338 "Device registered as /dev/video%d\n", vfd->num);
1339
1340 platform_set_drvdata(pdev, dev);
1341
1342 dev->m2m_dev = v4l2_m2m_init(&m2m_ops);
1343 if (IS_ERR(dev->m2m_dev)) {
1344 v4l2_err(&dev->v4l2_dev, "Failed to init mem2mem device\n");
1345 ret = PTR_ERR(dev->m2m_dev);
1346 dev->m2m_dev = NULL;
1347 goto error_dev;
1348 }
1349
1350 ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
1351 if (ret) {
1352 v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
1353 goto error_m2m;
1354 }
1355
1356 #ifdef CONFIG_MEDIA_CONTROLLER
1357 dev->mdev.dev = &pdev->dev;
1358 strscpy(dev->mdev.model, "vim2m", sizeof(dev->mdev.model));
1359 strscpy(dev->mdev.bus_info, "platform:vim2m",
1360 sizeof(dev->mdev.bus_info));
1361 media_device_init(&dev->mdev);
1362 dev->mdev.ops = &m2m_media_ops;
1363 dev->v4l2_dev.mdev = &dev->mdev;
1364
1365 ret = v4l2_m2m_register_media_controller(dev->m2m_dev, vfd,
1366 MEDIA_ENT_F_PROC_VIDEO_SCALER);
1367 if (ret) {
1368 v4l2_err(&dev->v4l2_dev, "Failed to init mem2mem media controller\n");
1369 goto error_v4l2;
1370 }
1371
1372 ret = media_device_register(&dev->mdev);
1373 if (ret) {
1374 v4l2_err(&dev->v4l2_dev, "Failed to register mem2mem media device\n");
1375 goto error_m2m_mc;
1376 }
1377 #endif
1378 return 0;
1379
1380 #ifdef CONFIG_MEDIA_CONTROLLER
1381 error_m2m_mc:
1382 v4l2_m2m_unregister_media_controller(dev->m2m_dev);
1383 #endif
> 1384 error_v4l2:
1385 video_unregister_device(&dev->vfd);
1386 /* vim2m_device_release called by video_unregister_device to release various objects */
1387 return ret;
1388 error_m2m:
1389 v4l2_m2m_release(dev->m2m_dev);
1390 error_dev:
1391 v4l2_device_unregister(&dev->v4l2_dev);
1392 error_free:
1393 kfree(dev);
1394
1395 return ret;
1396 }
1397
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (106874 bytes)
Powered by blists - more mailing lists