From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android11-5.4 1/1] drivers/media/platform/vim2m.c:1384:1: warning: label 'error_v4l2' defined but not used
Date: Fri, 17 Jan 2025 18:08:14 +0800 [thread overview]
Message-ID: <202501171847.rVCjwXoL-lkp@intel.com> (raw)
Hi Sakari,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android11-5.4
head: bf5b85fe246873efa65a9dc0631ad70c59eece6c
commit: b7248281afb165ebd2f64dfd5ef4de3c5cc2a81f [1/1] media: vim2m: Register video device after setting up internals
config: arm64-randconfig-002-20250117 (https://download.01.org/0day-ci/archive/20250117/202501171847.rVCjwXoL-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250117/202501171847.rVCjwXoL-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501171847.rVCjwXoL-lkp@intel.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:
| ^~~~~~~~~~
drivers/media/platform/vim2m.c: 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://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-01-17 10:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202501171847.rVCjwXoL-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.