RE: [PATCH v3 2/2] i2c: Add i2c_device_get_match_data() callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I will send V4 fixing this error and also fixing review comments from Andy and Dmitry.

Cheers,
Biju

> Subject: Re: [PATCH v3 2/2] i2c: Add i2c_device_get_match_data()
> callback
>
> Hi Biju,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on wsa/i2c/for-next] [also build test ERROR on
> driver-core/driver-core-testing driver-core/driver-core-next driver-
> core/driver-core-linus linus/master v6.5-rc4 next-20230801] [cannot
> apply to sailus-media-tree/streams] [If your patch is applied to the
> wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-/
> scm.com%2Fdocs%2Fgit-format-
> patch%23_base_tree_information&data=05%7C01%7Cbiju.das.jz%40bp.renesas.c
> om%7C0a6df48bde964a9d1df208db930ec91c%7C53d82571da1947e49cb4625a166a4a2a
> %7C0%7C0%7C638265463936796169%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=p
> KKEfl6xAPN%2F3isXNWiWAvVClYEajI1Yih0NrnrohWI%3D&reserved=0]
>
> url:
> https://github/
> .com%2Fintel-lab-lkp%2Flinux%2Fcommits%2FBiju-Das%2Fdrivers-fwnode-
> Extend-device_get_match_data-to-struct-bus_type%2F20230802-
> 010931&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7C0a6df48bde964a9d1df
> 208db930ec91c%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C6382654639367
> 96169%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi
> I6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CUEi5wumZLT0TK8CAzNxKJ6tW
> csSgwP1y3m9IHDbAlo%3D&reserved=0
> base:
> https://git.ke/
> rnel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fwsa%2Flinux.git&data=05%7C
> 01%7Cbiju.das.jz%40bp.renesas.com%7C0a6df48bde964a9d1df208db930ec91c%7C5
> 3d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C638265463936796169%7CUnknown%7
> CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
> 6Mn0%3D%7C3000%7C%7C%7C&sdata=m7eaBOcvLLPUFOm4TZkwztRu68DeRSUm0k5I%2FFck
> 2Ok%3D&reserved=0 i2c/for-next
> patch link:
> https://lore.k/
> ernel.org%2Fr%2F20230801170318.82682-3-
> biju.das.jz%2540bp.renesas.com&data=05%7C01%7Cbiju.das.jz%40bp.renesas.c
> om%7C0a6df48bde964a9d1df208db930ec91c%7C53d82571da1947e49cb4625a166a4a2a
> %7C0%7C0%7C638265463936796169%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2
> 8xs5DcJNWd52QHMFU1Mp%2F%2FWz4rSWjbzA5EXBozJpbw%3D&reserved=0
> patch subject: [PATCH v3 2/2] i2c: Add i2c_device_get_match_data()
> callback
> config: hexagon-randconfig-r024-20230731
> (https://downl/
> oad.01.org%2F0day-ci%2Farchive%2F20230802%2F202308021149.cnDNnUAh-
> lkp%40intel.com%2Fconfig&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7C0
> a6df48bde964a9d1df208db930ec91c%7C53d82571da1947e49cb4625a166a4a2a%7C0%7
> C0%7C638265463936796169%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ
> IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=LH08RuO
> 8H23e6niXnY39LvZP5opxVNOlcrCWcbUSlLA%3D&reserved=0)
> compiler: clang version 14.0.6
> (https://githu/
> b.com%2Fllvm%2Fllvm-
> project.git&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7C0a6df48bde964a
> 9d1df208db930ec91c%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C63826546
> 3936796169%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
> CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mcqSYepniOPtvFzx7hv%
> 2FzYAkNGk%2BhzFjP3K4xY6ojPM%3D&reserved=0
> f28c006a5895fc0e329fe15fead81e37457cb1d1)
> reproduce:
> (https://downl/
> oad.01.org%2F0day-ci%2Farchive%2F20230802%2F202308021149.cnDNnUAh-
> lkp%40intel.com%2Freproduce&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%
> 7C0a6df48bde964a9d1df208db930ec91c%7C53d82571da1947e49cb4625a166a4a2a%7C
> 0%7C0%7C638265463936796169%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jDK%
> 2Be3Ghf14uVCvz%2BzPtNQrCxQ4PpxzqRJrnE3BTzLU%3D&reserved=0)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new
> version of the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes:
> | https://lore/
> | .kernel.org%2Foe-kbuild-all%2F202308021149.cnDNnUAh-lkp%40intel.com%2F
> | &data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7C0a6df48bde964a9d1df208d
> | b930ec91c%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C638265463936796
> | 169%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTi
> | I6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dmp8go7rkus5Z5pTxiss9OL
> | j49ja%2F3DPGWFcwzn397M%3D&reserved=0
>
> All error/warnings (new ones prefixed by >>):
>
>    In file included from drivers/i2c/i2c-core-slave.c:12:
>    In file included from include/linux/i2c.h:19:
>    In file included from include/linux/regulator/consumer.h:35:
>    In file included from include/linux/suspend.h:5:
>    In file included from include/linux/swap.h:9:
>    In file included from include/linux/memcontrol.h:13:
>    In file included from include/linux/cgroup.h:26:
>    In file included from include/linux/kernel_stat.h:9:
>    In file included from include/linux/interrupt.h:11:
>    In file included from include/linux/hardirq.h:11:
>    In file included
> from ./arch/hexagon/include/generated/asm/hardirq.h:1:
>    In file included from include/asm-generic/hardirq.h:17:
>    In file included from include/linux/irq.h:20:
>    In file included from include/linux/io.h:13:
>    In file included from arch/hexagon/include/asm/io.h:334:
>    include/asm-generic/io.h:547:31: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            val = __raw_readb(PCI_IOBASE + addr);
>                              ~~~~~~~~~~ ^
>    include/asm-generic/io.h:560:61: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE +
> addr));
>                                                            ~~~~~~~~~~ ^
>    include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded
> from macro '__le16_to_cpu'
>    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                                                      ^
>    In file included from drivers/i2c/i2c-core-slave.c:12:
>    In file included from include/linux/i2c.h:19:
>    In file included from include/linux/regulator/consumer.h:35:
>    In file included from include/linux/suspend.h:5:
>    In file included from include/linux/swap.h:9:
>    In file included from include/linux/memcontrol.h:13:
>    In file included from include/linux/cgroup.h:26:
>    In file included from include/linux/kernel_stat.h:9:
>    In file included from include/linux/interrupt.h:11:
>    In file included from include/linux/hardirq.h:11:
>    In file included
> from ./arch/hexagon/include/generated/asm/hardirq.h:1:
>    In file included from include/asm-generic/hardirq.h:17:
>    In file included from include/linux/irq.h:20:
>    In file included from include/linux/io.h:13:
>    In file included from arch/hexagon/include/asm/io.h:334:
>    include/asm-generic/io.h:573:61: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE +
> addr));
>                                                            ~~~~~~~~~~ ^
>    include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded
> from macro '__le32_to_cpu'
>    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                                                      ^
>    In file included from drivers/i2c/i2c-core-slave.c:12:
>    In file included from include/linux/i2c.h:19:
>    In file included from include/linux/regulator/consumer.h:35:
>    In file included from include/linux/suspend.h:5:
>    In file included from include/linux/swap.h:9:
>    In file included from include/linux/memcontrol.h:13:
>    In file included from include/linux/cgroup.h:26:
>    In file included from include/linux/kernel_stat.h:9:
>    In file included from include/linux/interrupt.h:11:
>    In file included from include/linux/hardirq.h:11:
>    In file included
> from ./arch/hexagon/include/generated/asm/hardirq.h:1:
>    In file included from include/asm-generic/hardirq.h:17:
>    In file included from include/linux/irq.h:20:
>    In file included from include/linux/io.h:13:
>    In file included from arch/hexagon/include/asm/io.h:334:
>    include/asm-generic/io.h:584:33: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            __raw_writeb(value, PCI_IOBASE + addr);
>                                ~~~~~~~~~~ ^
>    include/asm-generic/io.h:594:59: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE +
> addr);
>                                                          ~~~~~~~~~~ ^
>    include/asm-generic/io.h:604:59: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE +
> addr);
>                                                          ~~~~~~~~~~ ^
>    In file included from drivers/i2c/i2c-core-slave.c:12:
> >> include/linux/i2c.h:1038:2: error: redefinition of
> 'i2c_of_match_device'
>    *i2c_of_match_device(const struct of_device_id *matches,
>     ^
>    include/linux/i2c.h:1031:2: note: previous definition is here
>    *i2c_of_match_device(const struct of_device_id *matches,
>     ^
>    6 warnings and 1 error generated.
> --
>    In file included from drivers/i2c/i2c-core-base.c:23:
>    In file included from include/linux/i2c.h:19:
>    In file included from include/linux/regulator/consumer.h:35:
>    In file included from include/linux/suspend.h:5:
>    In file included from include/linux/swap.h:9:
>    In file included from include/linux/memcontrol.h:13:
>    In file included from include/linux/cgroup.h:26:
>    In file included from include/linux/kernel_stat.h:9:
>    In file included from include/linux/interrupt.h:11:
>    In file included from include/linux/hardirq.h:11:
>    In file included
> from ./arch/hexagon/include/generated/asm/hardirq.h:1:
>    In file included from include/asm-generic/hardirq.h:17:
>    In file included from include/linux/irq.h:20:
>    In file included from include/linux/io.h:13:
>    In file included from arch/hexagon/include/asm/io.h:334:
>    include/asm-generic/io.h:547:31: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            val = __raw_readb(PCI_IOBASE + addr);
>                              ~~~~~~~~~~ ^
>    include/asm-generic/io.h:560:61: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE +
> addr));
>                                                            ~~~~~~~~~~ ^
>    include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded
> from macro '__le16_to_cpu'
>    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                                                      ^
>    In file included from drivers/i2c/i2c-core-base.c:23:
>    In file included from include/linux/i2c.h:19:
>    In file included from include/linux/regulator/consumer.h:35:
>    In file included from include/linux/suspend.h:5:
>    In file included from include/linux/swap.h:9:
>    In file included from include/linux/memcontrol.h:13:
>    In file included from include/linux/cgroup.h:26:
>    In file included from include/linux/kernel_stat.h:9:
>    In file included from include/linux/interrupt.h:11:
>    In file included from include/linux/hardirq.h:11:
>    In file included
> from ./arch/hexagon/include/generated/asm/hardirq.h:1:
>    In file included from include/asm-generic/hardirq.h:17:
>    In file included from include/linux/irq.h:20:
>    In file included from include/linux/io.h:13:
>    In file included from arch/hexagon/include/asm/io.h:334:
>    include/asm-generic/io.h:573:61: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE +
> addr));
>                                                            ~~~~~~~~~~ ^
>    include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded
> from macro '__le32_to_cpu'
>    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                                                      ^
>    In file included from drivers/i2c/i2c-core-base.c:23:
>    In file included from include/linux/i2c.h:19:
>    In file included from include/linux/regulator/consumer.h:35:
>    In file included from include/linux/suspend.h:5:
>    In file included from include/linux/swap.h:9:
>    In file included from include/linux/memcontrol.h:13:
>    In file included from include/linux/cgroup.h:26:
>    In file included from include/linux/kernel_stat.h:9:
>    In file included from include/linux/interrupt.h:11:
>    In file included from include/linux/hardirq.h:11:
>    In file included
> from ./arch/hexagon/include/generated/asm/hardirq.h:1:
>    In file included from include/asm-generic/hardirq.h:17:
>    In file included from include/linux/irq.h:20:
>    In file included from include/linux/io.h:13:
>    In file included from arch/hexagon/include/asm/io.h:334:
>    include/asm-generic/io.h:584:33: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            __raw_writeb(value, PCI_IOBASE + addr);
>                                ~~~~~~~~~~ ^
>    include/asm-generic/io.h:594:59: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE +
> addr);
>                                                          ~~~~~~~~~~ ^
>    include/asm-generic/io.h:604:59: warning: performing pointer
> arithmetic on a null pointer has undefined behavior [-Wnull-pointer-
> arithmetic]
>            __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE +
> addr);
>                                                          ~~~~~~~~~~ ^
>    In file included from drivers/i2c/i2c-core-base.c:23:
> >> include/linux/i2c.h:1038:2: error: redefinition of
> 'i2c_of_match_device'
>    *i2c_of_match_device(const struct of_device_id *matches,
>     ^
>    include/linux/i2c.h:1031:2: note: previous definition is here
>    *i2c_of_match_device(const struct of_device_id *matches,
>     ^
> >> drivers/i2c/i2c-core-base.c:146:11: error: implicit declaration of
> >> function 'i2c_of_match_device_sysfs' is invalid in C99
> >> [-Werror,-Wimplicit-function-declaration]
>                    match = i2c_of_match_device_sysfs(dev->driver-
> >of_match_table,
>                            ^
>    drivers/i2c/i2c-core-base.c:146:11: note: did you mean
> 'i2c_of_match_device'?
>    include/linux/i2c.h:1038:2: note: 'i2c_of_match_device' declared here
>    *i2c_of_match_device(const struct of_device_id *matches,
>     ^
> >> drivers/i2c/i2c-core-base.c:146:9: warning: incompatible integer to
> >> pointer conversion assigning to 'const struct of_device_id *' from
> >> 'int' [-Wint-conversion]
>                    match = i2c_of_match_device_sysfs(dev->driver-
> >of_match_table,
>                          ^
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    7 warnings and 2 errors generated.
>
>
> vim +/i2c_of_match_device +1038 include/linux/i2c.h
>
>   1036
>   1037        static inline const struct of_device_id
> > 1038        *i2c_of_match_device(const struct of_device_id *matches,
>   1039                             struct i2c_client *client)
>   1040        {
>   1041                return NULL;
>   1042        }
>   1043
>
> --
> 0-DAY CI Kernel Test Service
> https://github/
> .com%2Fintel%2Flkp-
> tests%2Fwiki&data=05%7C01%7Cbiju.das.jz%40bp.renesas.com%7C0a6df48bde964
> a9d1df208db930ec91c%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C6382654
> 63936796169%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi
> LCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RfyYpwqM0HOM%2BLuRc
> vB4%2F1qYFLQwDKwj9bCbA6Y965c%3D&reserved=0




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux