[gpio:gpio-descriptors-mmc-cd-wp 19/19] drivers/mmc/host/usdhi6rol0.c:1770:53: error: not enough arguments for function of_property_read_bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-mmc-cd-wp
head:   709852aab346f355fadd923451baeb8c059e6979
commit: 709852aab346f355fadd923451baeb8c059e6979 [19/19] gpio: OF: Parse MMC-specific CD and WP properties
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 709852aab346f355fadd923451baeb8c059e6979
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

>> drivers/mmc/host/usdhi6rol0.c:1770:54: warning: incorrect type in argument 1 (different base types)
   drivers/mmc/host/usdhi6rol0.c:1770:54:    expected struct device_node const *np
   drivers/mmc/host/usdhi6rol0.c:1770:54:    got char *<noident>
>> drivers/mmc/host/usdhi6rol0.c:1770:53: error: not enough arguments for function of_property_read_bool
   drivers/mmc/host/usdhi6rol0.c: In function 'usdhi6_probe':
   drivers/mmc/host/usdhi6rol0.c:1770:47: error: passing argument 1 of 'of_property_read_bool' from incompatible pointer type [-Werror=incompatible-pointer-types]
     host->ro_active_high = of_property_read_bool("wp-inverted");
                                                  ^~~~~~~~~~~~~
   In file included from drivers/mmc/host/usdhi6rol0.c:29:0:
   include/linux/of.h:1165:20: note: expected 'const struct device_node *' but argument is of type 'char *'
    static inline bool of_property_read_bool(const struct device_node *np,
                       ^~~~~~~~~~~~~~~~~~~~~
   drivers/mmc/host/usdhi6rol0.c:1770:25: error: too few arguments to function 'of_property_read_bool'
     host->ro_active_high = of_property_read_bool("wp-inverted");
                            ^~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/mmc/host/usdhi6rol0.c:29:0:
   include/linux/of.h:1165:20: note: declared here
    static inline bool of_property_read_bool(const struct device_node *np,
                       ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +1770 drivers/mmc/host/usdhi6rol0.c

75fa9ea6e Guennadi Liakhovetski 2014-05-31  1734  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1735  static int usdhi6_probe(struct platform_device *pdev)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1736  {
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1737  	struct device *dev = &pdev->dev;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1738  	struct mmc_host *mmc;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1739  	struct usdhi6_host *host;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1740  	struct resource *res;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1741  	int irq_cd, irq_sd, irq_sdio;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1742  	u32 version;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1743  	int ret;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1744  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1745  	if (!dev->of_node)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1746  		return -ENODEV;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1747  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1748  	irq_cd = platform_get_irq_byname(pdev, "card detect");
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1749  	irq_sd = platform_get_irq_byname(pdev, "data");
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1750  	irq_sdio = platform_get_irq_byname(pdev, "SDIO");
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1751  	if (irq_sd < 0 || irq_sdio < 0)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1752  		return -ENODEV;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1753  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1754  	mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1755  	if (!mmc)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1756  		return -ENOMEM;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1757  
767264725 Rabin Vincent         2015-08-19  1758  	ret = mmc_regulator_get_supply(mmc);
2d87ddd7b Wolfram Sang          2017-10-14  1759  	if (ret)
767264725 Rabin Vincent         2015-08-19  1760  		goto e_free_mmc;
767264725 Rabin Vincent         2015-08-19  1761  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1762  	ret = mmc_of_parse(mmc);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1763  	if (ret < 0)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1764  		goto e_free_mmc;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1765  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1766  	host		= mmc_priv(mmc);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1767  	host->mmc	= mmc;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1768  	host->wait	= USDHI6_WAIT_FOR_REQUEST;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1769  	host->timeout	= msecs_to_jiffies(4000);
fba5b8dd1 Linus Walleij         2018-11-26 @1770  	host->ro_active_high = of_property_read_bool("wp-inverted");
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1771  
488aab3d0 Lars Persson          2016-04-27  1772  	host->pinctrl = devm_pinctrl_get(&pdev->dev);
488aab3d0 Lars Persson          2016-04-27  1773  	if (IS_ERR(host->pinctrl)) {
488aab3d0 Lars Persson          2016-04-27  1774  		ret = PTR_ERR(host->pinctrl);
488aab3d0 Lars Persson          2016-04-27  1775  		goto e_free_mmc;
488aab3d0 Lars Persson          2016-04-27  1776  	}
488aab3d0 Lars Persson          2016-04-27  1777  
488aab3d0 Lars Persson          2016-04-27  1778  	host->pins_uhs = pinctrl_lookup_state(host->pinctrl, "state_uhs");
488aab3d0 Lars Persson          2016-04-27  1779  	if (!IS_ERR(host->pins_uhs)) {
488aab3d0 Lars Persson          2016-04-27  1780  		host->pins_default = pinctrl_lookup_state(host->pinctrl,
488aab3d0 Lars Persson          2016-04-27  1781  							  PINCTRL_STATE_DEFAULT);
488aab3d0 Lars Persson          2016-04-27  1782  
488aab3d0 Lars Persson          2016-04-27  1783  		if (IS_ERR(host->pins_default)) {
488aab3d0 Lars Persson          2016-04-27  1784  			dev_err(dev,
488aab3d0 Lars Persson          2016-04-27  1785  				"UHS pinctrl requires a default pin state.\n");
488aab3d0 Lars Persson          2016-04-27  1786  			ret = PTR_ERR(host->pins_default);
488aab3d0 Lars Persson          2016-04-27  1787  			goto e_free_mmc;
488aab3d0 Lars Persson          2016-04-27  1788  		}
488aab3d0 Lars Persson          2016-04-27  1789  	}
488aab3d0 Lars Persson          2016-04-27  1790  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1791  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1792  	host->base = devm_ioremap_resource(dev, res);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1793  	if (IS_ERR(host->base)) {
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1794  		ret = PTR_ERR(host->base);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1795  		goto e_free_mmc;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1796  	}
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1797  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1798  	host->clk = devm_clk_get(dev, NULL);
3b1cac4d9 Julia Lawall          2015-08-23  1799  	if (IS_ERR(host->clk)) {
3b1cac4d9 Julia Lawall          2015-08-23  1800  		ret = PTR_ERR(host->clk);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1801  		goto e_free_mmc;
3b1cac4d9 Julia Lawall          2015-08-23  1802  	}
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1803  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1804  	host->imclk = clk_get_rate(host->clk);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1805  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1806  	ret = clk_prepare_enable(host->clk);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1807  	if (ret < 0)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1808  		goto e_free_mmc;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1809  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1810  	version = usdhi6_read(host, USDHI6_VERSION);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1811  	if ((version & 0xfff) != 0xa0d) {
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1812  		dev_err(dev, "Version not recognized %x\n", version);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1813  		goto e_clk_off;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1814  	}
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1815  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1816  	dev_info(dev, "A USDHI6ROL0 SD host detected with %d ports\n",
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1817  		 usdhi6_read(host, USDHI6_SD_PORT_SEL) >> USDHI6_SD_PORT_SEL_PORTS_SHIFT);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1818  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1819  	usdhi6_mask_all(host);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1820  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1821  	if (irq_cd >= 0) {
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1822  		ret = devm_request_irq(dev, irq_cd, usdhi6_cd, 0,
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1823  				       dev_name(dev), host);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1824  		if (ret < 0)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1825  			goto e_clk_off;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1826  	} else {
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1827  		mmc->caps |= MMC_CAP_NEEDS_POLL;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1828  	}
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1829  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1830  	ret = devm_request_threaded_irq(dev, irq_sd, usdhi6_sd, usdhi6_sd_bh, 0,
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1831  			       dev_name(dev), host);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1832  	if (ret < 0)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1833  		goto e_clk_off;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1834  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1835  	ret = devm_request_irq(dev, irq_sdio, usdhi6_sdio, 0,
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1836  			       dev_name(dev), host);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1837  	if (ret < 0)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1838  		goto e_clk_off;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1839  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1840  	INIT_DELAYED_WORK(&host->timeout_work, usdhi6_timeout_work);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1841  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1842  	usdhi6_dma_request(host, res->start);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1843  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1844  	mmc->ops = &usdhi6_ops;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1845  	mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
701dcef72 Lars Persson          2016-04-27  1846  		     MMC_CAP_SDIO_IRQ;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1847  	/* Set .max_segs to some random number. Feel free to adjust. */
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1848  	mmc->max_segs = 32;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1849  	mmc->max_blk_size = 512;
09cbfeaf1 Kirill A. Shutemov    2016-04-01  1850  	mmc->max_req_size = PAGE_SIZE * mmc->max_segs;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1851  	mmc->max_blk_count = mmc->max_req_size / mmc->max_blk_size;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1852  	/*
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1853  	 * Setting .max_seg_size to 1 page would simplify our page-mapping code,
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1854  	 * But OTOH, having large segments makes DMA more efficient. We could
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1855  	 * check, whether we managed to get DMA and fall back to 1 page
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1856  	 * segments, but if we do manage to obtain DMA and then it fails at
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1857  	 * run-time and we fall back to PIO, we will continue getting large
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1858  	 * segments. So, we wouldn't be able to get rid of the code anyway.
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1859  	 */
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1860  	mmc->max_seg_size = mmc->max_req_size;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1861  	if (!mmc->f_max)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1862  		mmc->f_max = host->imclk;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1863  	mmc->f_min = host->imclk / 512;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1864  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1865  	platform_set_drvdata(pdev, host);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1866  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1867  	ret = mmc_add_host(mmc);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1868  	if (ret < 0)
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1869  		goto e_clk_off;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1870  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1871  	return 0;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1872  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1873  e_clk_off:
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1874  	clk_disable_unprepare(host->clk);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1875  e_free_mmc:
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1876  	mmc_free_host(mmc);
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1877  
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1878  	return ret;
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1879  }
75fa9ea6e Guennadi Liakhovetski 2014-05-31  1880  

:::::: The code at line 1770 was first introduced by commit
:::::: fba5b8dd17d7316b1d31904c76a382b411d9705e mmc: usdhi6rol0: Track RO inversion in driver

:::::: TO: Linus Walleij <linus.walleij@xxxxxxxxxx>
:::::: CC: Linus Walleij <linus.walleij@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux