lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1910010726101.4150@hadrien>
Date:   Tue, 1 Oct 2019 07:27:01 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Sam Ravnborg <sam@...nborg.org>
cc:     Inki Dae <inki.dae@...sung.com>, linux-kernel@...r.kernel.org,
        kbuild-all@...org
Subject: drivers/gpu/drm/exynos/exynos_drm_dsi.c:1796:2-9: line 1796 is
 redundant because platform_get_irq() already prints an error (fwd)



---------- Forwarded message ----------
Date: Tue, 1 Oct 2019 10:47:40 +0800
From: kbuild test robot <lkp@...el.com>
To: kbuild@...org
Cc: Julia Lawall <julia.lawall@...6.fr>
Subject: drivers/gpu/drm/exynos/exynos_drm_dsi.c:1796:2-9: line 1796 is
    redundant because platform_get_irq() already prints an error

CC: kbuild-all@...org
CC: linux-kernel@...r.kernel.org
TO: Sam Ravnborg <sam@...nborg.org>
CC: Inki Dae <inki.dae@...sung.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c
commit: 156bdac99061b4013c8e47799c6e574f7f84e9f4 drm/exynos: trigger build of all modules
date:   3 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 3 months ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
Reported-by: Julia Lawall <julia.lawall@...6.fr>

>> drivers/gpu/drm/exynos/exynos_drm_dsi.c:1796:2-9: line 1796 is redundant because platform_get_irq() already prints an error

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=156bdac99061b4013c8e47799c6e574f7f84e9f4
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 156bdac99061b4013c8e47799c6e574f7f84e9f4
vim +1796 drivers/gpu/drm/exynos/exynos_drm_dsi.c

f37cd5e8098441 Inki Dae         2014-05-09  1722
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1723  static int exynos_dsi_probe(struct platform_device *pdev)
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1724  {
2900c69c52079a Andrzej Hajda    2014-10-07  1725  	struct device *dev = &pdev->dev;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1726  	struct resource *res;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1727  	struct exynos_dsi *dsi;
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1728  	int ret, i;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1729
2900c69c52079a Andrzej Hajda    2014-10-07  1730  	dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
2900c69c52079a Andrzej Hajda    2014-10-07  1731  	if (!dsi)
2900c69c52079a Andrzej Hajda    2014-10-07  1732  		return -ENOMEM;
2900c69c52079a Andrzej Hajda    2014-10-07  1733
e17ddecc3aa519 YoungJun Cho     2014-07-22  1734  	/* To be checked as invalid one */
e17ddecc3aa519 YoungJun Cho     2014-07-22  1735  	dsi->te_gpio = -ENOENT;
e17ddecc3aa519 YoungJun Cho     2014-07-22  1736
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1737  	init_completion(&dsi->completed);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1738  	spin_lock_init(&dsi->transfer_lock);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1739  	INIT_LIST_HEAD(&dsi->transfer_list);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1740
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1741  	dsi->dsi_host.ops = &exynos_dsi_ops;
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1742  	dsi->dsi_host.dev = dev;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1743
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1744  	dsi->dev = dev;
2154ac9229c10f Marek Szyprowski 2016-04-19  1745  	dsi->driver_data = of_device_get_match_data(dev);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1746
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1747  	ret = exynos_dsi_parse_dt(dsi);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1748  	if (ret)
8665040850e3cb Andrzej Hajda    2015-06-11  1749  		return ret;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1750
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1751  	dsi->supplies[0].supply = "vddcore";
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1752  	dsi->supplies[1].supply = "vddio";
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1753  	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(dsi->supplies),
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1754  				      dsi->supplies);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1755  	if (ret) {
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1756  		dev_info(dev, "failed to get regulators: %d\n", ret);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1757  		return -EPROBE_DEFER;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1758  	}
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1759
a86854d0c599b3 Kees Cook        2018-06-12  1760  	dsi->clks = devm_kcalloc(dev,
a86854d0c599b3 Kees Cook        2018-06-12  1761  			dsi->driver_data->num_clks, sizeof(*dsi->clks),
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1762  			GFP_KERNEL);
e6f988a4585762 Hyungwon Hwang   2015-06-12  1763  	if (!dsi->clks)
e6f988a4585762 Hyungwon Hwang   2015-06-12  1764  		return -ENOMEM;
e6f988a4585762 Hyungwon Hwang   2015-06-12  1765
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1766  	for (i = 0; i < dsi->driver_data->num_clks; i++) {
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1767  		dsi->clks[i] = devm_clk_get(dev, clk_names[i]);
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1768  		if (IS_ERR(dsi->clks[i])) {
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1769  			if (strcmp(clk_names[i], "sclk_mipi") == 0) {
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1770  				strcpy(clk_names[i], OLD_SCLK_MIPI_CLK_NAME);
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1771  				i--;
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1772  				continue;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1773  			}
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1774
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1775  			dev_info(dev, "failed to get the clock: %s\n",
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1776  					clk_names[i]);
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1777  			return PTR_ERR(dsi->clks[i]);
0ff03fd164a4f2 Hyungwon Hwang   2015-06-12  1778  		}
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1779  	}
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1780
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1781  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1782  	dsi->reg_base = devm_ioremap_resource(dev, res);
293d3f6a707046 Jingoo Han       2014-04-17  1783  	if (IS_ERR(dsi->reg_base)) {
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1784  		dev_err(dev, "failed to remap io region\n");
8665040850e3cb Andrzej Hajda    2015-06-11  1785  		return PTR_ERR(dsi->reg_base);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1786  	}
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1787
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1788  	dsi->phy = devm_phy_get(dev, "dsim");
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1789  	if (IS_ERR(dsi->phy)) {
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1790  		dev_info(dev, "failed to get dsim phy\n");
8665040850e3cb Andrzej Hajda    2015-06-11  1791  		return PTR_ERR(dsi->phy);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1792  	}
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1793
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1794  	dsi->irq = platform_get_irq(pdev, 0);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1795  	if (dsi->irq < 0) {
e2d2a1e0a26472 Andrzej Hajda    2014-10-07 @1796  		dev_err(dev, "failed to request dsi irq resource\n");
8665040850e3cb Andrzej Hajda    2015-06-11  1797  		return dsi->irq;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1798  	}
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1799
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1800  	irq_set_status_flags(dsi->irq, IRQ_NOAUTOEN);
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1801  	ret = devm_request_threaded_irq(dev, dsi->irq, NULL,
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1802  					exynos_dsi_irq, IRQF_ONESHOT,
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1803  					dev_name(dev), dsi);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1804  	if (ret) {
e2d2a1e0a26472 Andrzej Hajda    2014-10-07  1805  		dev_err(dev, "failed to request dsi irq\n");
8665040850e3cb Andrzej Hajda    2015-06-11  1806  		return ret;
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1807  	}
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1808
cf67cc9a29ac19 Gustavo Padovan  2015-08-11  1809  	platform_set_drvdata(pdev, &dsi->encoder);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1810
ba6e47795d836e Inki Dae         2015-11-16  1811  	pm_runtime_enable(dev);
ba6e47795d836e Inki Dae         2015-11-16  1812
8665040850e3cb Andrzej Hajda    2015-06-11  1813  	return component_add(dev, &exynos_dsi_component_ops);
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1814  }
7eb8f069be8a03 Andrzej Hajda    2014-04-04  1815

:::::: The code at line 1796 was first introduced by commit
:::::: e2d2a1e0a264725fd0a62b91422d33ba2263a341 drm/exynos: dsi: simplify device pointer evaluation

:::::: TO: Andrzej Hajda <a.hajda@...sung.com>
:::::: CC: Inki Dae <inki.dae@...sung.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ