From patchwork Mon Aug 8 10:37:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 73427 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp3144442qga; Mon, 8 Aug 2016 03:37:16 -0700 (PDT) X-Received: by 10.66.32.131 with SMTP id j3mr8708374pai.58.1470652636716; Mon, 08 Aug 2016 03:37:16 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q75si36488444pfi.216.2016.08.08.03.37.16; Mon, 08 Aug 2016 03:37:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752008AbcHHKhP (ORCPT + 4 others); Mon, 8 Aug 2016 06:37:15 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:50231 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320AbcHHKhP (ORCPT ); Mon, 8 Aug 2016 06:37:15 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u78AWWtj022429; Mon, 8 Aug 2016 05:32:32 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u78Ab9Sx024599; Mon, 8 Aug 2016 05:37:09 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Mon, 8 Aug 2016 05:37:09 -0500 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u78Ab7bh016439; Mon, 8 Aug 2016 05:37:07 -0500 Subject: Re: [PATCH] memory: omap-gpmc: use devm_gpiochip_add_data() To: kbuild test robot , Linus Walleij References: <201608081724.7N28vtne%fengguang.wu@intel.com> CC: Tony Lindgren , From: Roger Quadros Message-ID: Date: Mon, 8 Aug 2016 13:37:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <201608081724.7N28vtne%fengguang.wu@intel.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On 08/08/16 12:31, kbuild test robot wrote: > Hi Linus, > > [auto build test ERROR on linus/master] > [also build test ERROR on v4.8-rc1 next-20160805] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Linus-Walleij/memory-omap-gpmc-use-devm_gpiochip_add_data/20160808-160509 > config: arm-multi_v7_defconfig (attached as .config) > compiler: arm-linux-gnueabi-gcc (Debian 5.4.0-6) 5.4.0 20160609 > 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 > # 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:2269: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:2269: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:2378: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 +2269 drivers/memory/omap-gpmc.c > > 2263 gpmc->gpio_chip.direction_input = gpmc_gpio_direction_input; > 2264 gpmc->gpio_chip.direction_output = gpmc_gpio_direction_output; > 2265 gpmc->gpio_chip.set = gpmc_gpio_set; > 2266 gpmc->gpio_chip.get = gpmc_gpio_get; > 2267 gpmc->gpio_chip.base = -1; > 2268 >> 2269 ret = devm_gpiochip_add_data(gpmv->dev, &gpmc->gpio_chip, NULL); > 2270 if (ret < 0) { > 2271 dev_err(gpmc->dev, "could not register gpio chip: %d\n", ret); > 2272 return ret; > 2273 } > 2274 > 2275 return 0; > 2276 } > 2277 > 2278 static int gpmc_probe(struct platform_device *pdev) > 2279 { > 2280 int rc; > 2281 u32 l; > 2282 struct resource *res; > 2283 struct gpmc_device *gpmc; > 2284 > 2285 gpmc = devm_kzalloc(&pdev->dev, sizeof(*gpmc), GFP_KERNEL); > 2286 if (!gpmc) > 2287 return -ENOMEM; > 2288 > 2289 gpmc->dev = &pdev->dev; > 2290 platform_set_drvdata(pdev, gpmc); > 2291 > 2292 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > 2293 if (res == NULL) > 2294 return -ENOENT; > 2295 > 2296 phys_base = res->start; > 2297 mem_size = resource_size(res); > 2298 > 2299 gpmc_base = devm_ioremap_resource(&pdev->dev, res); > 2300 if (IS_ERR(gpmc_base)) > 2301 return PTR_ERR(gpmc_base); > 2302 > 2303 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); > 2304 if (!res) { > 2305 dev_err(&pdev->dev, "Failed to get resource: irq\n"); > 2306 return -ENOENT; > 2307 } > 2308 > 2309 gpmc->irq = res->start; > 2310 > 2311 gpmc_l3_clk = devm_clk_get(&pdev->dev, "fck"); > 2312 if (IS_ERR(gpmc_l3_clk)) { > 2313 dev_err(&pdev->dev, "Failed to get GPMC fck\n"); > 2314 return PTR_ERR(gpmc_l3_clk); > 2315 } > 2316 > 2317 if (!clk_get_rate(gpmc_l3_clk)) { > 2318 dev_err(&pdev->dev, "Invalid GPMC fck clock rate\n"); > 2319 return -EINVAL; > 2320 } > 2321 > 2322 if (pdev->dev.of_node) { > 2323 rc = gpmc_probe_dt(pdev); > 2324 if (rc) > 2325 return rc; > 2326 } else { > 2327 gpmc_cs_num = GPMC_CS_NUM; > 2328 gpmc_nr_waitpins = GPMC_NR_WAITPINS; > 2329 } > 2330 > 2331 pm_runtime_enable(&pdev->dev); > 2332 pm_runtime_get_sync(&pdev->dev); > 2333 > 2334 l = gpmc_read_reg(GPMC_REVISION); > 2335 > 2336 /* > 2337 * FIXME: Once device-tree migration is complete the below flags > 2338 * should be populated based upon the device-tree compatible > 2339 * string. For now just use the IP revision. OMAP3+ devices have > 2340 * the wr_access and wr_data_mux_bus register fields. OMAP4+ > 2341 * devices support the addr-addr-data multiplex protocol. > 2342 * > 2343 * GPMC IP revisions: > 2344 * - OMAP24xx = 2.0 > 2345 * - OMAP3xxx = 5.0 > 2346 * - OMAP44xx/54xx/AM335x = 6.0 > 2347 */ > 2348 if (GPMC_REVISION_MAJOR(l) > 0x4) > 2349 gpmc_capability = GPMC_HAS_WR_ACCESS | GPMC_HAS_WR_DATA_MUX_BUS; > 2350 if (GPMC_REVISION_MAJOR(l) > 0x5) > 2351 gpmc_capability |= GPMC_HAS_MUX_AAD; > 2352 dev_info(gpmc->dev, "GPMC revision %d.%d\n", GPMC_REVISION_MAJOR(l), > 2353 GPMC_REVISION_MINOR(l)); > 2354 > 2355 gpmc_mem_init(); > 2356 rc = gpmc_gpio_init(gpmc); > 2357 if (rc) > 2358 goto gpio_init_failed; > 2359 > 2360 gpmc->nirqs = GPMC_NR_NAND_IRQS + gpmc_nr_waitpins; > 2361 rc = gpmc_setup_irq(gpmc); > 2362 if (rc) { > 2363 dev_err(gpmc->dev, "gpmc_setup_irq failed\n"); > 2364 goto setup_irq_failed; > 2365 } > 2366 > 2367 rc = gpmc_probe_dt_children(pdev); > 2368 if (rc < 0) { > 2369 dev_err(gpmc->dev, "failed to probe DT children\n"); > 2370 goto dt_children_failed; > 2371 } > 2372 > 2373 return 0; > 2374 > 2375 dt_children_failed: > 2376 gpmc_free_irq(gpmc); > 2377 setup_irq_failed: >> 2378 gpmc_gpio_exit(gpmc); > 2379 gpio_init_failed: > 2380 gpmc_mem_exit(); > 2381 pm_runtime_put_sync(&pdev->dev); > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation > Looks like we need to patch this with -- cheers, -roger -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Linus Walleij diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 68f0a92..dff7b9e 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2359,7 +2359,7 @@ static int gpmc_probe(struct platform_device *pdev) rc = gpmc_setup_irq(gpmc); if (rc) { dev_err(gpmc->dev, "gpmc_setup_irq failed\n"); - goto setup_irq_failed; + goto gpio_init_failed; } rc = gpmc_probe_dt_children(pdev); @@ -2372,8 +2372,6 @@ static int gpmc_probe(struct platform_device *pdev) dt_children_failed: gpmc_free_irq(gpmc); -setup_irq_failed: - gpmc_gpio_exit(gpmc); gpio_init_failed: gpmc_mem_exit(); pm_runtime_put_sync(&pdev->dev);