public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Michael Tretter <m.tretter@pengutronix.de>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Lucas Stach <l.stach@pengutronix.de>
Subject: [lst:imx8m-power-domains-testing 45/59] drivers/gpu/drm/bridge/samsung-dsim.c:1645:27: sparse: sparse: incorrect type in return expression (different address spaces)
Date: Tue, 27 Jul 2021 21:58:58 +0800	[thread overview]
Message-ID: <202107272155.NIUD6Ea3-lkp@intel.com> (raw)

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

tree:   https://git.pengutronix.de/git/lst/linux imx8m-power-domains-testing
head:   04dfc10d25aeabc145b3aca759efd7f3cdd9f8df
commit: de94e301c2f26f15ba31d7667b48506a56ab532d [45/59] drm/exynos: move bridge driver to bridges
config: xtensa-randconfig-s032-20210722 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 10.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        git remote add lst https://git.pengutronix.de/git/lst/linux
        git fetch --no-tags lst imx8m-power-domains-testing
        git checkout de94e301c2f26f15ba31d7667b48506a56ab532d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=xtensa 

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


sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/bridge/samsung-dsim.c:1645:27: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected struct samsung_dsim * @@     got void [noderef] __iomem *reg_base @@
   drivers/gpu/drm/bridge/samsung-dsim.c:1645:27: sparse:     expected struct samsung_dsim *
   drivers/gpu/drm/bridge/samsung-dsim.c:1645:27: sparse:     got void [noderef] __iomem *reg_base

vim +1645 drivers/gpu/drm/bridge/samsung-dsim.c

  1582	
  1583	static struct samsung_dsim *__samsung_dsim_probe(struct platform_device *pdev)
  1584	{
  1585		struct device *dev = &pdev->dev;
  1586		struct drm_bridge *bridge;
  1587		struct resource *res;
  1588		struct samsung_dsim *dsi;
  1589		int ret, i;
  1590	
  1591		dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
  1592		if (!dsi)
  1593			return ERR_PTR(-ENOMEM);
  1594	
  1595		/* To be checked as invalid one */
  1596		dsi->te_gpio = -ENOENT;
  1597	
  1598		init_completion(&dsi->completed);
  1599		spin_lock_init(&dsi->transfer_lock);
  1600		INIT_LIST_HEAD(&dsi->transfer_list);
  1601		INIT_LIST_HEAD(&dsi->bridge_chain);
  1602	
  1603		dsi->dsi_host.ops = &samsung_dsim_ops;
  1604		dsi->dsi_host.dev = dev;
  1605	
  1606		dsi->dev = dev;
  1607		dsi->driver_data = of_device_get_match_data(dev);
  1608	
  1609		dsi->supplies[0].supply = "vddcore";
  1610		dsi->supplies[1].supply = "vddio";
  1611		ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(dsi->supplies),
  1612					      dsi->supplies);
  1613		if (ret) {
  1614			if (ret != -EPROBE_DEFER)
  1615				dev_info(dev, "failed to get regulators: %d\n", ret);
  1616			return ERR_PTR(ret);
  1617		}
  1618	
  1619		dsi->clks = devm_kcalloc(dev,
  1620				dsi->driver_data->num_clks, sizeof(*dsi->clks),
  1621				GFP_KERNEL);
  1622		if (!dsi->clks)
  1623			return ERR_PTR(-ENOMEM);
  1624	
  1625		for (i = 0; i < dsi->driver_data->num_clks; i++) {
  1626			dsi->clks[i] = devm_clk_get(dev, clk_names[i]);
  1627			if (IS_ERR(dsi->clks[i])) {
  1628				if (strcmp(clk_names[i], "sclk_mipi") == 0) {
  1629					dsi->clks[i] = devm_clk_get(dev,
  1630								OLD_SCLK_MIPI_CLK_NAME);
  1631					if (!IS_ERR(dsi->clks[i]))
  1632						continue;
  1633				}
  1634	
  1635				dev_info(dev, "failed to get the clock: %s\n",
  1636						clk_names[i]);
  1637				return ERR_PTR(PTR_ERR(dsi->clks[i]));
  1638			}
  1639		}
  1640	
  1641		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  1642		dsi->reg_base = devm_ioremap_resource(dev, res);
  1643		if (IS_ERR(dsi->reg_base)) {
  1644			dev_err(dev, "failed to remap io region\n");
> 1645			return dsi->reg_base;
  1646		}
  1647	
  1648		dsi->phy = devm_phy_get(dev, "dsim");
  1649		if (IS_ERR(dsi->phy)) {
  1650			dev_info(dev, "failed to get dsim phy\n");
  1651			return ERR_PTR(PTR_ERR(dsi->phy));
  1652		}
  1653	
  1654		dsi->irq = platform_get_irq(pdev, 0);
  1655		if (dsi->irq < 0)
  1656			return ERR_PTR(dsi->irq);
  1657	
  1658		irq_set_status_flags(dsi->irq, IRQ_NOAUTOEN);
  1659		ret = devm_request_threaded_irq(dev, dsi->irq, NULL,
  1660						samsung_dsim_irq, IRQF_ONESHOT,
  1661						dev_name(dev), dsi);
  1662		if (ret) {
  1663			dev_err(dev, "failed to request dsi irq\n");
  1664			return ERR_PTR(ret);
  1665		}
  1666	
  1667		ret = samsung_dsim_parse_dt(dsi);
  1668		if (ret)
  1669			return ERR_PTR(ret);
  1670	
  1671		ret = mipi_dsi_host_register(&dsi->dsi_host);
  1672		if (ret)
  1673			return ERR_PTR(ret);
  1674	
  1675		bridge = &dsi->bridge;
  1676		bridge->driver_private = dsi;
  1677		bridge->funcs = &samsung_dsim_bridge_funcs;
  1678		bridge->of_node = dev->of_node;
  1679		drm_bridge_add(bridge);
  1680	
  1681		return dsi;
  1682	}
  1683	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32330 bytes --]

                 reply	other threads:[~2021-07-27 13:59 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=202107272155.NIUD6Ea3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.tretter@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox