Content-Type: multipart/mixed; boundary="===============2124588923979171612==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH] media: bdisp: Fix PM disable depth imbalance in bdisp_probe Date: Thu, 06 Jan 2022 06:27:18 +0800 Message-ID: <202201060603.USzesOiZ-lkp@intel.com> In-Reply-To: <20220105114108.10380-1-linmq006@gmail.com> List-Id: --===============2124588923979171612== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Miaoqian, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on v5.16-rc8] [also build test WARNING on next-20220105] [cannot apply to media-tree/master] [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/Miaoqian-Lin/media-bdisp-F= ix-PM-disable-depth-imbalance-in-bdisp_probe/20220105-194236 base: c9e6606c7fe92b50a02ce51dda82586ebdf99b48 config: riscv-randconfig-r022-20220105 (https://download.01.org/0day-ci/arc= hive/20220106/202201060603.USzesOiZ-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e3= 0ed3acad794dd0aec400e617daffc6cc3d) reproduce (this is a W=3D1 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/1dafbde5425a5766336413fbc= ab0bb191145da2e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Miaoqian-Lin/media-bdisp-Fix-PM-di= sable-depth-imbalance-in-bdisp_probe/20220105-194236 git checkout 1dafbde5425a5766336413fbcab0bb191145da2e # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Driscv SHELL=3D/bin/bash drivers/media/platform/sti/b= disp/ drivers/media/platform/sti/hva/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/media/platform/sti/bdisp/bdisp-v4l2.c:1399:1: warning: unused la= bel 'disable_pm_runtime' [-Wunused-label] disable_pm_runtime: ^~~~~~~~~~~~~~~~~~~ 1 warning generated. vim +/disable_pm_runtime +1399 drivers/media/platform/sti/bdisp/bdisp-v4l2.c 1283 = 1284 static int bdisp_probe(struct platform_device *pdev) 1285 { 1286 struct bdisp_dev *bdisp; 1287 struct resource *res; 1288 struct device *dev =3D &pdev->dev; 1289 int ret; 1290 = 1291 dev_dbg(dev, "%s\n", __func__); 1292 = 1293 bdisp =3D devm_kzalloc(dev, sizeof(struct bdisp_dev), GFP_KERNEL); 1294 if (!bdisp) 1295 return -ENOMEM; 1296 = 1297 ret =3D dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32)); 1298 if (ret) 1299 return ret; 1300 = 1301 bdisp->pdev =3D pdev; 1302 bdisp->dev =3D dev; 1303 platform_set_drvdata(pdev, bdisp); 1304 = 1305 if (dev->of_node) 1306 bdisp->id =3D of_alias_get_id(pdev->dev.of_node, BDISP_NAME); 1307 else 1308 bdisp->id =3D pdev->id; 1309 = 1310 init_waitqueue_head(&bdisp->irq_queue); 1311 INIT_DELAYED_WORK(&bdisp->timeout_work, bdisp_irq_timeout); 1312 bdisp->work_queue =3D create_workqueue(BDISP_NAME); 1313 = 1314 spin_lock_init(&bdisp->slock); 1315 mutex_init(&bdisp->lock); 1316 = 1317 /* get resources */ 1318 bdisp->regs =3D devm_platform_ioremap_resource(pdev, 0); 1319 if (IS_ERR(bdisp->regs)) { 1320 ret =3D PTR_ERR(bdisp->regs); 1321 goto err_wq; 1322 } 1323 = 1324 bdisp->clock =3D devm_clk_get(dev, BDISP_NAME); 1325 if (IS_ERR(bdisp->clock)) { 1326 dev_err(dev, "failed to get clock\n"); 1327 ret =3D PTR_ERR(bdisp->clock); 1328 goto err_wq; 1329 } 1330 = 1331 ret =3D clk_prepare(bdisp->clock); 1332 if (ret < 0) { 1333 dev_err(dev, "clock prepare failed\n"); 1334 bdisp->clock =3D ERR_PTR(-EINVAL); 1335 goto err_wq; 1336 } 1337 = 1338 res =3D platform_get_resource(pdev, IORESOURCE_IRQ, 0); 1339 if (!res) { 1340 dev_err(dev, "failed to get IRQ resource\n"); 1341 ret =3D -EINVAL; 1342 goto err_clk; 1343 } 1344 = 1345 ret =3D devm_request_threaded_irq(dev, res->start, bdisp_irq_handle= r, 1346 bdisp_irq_thread, IRQF_ONESHOT, 1347 pdev->name, bdisp); 1348 if (ret) { 1349 dev_err(dev, "failed to install irq\n"); 1350 goto err_clk; 1351 } 1352 = 1353 /* v4l2 register */ 1354 ret =3D v4l2_device_register(dev, &bdisp->v4l2_dev); 1355 if (ret) { 1356 dev_err(dev, "failed to register\n"); 1357 goto err_clk; 1358 } 1359 = 1360 /* Debug */ 1361 bdisp_debugfs_create(bdisp); 1362 = 1363 /* Power management */ 1364 pm_runtime_enable(dev); 1365 ret =3D pm_runtime_resume_and_get(dev); 1366 if (ret < 0) { 1367 dev_err(dev, "failed to set PM\n"); 1368 goto err_remove; 1369 } 1370 = 1371 /* Filters */ 1372 if (bdisp_hw_alloc_filters(bdisp->dev)) { 1373 dev_err(bdisp->dev, "no memory for filters\n"); 1374 ret =3D -ENOMEM; 1375 goto err_pm; 1376 } 1377 = 1378 /* Register */ 1379 ret =3D bdisp_register_device(bdisp); 1380 if (ret) { 1381 dev_err(dev, "failed to register\n"); 1382 goto err_filter; 1383 } 1384 = 1385 dev_info(dev, "%s%d registered as /dev/video%d\n", BDISP_NAME, 1386 bdisp->id, bdisp->vdev.num); 1387 = 1388 pm_runtime_put(dev); 1389 = 1390 return 0; 1391 = 1392 err_filter: 1393 bdisp_hw_free_filters(bdisp->dev); 1394 err_pm: 1395 pm_runtime_put(dev); 1396 err_remove: 1397 bdisp_debugfs_remove(bdisp); 1398 v4l2_device_unregister(&bdisp->v4l2_dev); > 1399 disable_pm_runtime: 1400 pm_runtime_disable(dev); 1401 err_clk: 1402 if (!IS_ERR(bdisp->clock)) 1403 clk_unprepare(bdisp->clock); 1404 err_wq: 1405 destroy_workqueue(bdisp->work_queue); 1406 return ret; 1407 } 1408 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============2124588923979171612==--