From: kbuild test robot <lkp@intel.com>
To: Brendan Higgins <brendanhiggins@google.com>
Cc: kbuild-all@01.org, wsa@the-dreams.de, robh+dt@kernel.org,
mark.rutland@arm.com, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
openbmc@lists.ozlabs.org, joel@jms.id.au, jk@ozlabs.org,
Brendan Higgins <brendanhiggins@google.com>
Subject: Re: [PATCH 1/2] i2c: aspeed: added driver for Aspeed I2C
Date: Sat, 10 Sep 2016 06:48:57 +0800 [thread overview]
Message-ID: <201609100622.OfDksIX5%fengguang.wu@intel.com> (raw)
In-Reply-To: <1473450870-10333-2-git-send-email-brendanhiggins@google.com>
[-- Attachment #1: Type: text/plain, Size: 11516 bytes --]
Hi Brendan,
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]
url: https://github.com/0day-ci/linux/commits/Brendan-Higgins/i2c-aspeed-added-driver-for-Aspeed-I2C/20160910-035912
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
In file included from drivers/i2c/busses/i2c-aspeed.c:14:0:
>> drivers/i2c/busses/i2c-aspeed.c:697:25: error: 'aspeed_i2c_of_table' undeclared here (not in a function)
MODULE_DEVICE_TABLE(of, aspeed_i2c_of_table);
^
include/linux/module.h:213:21: note: in definition of macro 'MODULE_DEVICE_TABLE'
extern const typeof(name) __mod_##type##__##name##_device_table \
^~~~
>> include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1350:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
>> include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-aspeed.c:812:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(aspeed_i2c_controller_driver);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1350:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
>> include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~
drivers/i2c/busses/i2c-aspeed.c:707:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(aspeed_i2c_bus_driver);
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1350:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
>> include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-aspeed.c:812:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(aspeed_i2c_controller_driver);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1350:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
>> include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~
drivers/i2c/busses/i2c-aspeed.c:707:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(aspeed_i2c_bus_driver);
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1355:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
>> include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-aspeed.c:812:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(aspeed_i2c_controller_driver);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1355:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
>> include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~
drivers/i2c/busses/i2c-aspeed.c:707:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(aspeed_i2c_bus_driver);
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1355:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
>> include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~
>> drivers/i2c/busses/i2c-aspeed.c:812:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(aspeed_i2c_controller_driver);
^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1355:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
>> include/linux/platform_device.h:228:2: note: in expansion of macro 'module_driver'
module_driver(__platform_driver, platform_driver_register, \
^~~~~~~~~~~~~
drivers/i2c/busses/i2c-aspeed.c:707:1: note: in expansion of macro 'module_platform_driver'
module_platform_driver(aspeed_i2c_bus_driver);
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:213:27: error: '__mod_of__aspeed_i2c_of_table_device_table' aliased to undefined symbol 'aspeed_i2c_of_table'
extern const typeof(name) __mod_##type##__##name##_device_table \
^
>> drivers/i2c/busses/i2c-aspeed.c:801:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
MODULE_DEVICE_TABLE(of, aspeed_i2c_of_table);
^~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:213:27: error: '__mod_of__aspeed_i2c_of_table_device_table' aliased to undefined symbol 'aspeed_i2c_of_table'
extern const typeof(name) __mod_##type##__##name##_device_table \
^
vim +/aspeed_i2c_of_table +697 drivers/i2c/busses/i2c-aspeed.c
691
692 static const struct of_device_id aspeed_i2c_bus_of_table[] = {
693 { .compatible = "aspeed,ast2400-i2c-bus", },
694 { .compatible = "aspeed,ast2500-i2c-bus", },
695 { },
696 };
> 697 MODULE_DEVICE_TABLE(of, aspeed_i2c_of_table);
698
699 static struct platform_driver aspeed_i2c_bus_driver = {
700 .probe = aspeed_i2c_probe_bus,
701 .remove = aspeed_i2c_remove_bus,
702 .driver = {
703 .name = "ast-i2c-bus",
704 .of_match_table = aspeed_i2c_bus_of_table,
705 },
706 };
> 707 module_platform_driver(aspeed_i2c_bus_driver);
708
709 static void aspeed_i2c_controller_irq(struct irq_desc *desc)
710 {
711 struct aspeed_i2c_controller *c = irq_desc_get_handler_data(desc);
712 unsigned long p, status;
713 unsigned int bus_irq;
714
715 status = readl(c->base);
716 for_each_set_bit(p, &status, ASPEED_I2C_NUM_BUS) {
717 bus_irq = irq_find_mapping(c->irq_domain, p);
718 generic_handle_irq(bus_irq);
719 }
720 }
721
722 static int aspeed_i2c_probe_controller(struct platform_device *pdev)
723 {
724 struct aspeed_i2c_controller *controller;
725 struct device_node *np;
726 struct resource *res;
727
728 controller = kzalloc(sizeof(*controller), GFP_KERNEL);
729 if (!controller)
730 return -ENOMEM;
731
732 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
733 controller->base = devm_ioremap_resource(&pdev->dev, res);
734 if (IS_ERR(controller->base))
735 return PTR_ERR(controller->base);
736
737 controller->irq = platform_get_irq(pdev, 0);
738 if (controller->irq < 0) {
739 dev_err(&pdev->dev, "no platform IRQ\n");
740 return -ENXIO;
741 }
742
743 controller->irq_domain = irq_domain_add_linear(pdev->dev.of_node,
744 ASPEED_I2C_NUM_BUS, &irq_domain_simple_ops, NULL);
745 if (!controller->irq_domain) {
746 dev_err(&pdev->dev, "no IRQ domain\n");
747 return -ENXIO;
748 }
749 controller->irq_domain->name = "ast-i2c-domain";
750
751 irq_set_chained_handler_and_data(controller->irq,
752 aspeed_i2c_controller_irq, controller);
753
754 controller->dev = &pdev->dev;
755
756 platform_set_drvdata(pdev, controller);
757
758 dev_info(controller->dev, "i2c controller registered, irq %d\n",
759 controller->irq);
760
761 for_each_child_of_node(pdev->dev.of_node, np) {
762 int ret;
763 u32 bus_num;
764 char bus_id[sizeof("i2c-12345")];
765
766 /*
767 * Set a useful name derived from the bus number; the device
768 * tree should provide us with one that corresponds to the
769 * hardware numbering. If the property is missing the
770 * probe would fail so just skip it here.
771 */
772
773 ret = of_property_read_u32(np, "bus", &bus_num);
774 if (ret)
775 continue;
776
777 ret = snprintf(bus_id, sizeof(bus_id), "i2c-%u", bus_num);
778 if (ret >= sizeof(bus_id))
779 continue;
780
781 of_platform_device_create(np, bus_id, &pdev->dev);
782 of_node_put(np);
783 }
784
785 return 0;
786 }
787
788 static int aspeed_i2c_remove_controller(struct platform_device *pdev)
789 {
790 struct aspeed_i2c_controller *controller = platform_get_drvdata(pdev);
791
792 irq_domain_remove(controller->irq_domain);
793 return 0;
794 }
795
796 static const struct of_device_id aspeed_i2c_controller_of_table[] = {
797 { .compatible = "aspeed,ast2400-i2c-controller", },
798 { .compatible = "aspeed,ast2500-i2c-controller", },
799 { },
800 };
> 801 MODULE_DEVICE_TABLE(of, aspeed_i2c_of_table);
802
803 static struct platform_driver aspeed_i2c_controller_driver = {
804 .probe = aspeed_i2c_probe_controller,
805 .remove = aspeed_i2c_remove_controller,
806 .driver = {
807 .name = "ast-i2c-controller",
808 .of_match_table = aspeed_i2c_controller_of_table,
809 },
810 };
811
> 812 module_platform_driver(aspeed_i2c_controller_driver);
813
814 MODULE_AUTHOR("Brendan Higgins <brendanhiggins@google.com>");
815 MODULE_DESCRIPTION("Aspeed I2C Bus Driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 55598 bytes --]
next prev parent reply other threads:[~2016-09-09 22:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 19:54 [PATCH 0/2] " Brendan Higgins
2016-09-09 19:54 ` [PATCH 1/2] " Brendan Higgins
2016-09-09 22:48 ` kbuild test robot [this message]
2016-09-10 0:48 ` kbuild test robot
2016-09-10 1:55 ` [PATCH v2 " Brendan Higgins
2016-09-10 1:55 ` [PATCH v2 2/2] i2c: aspeed: added documentation for Aspeed I2C driver Brendan Higgins
2016-09-19 21:35 ` Rob Herring
2016-09-19 23:26 ` Brendan Higgins
2016-09-20 18:08 ` Brendan Higgins
2016-09-20 23:03 ` Brendan Higgins
[not found] ` <CAFd5g46j02sb2w_DwaXAgnfcO=ONmJGZwqdRneNd0QHq-t53rA@mail.gmail.com>
2016-09-23 6:02 ` Joel Stanley
2016-09-19 17:56 ` [PATCH v2 1/2] i2c: aspeed: added driver for Aspeed I2C Brendan Higgins
2016-09-19 23:23 ` [PATCH v3 " Brendan Higgins
2016-09-19 23:23 ` [PATCH v3 2/2] i2c: aspeed: added documentation for Aspeed I2C driver Brendan Higgins
2016-09-23 18:02 ` Rob Herring
2016-10-12 20:01 ` Brendan Higgins
2016-09-09 19:54 ` [PATCH " Brendan Higgins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201609100622.OfDksIX5%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=brendanhiggins@google.com \
--cc=devicetree@vger.kernel.org \
--cc=jk@ozlabs.org \
--cc=joel@jms.id.au \
--cc=kbuild-all@01.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®