linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/gpu/drm/mediatek/mtk_dpi.c:721:2-9: line 721 is redundant because platform_get_irq() already prints an error (fwd)
@ 2020-07-12  8:15 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2020-07-12  8:15 UTC (permalink / raw)
  To: YueHaibing; +Cc: Greg Kroah-Hartman, Stephen Boyd, linux-kernel, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 7680 bytes --]



---------- Forwarded message ----------
Date: Sun, 12 Jul 2020 11:15:29 +0800
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Cc: lkp@intel.com, Julia Lawall <julia.lawall@lip6.fr>
Subject: drivers/gpu/drm/mediatek/mtk_dpi.c:721:2-9: line 721 is redundant
    because platform_get_irq() already prints an error

CC: kbuild-all@lists.01.org
CC: linux-kernel@vger.kernel.org
TO: YueHaibing <yuehaibing@huawei.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Stephen Boyd <swboyd@chromium.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0aea6d5c5be33ce94c16f9ab2f64de1f481f424b
commit: ca7ce5a2710ad2a57bf7d0c4c712590bb69a5e1c coccinelle: platform_get_irq: Fix parse error
date:   10 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 10 months ago
config: arm64-randconfig-c022-20200711 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/mediatek/mtk_dpi.c:721:2-9: line 721 is redundant because platform_get_irq() already prints an error
--
>> drivers/gpu/drm/mediatek/mtk_dsi.c:1159:2-9: line 1159 is redundant because platform_get_irq() already prints an error

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca7ce5a2710ad2a57bf7d0c4c712590bb69a5e1c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout ca7ce5a2710ad2a57bf7d0c4c712590bb69a5e1c
vim +721 drivers/gpu/drm/mediatek/mtk_dpi.c

d08b5ab972449b0 chunhui dai 2018-10-03  674
9e629c17aa8d7a7 Jie Qiu     2016-01-04  675  static int mtk_dpi_probe(struct platform_device *pdev)
9e629c17aa8d7a7 Jie Qiu     2016-01-04  676  {
9e629c17aa8d7a7 Jie Qiu     2016-01-04  677  	struct device *dev = &pdev->dev;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  678  	struct mtk_dpi *dpi;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  679  	struct resource *mem;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  680  	int comp_id;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  681  	int ret;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  682
9e629c17aa8d7a7 Jie Qiu     2016-01-04  683  	dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  684  	if (!dpi)
9e629c17aa8d7a7 Jie Qiu     2016-01-04  685  		return -ENOMEM;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  686
9e629c17aa8d7a7 Jie Qiu     2016-01-04  687  	dpi->dev = dev;
0ace4b993c7a524 chunhui dai 2018-10-03  688  	dpi->conf = (struct mtk_dpi_conf *)of_device_get_match_data(dev);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  689
9e629c17aa8d7a7 Jie Qiu     2016-01-04  690  	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  691  	dpi->regs = devm_ioremap_resource(dev, mem);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  692  	if (IS_ERR(dpi->regs)) {
9e629c17aa8d7a7 Jie Qiu     2016-01-04  693  		ret = PTR_ERR(dpi->regs);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  694  		dev_err(dev, "Failed to ioremap mem resource: %d\n", ret);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  695  		return ret;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  696  	}
9e629c17aa8d7a7 Jie Qiu     2016-01-04  697
9e629c17aa8d7a7 Jie Qiu     2016-01-04  698  	dpi->engine_clk = devm_clk_get(dev, "engine");
9e629c17aa8d7a7 Jie Qiu     2016-01-04  699  	if (IS_ERR(dpi->engine_clk)) {
9e629c17aa8d7a7 Jie Qiu     2016-01-04  700  		ret = PTR_ERR(dpi->engine_clk);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  701  		dev_err(dev, "Failed to get engine clock: %d\n", ret);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  702  		return ret;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  703  	}
9e629c17aa8d7a7 Jie Qiu     2016-01-04  704
9e629c17aa8d7a7 Jie Qiu     2016-01-04  705  	dpi->pixel_clk = devm_clk_get(dev, "pixel");
9e629c17aa8d7a7 Jie Qiu     2016-01-04  706  	if (IS_ERR(dpi->pixel_clk)) {
9e629c17aa8d7a7 Jie Qiu     2016-01-04  707  		ret = PTR_ERR(dpi->pixel_clk);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  708  		dev_err(dev, "Failed to get pixel clock: %d\n", ret);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  709  		return ret;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  710  	}
9e629c17aa8d7a7 Jie Qiu     2016-01-04  711
9e629c17aa8d7a7 Jie Qiu     2016-01-04  712  	dpi->tvd_clk = devm_clk_get(dev, "pll");
9e629c17aa8d7a7 Jie Qiu     2016-01-04  713  	if (IS_ERR(dpi->tvd_clk)) {
9e629c17aa8d7a7 Jie Qiu     2016-01-04  714  		ret = PTR_ERR(dpi->tvd_clk);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  715  		dev_err(dev, "Failed to get tvdpll clock: %d\n", ret);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  716  		return ret;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  717  	}
9e629c17aa8d7a7 Jie Qiu     2016-01-04  718
9e629c17aa8d7a7 Jie Qiu     2016-01-04  719  	dpi->irq = platform_get_irq(pdev, 0);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  720  	if (dpi->irq <= 0) {
9e629c17aa8d7a7 Jie Qiu     2016-01-04 @721  		dev_err(dev, "Failed to get irq: %d\n", dpi->irq);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  722  		return -EINVAL;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  723  	}
9e629c17aa8d7a7 Jie Qiu     2016-01-04  724
bcc97daee6b8120 chunhui dai 2018-10-03  725  	ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0,
bcc97daee6b8120 chunhui dai 2018-10-03  726  					  NULL, &dpi->bridge);
bcc97daee6b8120 chunhui dai 2018-10-03  727  	if (ret)
bcc97daee6b8120 chunhui dai 2018-10-03  728  		return ret;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  729
bcc97daee6b8120 chunhui dai 2018-10-03  730  	dev_info(dev, "Found bridge node: %pOF\n", dpi->bridge->of_node);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  731
9e629c17aa8d7a7 Jie Qiu     2016-01-04  732  	comp_id = mtk_ddp_comp_get_id(dev->of_node, MTK_DPI);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  733  	if (comp_id < 0) {
9e629c17aa8d7a7 Jie Qiu     2016-01-04  734  		dev_err(dev, "Failed to identify by alias: %d\n", comp_id);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  735  		return comp_id;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  736  	}
9e629c17aa8d7a7 Jie Qiu     2016-01-04  737
9e629c17aa8d7a7 Jie Qiu     2016-01-04  738  	ret = mtk_ddp_comp_init(dev, dev->of_node, &dpi->ddp_comp, comp_id,
9e629c17aa8d7a7 Jie Qiu     2016-01-04  739  				&mtk_dpi_funcs);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  740  	if (ret) {
9e629c17aa8d7a7 Jie Qiu     2016-01-04  741  		dev_err(dev, "Failed to initialize component: %d\n", ret);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  742  		return ret;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  743  	}
9e629c17aa8d7a7 Jie Qiu     2016-01-04  744
9e629c17aa8d7a7 Jie Qiu     2016-01-04  745  	platform_set_drvdata(pdev, dpi);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  746
9e629c17aa8d7a7 Jie Qiu     2016-01-04  747  	ret = component_add(dev, &mtk_dpi_component_ops);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  748  	if (ret) {
9e629c17aa8d7a7 Jie Qiu     2016-01-04  749  		dev_err(dev, "Failed to add component: %d\n", ret);
9e629c17aa8d7a7 Jie Qiu     2016-01-04  750  		return ret;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  751  	}
9e629c17aa8d7a7 Jie Qiu     2016-01-04  752
9e629c17aa8d7a7 Jie Qiu     2016-01-04  753  	return 0;
9e629c17aa8d7a7 Jie Qiu     2016-01-04  754  }
9e629c17aa8d7a7 Jie Qiu     2016-01-04  755

:::::: The code at line 721 was first introduced by commit
:::::: 9e629c17aa8d7a75b8c1d99ed42892cd8ba7cdc4 drm/mediatek: Add DPI sub driver

:::::: TO: Jie Qiu <jie.qiu@mediatek.com>
:::::: CC: Philipp Zabel <p.zabel@pengutronix.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: Type: application/gzip, Size: 33575 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-12  8:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-12  8:15 drivers/gpu/drm/mediatek/mtk_dpi.c:721:2-9: line 721 is redundant because platform_get_irq() already prints an error (fwd) Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).