tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-mmc-cd-wp head: 709852aab346f355fadd923451baeb8c059e6979 commit: fba5b8dd17d7316b1d31904c76a382b411d9705e [17/19] mmc: usdhi6rol0: Track RO inversion in driver config: sh-allyesconfig (attached as .config) compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout fba5b8dd17d7316b1d31904c76a382b411d9705e # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=sh All errors (new ones prefixed by >>): 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 +/of_property_read_bool +1770 drivers/mmc/host/usdhi6rol0.c 1734 1735 static int usdhi6_probe(struct platform_device *pdev) 1736 { 1737 struct device *dev = &pdev->dev; 1738 struct mmc_host *mmc; 1739 struct usdhi6_host *host; 1740 struct resource *res; 1741 int irq_cd, irq_sd, irq_sdio; 1742 u32 version; 1743 int ret; 1744 1745 if (!dev->of_node) 1746 return -ENODEV; 1747 1748 irq_cd = platform_get_irq_byname(pdev, "card detect"); 1749 irq_sd = platform_get_irq_byname(pdev, "data"); 1750 irq_sdio = platform_get_irq_byname(pdev, "SDIO"); 1751 if (irq_sd < 0 || irq_sdio < 0) 1752 return -ENODEV; 1753 1754 mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev); 1755 if (!mmc) 1756 return -ENOMEM; 1757 1758 ret = mmc_regulator_get_supply(mmc); 1759 if (ret) 1760 goto e_free_mmc; 1761 1762 ret = mmc_of_parse(mmc); 1763 if (ret < 0) 1764 goto e_free_mmc; 1765 1766 host = mmc_priv(mmc); 1767 host->mmc = mmc; 1768 host->wait = USDHI6_WAIT_FOR_REQUEST; 1769 host->timeout = msecs_to_jiffies(4000); > 1770 host->ro_active_high = of_property_read_bool("wp-inverted"); 1771 1772 host->pinctrl = devm_pinctrl_get(&pdev->dev); 1773 if (IS_ERR(host->pinctrl)) { 1774 ret = PTR_ERR(host->pinctrl); 1775 goto e_free_mmc; 1776 } 1777 1778 host->pins_uhs = pinctrl_lookup_state(host->pinctrl, "state_uhs"); 1779 if (!IS_ERR(host->pins_uhs)) { 1780 host->pins_default = pinctrl_lookup_state(host->pinctrl, 1781 PINCTRL_STATE_DEFAULT); 1782 1783 if (IS_ERR(host->pins_default)) { 1784 dev_err(dev, 1785 "UHS pinctrl requires a default pin state.\n"); 1786 ret = PTR_ERR(host->pins_default); 1787 goto e_free_mmc; 1788 } 1789 } 1790 1791 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1792 host->base = devm_ioremap_resource(dev, res); 1793 if (IS_ERR(host->base)) { 1794 ret = PTR_ERR(host->base); 1795 goto e_free_mmc; 1796 } 1797 1798 host->clk = devm_clk_get(dev, NULL); 1799 if (IS_ERR(host->clk)) { 1800 ret = PTR_ERR(host->clk); 1801 goto e_free_mmc; 1802 } 1803 1804 host->imclk = clk_get_rate(host->clk); 1805 1806 ret = clk_prepare_enable(host->clk); 1807 if (ret < 0) 1808 goto e_free_mmc; 1809 1810 version = usdhi6_read(host, USDHI6_VERSION); 1811 if ((version & 0xfff) != 0xa0d) { 1812 dev_err(dev, "Version not recognized %x\n", version); 1813 goto e_clk_off; 1814 } 1815 1816 dev_info(dev, "A USDHI6ROL0 SD host detected with %d ports\n", 1817 usdhi6_read(host, USDHI6_SD_PORT_SEL) >> USDHI6_SD_PORT_SEL_PORTS_SHIFT); 1818 1819 usdhi6_mask_all(host); 1820 1821 if (irq_cd >= 0) { 1822 ret = devm_request_irq(dev, irq_cd, usdhi6_cd, 0, 1823 dev_name(dev), host); 1824 if (ret < 0) 1825 goto e_clk_off; 1826 } else { 1827 mmc->caps |= MMC_CAP_NEEDS_POLL; 1828 } 1829 1830 ret = devm_request_threaded_irq(dev, irq_sd, usdhi6_sd, usdhi6_sd_bh, 0, 1831 dev_name(dev), host); 1832 if (ret < 0) 1833 goto e_clk_off; 1834 1835 ret = devm_request_irq(dev, irq_sdio, usdhi6_sdio, 0, 1836 dev_name(dev), host); 1837 if (ret < 0) 1838 goto e_clk_off; 1839 1840 INIT_DELAYED_WORK(&host->timeout_work, usdhi6_timeout_work); 1841 1842 usdhi6_dma_request(host, res->start); 1843 1844 mmc->ops = &usdhi6_ops; 1845 mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | 1846 MMC_CAP_SDIO_IRQ; 1847 /* Set .max_segs to some random number. Feel free to adjust. */ 1848 mmc->max_segs = 32; 1849 mmc->max_blk_size = 512; 1850 mmc->max_req_size = PAGE_SIZE * mmc->max_segs; 1851 mmc->max_blk_count = mmc->max_req_size / mmc->max_blk_size; 1852 /* 1853 * Setting .max_seg_size to 1 page would simplify our page-mapping code, 1854 * But OTOH, having large segments makes DMA more efficient. We could 1855 * check, whether we managed to get DMA and fall back to 1 page 1856 * segments, but if we do manage to obtain DMA and then it fails at 1857 * run-time and we fall back to PIO, we will continue getting large 1858 * segments. So, we wouldn't be able to get rid of the code anyway. 1859 */ 1860 mmc->max_seg_size = mmc->max_req_size; 1861 if (!mmc->f_max) 1862 mmc->f_max = host->imclk; 1863 mmc->f_min = host->imclk / 512; 1864 1865 platform_set_drvdata(pdev, host); 1866 1867 ret = mmc_add_host(mmc); 1868 if (ret < 0) 1869 goto e_clk_off; 1870 1871 return 0; 1872 1873 e_clk_off: 1874 clk_disable_unprepare(host->clk); 1875 e_free_mmc: 1876 mmc_free_host(mmc); 1877 1878 return ret; 1879 } 1880 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip