Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp146617ybh; Mon, 9 Mar 2020 18:14:46 -0700 (PDT) X-Google-Smtp-Source: ADFU+vta9Pbh/0ZP8CRDbzNBfJJNVjvjKVf85ekvXyP1gMnPUaJNdRPFfod5elOGZfrTlwIbe/yo X-Received: by 2002:a05:6830:231d:: with SMTP id u29mr14226440ote.1.1583802886507; Mon, 09 Mar 2020 18:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583802886; cv=none; d=google.com; s=arc-20160816; b=pA4G/7TEQ8bOW7ISgFqrDHci+QRluRj9PV/7lc8SFNXY6V+0sAunuTXtcrl55COtPX XnmWn0+1YV4D1YPvMnPFnn9Vlbhy+mhfO98MPzya97tHu/Hx2e90aidItA4tBMXPUNzp v1AjrRGkZuGwywv/p6rwFPRX2268P6FrYoQWSKkwDT4XewrYtteQ1WQk2AXH23tkSkoj qdEbWQUNOpAThONL/gv6FGzq+7gnnubiLuWmpek5Qc/0OHtn2RfNrYkZCnZUGARfqDEE Mpu7vT+rEC7T53rRX/EUFYSdNNWAKfBnErb2IAe5eicNPJa/ioI7hn55E7K2zrBVTunz 7B7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Jct0oODSWCAbtgp27/MonFQJl4SIunMaftksi2S2Lhk=; b=ijEu5rEfTZUBt4dSfF+LYqTVkJRM77v+DjmtrVgY6VeEDfYgMkYjcCAlnMDfg16yoH AJjQFadA9kx4vK8Ydf/u+Cmz+IBCdog/vMttwv9r97h0B7Py6bgCTtJhLovj7X7FV2jK vCRM3LedCZwS/iduR8TErUVXDUnkgusDXOM1aOTcZ500miWTNN94JGZ89q8EgzsIPBNU llBAeTV1z/n/O9x98WRtk5WeUi4iOPOjE3UOiVR4Mp5lft9YH6Kqad9XQRIQ5XMt4mmL YFo6d2LUKaxiQxKzqLAGj5zXU/lseI2HqO4m1cA4F5WAidbqSgT1L1TzA4bEpXJERM+E ZsdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FnqUNKxy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j64si4248572oif.49.2020.03.09.18.14.19; Mon, 09 Mar 2020 18:14:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FnqUNKxy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726382AbgCJBNG (ORCPT + 99 others); Mon, 9 Mar 2020 21:13:06 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:40422 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgCJBNF (ORCPT ); Mon, 9 Mar 2020 21:13:05 -0400 Received: by mail-pl1-f194.google.com with SMTP id h11so1539118plk.7 for ; Mon, 09 Mar 2020 18:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Jct0oODSWCAbtgp27/MonFQJl4SIunMaftksi2S2Lhk=; b=FnqUNKxy9VpjYePPEw/UjvCcMoUU9z5I9nAMcanQud9Fm17B8L/jtOGwn/2LV9ck/E PH0GDOLFEOYfVCd7vzAn1r46n1C9Ih9r0sN0gzqopzpXcBF9cKL9+z10ZrNgdHdpEaYy 1D/WuR7MObErwia9QrdNRAI2qFf78/k12fh0HVQttfKtuPNJhgYLvomSB6R5313jmZlO BhybgiY/vVLAoW9nA1RnTVTx2aSqO7/LuCOENwWee9nB0O0dDO7v3sOX7nlG9Yr+CS2Y flGezL007ClN7JX1nmh7UsovWGaJ//IIqS324WxwiXohmP0fgA1iLWWjLf38HfalPtvr 5oVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Jct0oODSWCAbtgp27/MonFQJl4SIunMaftksi2S2Lhk=; b=q7EF4IgCzsn4fD5dyKEl+FWzySEHPp8x3BYFVmNZ1hoErFHE3qI++PJMRnjZ+cABwd SrQji8sH15CgHKPpuoVDVcO4oAd7k1ZxaLyJ1T3vFk/pTOJ+lUCmqxHO7GLjPUojl2Vm AUYxUId7qnHPOEKk1oyQudUK42t0DAK9HoDtislC4VQTjZe1rluA6kjmMb7jC93APQnY qKmkQ14u01HHkjm2ltyA+tp+n6T1dOOq4TB6qFlNa3N7UR6LmuNEGuAVf5kXJHvCeplf PZ8guNwE1ZlN50V91ypObBGx5MyKx4aqog7bmt8yaBlujDoZ+8fu38AcL3Pr7CeIG4aQ W/pA== X-Gm-Message-State: ANhLgQ1Qg7adfqrfz0b3Z3iNK5CJA+3zyjaeFdK8MXO63UoWQLLIriZL CNv9yT0XsmCTZhsOmr6cBQMvWY3m22wj/lCnM9WEZQ== X-Received: by 2002:a17:90a:1f8d:: with SMTP id x13mr2151099pja.27.1583802784082; Mon, 09 Mar 2020 18:13:04 -0700 (PDT) MIME-Version: 1.0 References: <1583719058-23370-1-git-send-email-Anson.Huang@nxp.com> <202003100849.SzJTb5rj%lkp@intel.com> In-Reply-To: <202003100849.SzJTb5rj%lkp@intel.com> From: Nick Desaulniers Date: Mon, 9 Mar 2020 18:12:53 -0700 Message-ID: Subject: Re: [PATCH] gpio: mxs: add COMPILE_TEST support for GPIO_MXS To: Anson Huang , Nathan Chancellor , Masahiro Yamada Cc: kbuild-all@lists.01.org, clang-built-linux , Linus Walleij , bgolaszewski@baylibre.com, linux-gpio@vger.kernel.org, LKML , NXP Linux Team , kbuild test robot Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nevermind this report, we're currently discussing what best to do in this case. On Mon, Mar 9, 2020 at 5:57 PM kbuild test robot wrote: > > Hi Anson, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on gpio/for-next] > [also build test WARNING on v5.6-rc5] > [if your patch is applied to the wrong git tree, please drop us a note to help > improve the system. BTW, we also suggest to use '--base' option to specify the > base tree in git format-patch, please see https://stackoverflow.com/a/37406982] > > url: https://github.com/0day-ci/linux/commits/Anson-Huang/gpio-mxs-add-COMPILE_TEST-support-for-GPIO_MXS/20200309-104254 > base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next > config: x86_64-allyesconfig (attached as .config) > compiler: clang version 11.0.0 (git://gitmirror/llvm_project 073dbaae39724ea860b5957fe47ecc1c2a84b197) > reproduce: > # FIXME the reproduce steps for clang is not ready yet > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot > > All warnings (new ones prefixed by >>): > > >> drivers/gpio/gpio-mxs.c:293:16: warning: cast to smaller integer type 'enum mxs_gpio_id' from 'const void *' [-Wvoid-pointer-to-enum-cast] > port->devid = (enum mxs_gpio_id)of_device_get_match_data(&pdev->dev); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 warning generated. > > vim +293 drivers/gpio/gpio-mxs.c > > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 276 > 3836309d93462b drivers/gpio/gpio-mxs.c Bill Pemberton 2012-11-19 277 static int mxs_gpio_probe(struct platform_device *pdev) > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 278 { > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 279 struct device_node *np = pdev->dev.of_node; > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 280 struct device_node *parent; > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 281 static void __iomem *base; > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 282 struct mxs_gpio_port *port; > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 283 int irq_base; > 498c17cf6a9353 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-07 284 int err; > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 285 > 940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 286 port = devm_kzalloc(&pdev->dev, sizeof(*port), GFP_KERNEL); > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 287 if (!port) > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 288 return -ENOMEM; > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 289 > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 290 port->id = of_alias_get_id(np, "gpio"); > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 291 if (port->id < 0) > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 292 return port->id; > 1f2d357b9ebef5 drivers/gpio/gpio-mxs.c Thierry Reding 2018-04-30 @293 port->devid = (enum mxs_gpio_id)of_device_get_match_data(&pdev->dev); > 5751d3dcf43e24 drivers/gpio/gpio-mxs.c Bartosz Golaszewski 2017-08-09 294 port->dev = &pdev->dev; > 940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 295 port->irq = platform_get_irq(pdev, 0); > 940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 296 if (port->irq < 0) > 940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 297 return port->irq; > 940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 298 > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 299 /* > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 300 * map memory region only once, as all the gpio ports > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 301 * share the same one > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 302 */ > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 303 if (!base) { > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 304 parent = of_get_parent(np); > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 305 base = of_iomap(parent, 0); > 4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 306 of_node_put(parent); > 641d03422a59b1 drivers/gpio/gpio-mxs.c Thierry Reding 2013-01-21 307 if (!base) > 641d03422a59b1 drivers/gpio/gpio-mxs.c Thierry Reding 2013-01-21 308 return -EADDRNOTAVAIL; > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 309 } > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 310 port->base = base; > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 311 > f08ea3cc94eeaf drivers/gpio/gpio-mxs.c Sascha Hauer 2016-10-21 312 /* initially disable the interrupts */ > f08ea3cc94eeaf drivers/gpio/gpio-mxs.c Sascha Hauer 2016-10-21 313 writel(0, port->base + PINCTRL_PIN2IRQ(port)); > 164387d2b4ae20 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-03 314 writel(0, port->base + PINCTRL_IRQEN(port)); > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 315 > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 316 /* clear address has to be used to clear IRQSTAT bits */ > 164387d2b4ae20 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-03 317 writel(~0U, port->base + PINCTRL_IRQSTAT(port) + MXS_CLR); > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 318 > 8514b5439c90f0 drivers/gpio/gpio-mxs.c Bartosz Golaszewski 2017-03-04 319 irq_base = devm_irq_alloc_descs(&pdev->dev, -1, 0, 32, numa_node_id()); > 44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 320 if (irq_base < 0) { > 44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 321 err = irq_base; > 44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 322 goto out_iounmap; > 44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 323 } > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 324 > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 325 port->domain = irq_domain_add_legacy(np, 32, irq_base, 0, > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 326 &irq_domain_simple_ops, NULL); > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 327 if (!port->domain) { > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 328 err = -ENODEV; > 8514b5439c90f0 drivers/gpio/gpio-mxs.c Bartosz Golaszewski 2017-03-04 329 goto out_iounmap; > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 330 } > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 331 > 498c17cf6a9353 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-07 332 /* gpio-mxs can be a generic irq chip */ > 1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 333 err = mxs_gpio_init_gc(port, irq_base); > 1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 334 if (err < 0) > 1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 335 goto out_irqdomain_remove; > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 336 > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 337 /* setup one handler for each entry */ > a44735f421b447 drivers/gpio/gpio-mxs.c Russell King 2015-06-16 338 irq_set_chained_handler_and_data(port->irq, mxs_gpio_irq_handler, > a44735f421b447 drivers/gpio/gpio-mxs.c Russell King 2015-06-16 339 port); > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 340 > 0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 341 err = bgpio_init(&port->gc, &pdev->dev, 4, > 164387d2b4ae20 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-03 342 port->base + PINCTRL_DIN(port), > 90dae4ebf03063 drivers/gpio/gpio-mxs.c Maxime Ripard 2013-04-29 343 port->base + PINCTRL_DOUT(port) + MXS_SET, > 90dae4ebf03063 drivers/gpio/gpio-mxs.c Maxime Ripard 2013-04-29 344 port->base + PINCTRL_DOUT(port) + MXS_CLR, > 84a442b9a16ee6 drivers/gpio/gpio-mxs.c Linus Torvalds 2012-05-26 345 port->base + PINCTRL_DOE(port), NULL, 0); > 8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 346 if (err) > 0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 347 goto out_irqdomain_remove; > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 348 > 0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 349 port->gc.to_irq = mxs_gpio_to_irq; > 0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 350 port->gc.get_direction = mxs_gpio_get_direction; > 0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 351 port->gc.base = port->id * 32; > 06f88a8ae9085e drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 352 > 0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 353 err = gpiochip_add_data(&port->gc, port); > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 354 if (err) > 0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 355 goto out_irqdomain_remove; > fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 356 > 940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 357 return 0; > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 358 > 1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 359 out_irqdomain_remove: > 1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 360 irq_domain_remove(port->domain); > 44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 361 out_iounmap: > 44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 362 iounmap(port->base); > 0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 363 return err; > 940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 364 } > 940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 365 > > :::::: The code at line 293 was first introduced by commit > :::::: 1f2d357b9ebef5c7ca7e7ee07234c08ac057c386 gpio: mxs: Use of_device_get_match_data() > > :::::: TO: Thierry Reding > :::::: CC: Linus Walleij > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/202003100849.SzJTb5rj%25lkp%40intel.com. -- Thanks, ~Nick Desaulniers