[gpio:set-get-data 1/2] drivers/memory/omap-gpmc.c:2268:31: error: 'gpmv' undeclared

[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 set-get-data
head:   319114f48804d5c77a89150a769bc35ae9fb6f96
commit: 613f12365d31cfa205b3c8c606f33c90999a631f [1/2] memory: omap-gpmc: use devm_gpiochip_add_data()
config: arm-multi_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 613f12365d31cfa205b3c8c606f33c90999a631f
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   drivers/memory/omap-gpmc.c: In function 'gpmc_gpio_init':
>> drivers/memory/omap-gpmc.c:2268:31: error: 'gpmv' undeclared (first use in this function)
     ret = devm_gpiochip_add_data(gpmv->dev, &gpmc->gpio_chip, NULL);
                                  ^~~~
   drivers/memory/omap-gpmc.c:2268:31: note: each undeclared identifier is reported only once for each function it appears in
   drivers/memory/omap-gpmc.c: In function 'gpmc_probe':
>> drivers/memory/omap-gpmc.c:2371:2: error: implicit declaration of function 'gpmc_gpio_exit' [-Werror=implicit-function-declaration]
     gpmc_gpio_exit(gpmc);
     ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/gpmv +2268 drivers/memory/omap-gpmc.c

  2262		gpmc->gpio_chip.direction_input = gpmc_gpio_direction_input;
  2263		gpmc->gpio_chip.direction_output = gpmc_gpio_direction_output;
  2264		gpmc->gpio_chip.set = gpmc_gpio_set;
  2265		gpmc->gpio_chip.get = gpmc_gpio_get;
  2266		gpmc->gpio_chip.base = -1;
  2267	
> 2268		ret = devm_gpiochip_add_data(gpmv->dev, &gpmc->gpio_chip, NULL);
  2269		if (ret < 0) {
  2270			dev_err(gpmc->dev, "could not register gpio chip: %d\n", ret);
  2271			return ret;
  2272		}
  2273	
  2274		return 0;
  2275	}
  2276	
  2277	static int gpmc_probe(struct platform_device *pdev)
  2278	{
  2279		int rc;
  2280		u32 l;
  2281		struct resource *res;
  2282		struct gpmc_device *gpmc;
  2283	
  2284		gpmc = devm_kzalloc(&pdev->dev, sizeof(*gpmc), GFP_KERNEL);
  2285		if (!gpmc)
  2286			return -ENOMEM;
  2287	
  2288		gpmc->dev = &pdev->dev;
  2289		platform_set_drvdata(pdev, gpmc);
  2290	
  2291		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  2292		if (res == NULL)
  2293			return -ENOENT;
  2294	
  2295		phys_base = res->start;
  2296		mem_size = resource_size(res);
  2297	
  2298		gpmc_base = devm_ioremap_resource(&pdev->dev, res);
  2299		if (IS_ERR(gpmc_base))
  2300			return PTR_ERR(gpmc_base);
  2301	
  2302		res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
  2303		if (!res) {
  2304			dev_err(&pdev->dev, "Failed to get resource: irq\n");
  2305			return -ENOENT;
  2306		}
  2307	
  2308		gpmc->irq = res->start;
  2309	
  2310		gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck");
  2311		if (IS_ERR(gpmc_l3_clk)) {
  2312			dev_err(&pdev->dev, "Failed to get GPMC fck\n");
  2313			return PTR_ERR(gpmc_l3_clk);
  2314		}
  2315	
  2316		if (!clk_get_rate(gpmc_l3_clk)) {
  2317			dev_err(&pdev->dev, "Invalid GPMC fck clock rate\n");
  2318			return -EINVAL;
  2319		}
  2320	
  2321		if (pdev->dev.of_node) {
  2322			rc = gpmc_probe_dt(pdev);
  2323			if (rc)
  2324				return rc;
  2325		} else {
  2326			gpmc_cs_num = GPMC_CS_NUM;
  2327			gpmc_nr_waitpins = GPMC_NR_WAITPINS;
  2328		}
  2329	
  2330		pm_runtime_enable(&pdev->dev);
  2331		pm_runtime_get_sync(&pdev->dev);
  2332	
  2333		l = gpmc_read_reg(GPMC_REVISION);
  2334	
  2335		/*
  2336		 * FIXME: Once device-tree migration is complete the below flags
  2337		 * should be populated based upon the device-tree compatible
  2338		 * string. For now just use the IP revision. OMAP3+ devices have
  2339		 * the wr_access and wr_data_mux_bus register fields. OMAP4+
  2340		 * devices support the addr-addr-data multiplex protocol.
  2341		 *
  2342		 * GPMC IP revisions:
  2343		 * - OMAP24xx			= 2.0
  2344		 * - OMAP3xxx			= 5.0
  2345		 * - OMAP44xx/54xx/AM335x	= 6.0
  2346		 */
  2347		if (GPMC_REVISION_MAJOR(l) > 0x4)
  2348			gpmc_capability = GPMC_HAS_WR_ACCESS | GPMC_HAS_WR_DATA_MUX_BUS;
  2349		if (GPMC_REVISION_MAJOR(l) > 0x5)
  2350			gpmc_capability |= GPMC_HAS_MUX_AAD;
  2351		dev_info(gpmc->dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l),
  2352			 GPMC_REVISION_MINOR(l));
  2353	
  2354		gpmc_mem_init();
  2355		rc = gpmc_gpio_init(gpmc);
  2356		if (rc)
  2357			goto gpio_init_failed;
  2358	
  2359		gpmc->nirqs = GPMC_NR_NAND_IRQS + gpmc_nr_waitpins;
  2360		rc = gpmc_setup_irq(gpmc);
  2361		if (rc) {
  2362			dev_err(gpmc->dev, "gpmc_setup_irq failed\n");
  2363			goto setup_irq_failed;
  2364		}
  2365	
  2366		gpmc_probe_dt_children(pdev);
  2367	
  2368		return 0;
  2369	
  2370	setup_irq_failed:
> 2371		gpmc_gpio_exit(gpmc);
  2372	gpio_init_failed:
  2373		gpmc_mem_exit();
  2374		pm_runtime_put_sync(&pdev->dev);

---
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