* [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver
@ 2024-10-14 14:48 Andrew Davis
2024-10-14 14:48 ` [PATCH 1/2] mailbox: ti-msgmgr: Remove use of of_match_ptr() helper Andrew Davis
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Andrew Davis @ 2024-10-14 14:48 UTC (permalink / raw)
To: Jassi Brar, Arnd Bergmann, Bjorn Andersson, Mathieu Poirier,
Martyn Welch, Hari Nagalla
Cc: linux-arm-kernel, linux-kernel, Andrew Davis
Hello all,
This driver can be compile tested on non-TI platforms. Enabling this
also allows compile testing of drivers down the dependency tree,
such as TI_SCI_PROTOCOL.
Thanks,
Andrew
Andrew Davis (2):
mailbox: ti-msgmgr: Remove use of of_match_ptr() helper
mailbox: ti-msgmgr: Allow building under COMPILE_TEST
drivers/mailbox/Kconfig | 2 +-
drivers/mailbox/ti-msgmgr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/2] mailbox: ti-msgmgr: Remove use of of_match_ptr() helper 2024-10-14 14:48 [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver Andrew Davis @ 2024-10-14 14:48 ` Andrew Davis 2024-10-14 14:52 ` Arnd Bergmann 2024-10-14 14:48 ` [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST Andrew Davis 2024-10-14 16:53 ` [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver Nishanth Menon 2 siblings, 1 reply; 9+ messages in thread From: Andrew Davis @ 2024-10-14 14:48 UTC (permalink / raw) To: Jassi Brar, Arnd Bergmann, Bjorn Andersson, Mathieu Poirier, Martyn Welch, Hari Nagalla Cc: linux-arm-kernel, linux-kernel, Andrew Davis When OF support is disabled the of_device_id struct match table can be conditionally compiled out, this helper allows the assignment to also be turned into a NULL conditionally. When the of_device_id struct is not conditionally defined based on OF then the table will be unused causing a warning. The two options are to either set the table as _maybe_unused, or to just remove this helper since the table will always be defined. Do the latter here. Signed-off-by: Andrew Davis <afd@ti.com> --- drivers/mailbox/ti-msgmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c index 9d2d4ff6cda40..8eb8df8d95a4c 100644 --- a/drivers/mailbox/ti-msgmgr.c +++ b/drivers/mailbox/ti-msgmgr.c @@ -920,7 +920,7 @@ static struct platform_driver ti_msgmgr_driver = { .probe = ti_msgmgr_probe, .driver = { .name = "ti-msgmgr", - .of_match_table = of_match_ptr(ti_msgmgr_of_match), + .of_match_table = ti_msgmgr_of_match, .pm = &ti_msgmgr_pm_ops, }, }; -- 2.39.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] mailbox: ti-msgmgr: Remove use of of_match_ptr() helper 2024-10-14 14:48 ` [PATCH 1/2] mailbox: ti-msgmgr: Remove use of of_match_ptr() helper Andrew Davis @ 2024-10-14 14:52 ` Arnd Bergmann 0 siblings, 0 replies; 9+ messages in thread From: Arnd Bergmann @ 2024-10-14 14:52 UTC (permalink / raw) To: Andrew Davis, Jassi Brar, Bjorn Andersson, Mathieu Poirier, Martyn Welch, Hari Nagalla Cc: linux-arm-kernel, linux-kernel On Mon, Oct 14, 2024, at 14:48, Andrew Davis wrote: > When OF support is disabled the of_device_id struct match table can be > conditionally compiled out, this helper allows the assignment to also be > turned into a NULL conditionally. When the of_device_id struct is not > conditionally defined based on OF then the table will be unused causing a > warning. The two options are to either set the table as _maybe_unused, or > to just remove this helper since the table will always be defined. > Do the latter here. > > Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Arnd Bergmann <arnd@arndb.de> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST 2024-10-14 14:48 [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver Andrew Davis 2024-10-14 14:48 ` [PATCH 1/2] mailbox: ti-msgmgr: Remove use of of_match_ptr() helper Andrew Davis @ 2024-10-14 14:48 ` Andrew Davis 2024-10-14 14:52 ` Arnd Bergmann 2024-10-15 20:46 ` kernel test robot 2024-10-14 16:53 ` [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver Nishanth Menon 2 siblings, 2 replies; 9+ messages in thread From: Andrew Davis @ 2024-10-14 14:48 UTC (permalink / raw) To: Jassi Brar, Arnd Bergmann, Bjorn Andersson, Mathieu Poirier, Martyn Welch, Hari Nagalla Cc: linux-arm-kernel, linux-kernel, Andrew Davis The TI message manager driver can be compiled without ARCH_KEYSTONE nor ARCH_K3 enabled. Allow it to be built under COMPILE_TEST. Signed-off-by: Andrew Davis <afd@ti.com> --- drivers/mailbox/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index 6fb995778636a..af721d769fdf2 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -127,7 +127,7 @@ config STI_MBOX config TI_MESSAGE_MANAGER tristate "Texas Instruments Message Manager Driver" - depends on ARCH_KEYSTONE || ARCH_K3 + depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST default ARCH_K3 help An implementation of Message Manager slave driver for Keystone -- 2.39.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST 2024-10-14 14:48 ` [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST Andrew Davis @ 2024-10-14 14:52 ` Arnd Bergmann 2024-10-15 20:46 ` kernel test robot 1 sibling, 0 replies; 9+ messages in thread From: Arnd Bergmann @ 2024-10-14 14:52 UTC (permalink / raw) To: Andrew Davis, Jassi Brar, Bjorn Andersson, Mathieu Poirier, Martyn Welch, Hari Nagalla Cc: linux-arm-kernel, linux-kernel On Mon, Oct 14, 2024, at 14:48, Andrew Davis wrote: > The TI message manager driver can be compiled without ARCH_KEYSTONE > nor ARCH_K3 enabled. Allow it to be built under COMPILE_TEST. > > Signed-off-by: Andrew Davis <afd@ti.com> Acked-by: Arnd Bergmann <arnd@arndb.de> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST 2024-10-14 14:48 ` [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST Andrew Davis 2024-10-14 14:52 ` Arnd Bergmann @ 2024-10-15 20:46 ` kernel test robot 2024-10-15 20:54 ` Arnd Bergmann 1 sibling, 1 reply; 9+ messages in thread From: kernel test robot @ 2024-10-15 20:46 UTC (permalink / raw) To: Andrew Davis, Jassi Brar, Arnd Bergmann, Bjorn Andersson, Mathieu Poirier, Martyn Welch, Hari Nagalla Cc: oe-kbuild-all, linux-arm-kernel, linux-kernel, Andrew Davis Hi Andrew, kernel test robot noticed the following build warnings: [auto build test WARNING on soc/for-next] [also build test WARNING on linus/master v6.12-rc3 next-20241015] [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/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Andrew-Davis/mailbox-ti-msgmgr-Remove-use-of-of_match_ptr-helper/20241014-225353 base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next patch link: https://lore.kernel.org/r/20241014144821.15094-3-afd%40ti.com patch subject: [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST config: hexagon-randconfig-r131-20241015 (https://download.01.org/0day-ci/archive/20241016/202410160435.WzzQa1p5-lkp@intel.com/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 70e0a7e7e6a8541bcc46908c592eed561850e416) reproduce: (https://download.01.org/0day-ci/archive/20241016/202410160435.WzzQa1p5-lkp@intel.com/reproduce) 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@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202410160435.WzzQa1p5-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/firmware/ti_sci.c:14: In file included from include/linux/io.h:14: In file included from arch/hexagon/include/asm/io.h:328: include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 548 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 561 | 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' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ In file included from drivers/firmware/ti_sci.c:14: In file included from include/linux/io.h:14: In file included from arch/hexagon/include/asm/io.h:328: include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 574 | 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' 35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ In file included from drivers/firmware/ti_sci.c:14: In file included from include/linux/io.h:14: In file included from arch/hexagon/include/asm/io.h:328: include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 585 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 595 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 605 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ drivers/firmware/ti_sci.c:200:20: warning: unused function 'ti_sci_debugfs_destroy' [-Wunused-function] 200 | static inline void ti_sci_debugfs_destroy(struct platform_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/firmware/ti_sci.c:3285:34: warning: unused variable 'ti_sci_of_match' [-Wunused-const-variable] 3285 | static const struct of_device_id ti_sci_of_match[] = { | ^~~~~~~~~~~~~~~ 8 warnings generated. vim +/ti_sci_of_match +3285 drivers/firmware/ti_sci.c aa276781a64a5f Nishanth Menon 2016-10-18 3284 aa276781a64a5f Nishanth Menon 2016-10-18 @3285 static const struct of_device_id ti_sci_of_match[] = { aa276781a64a5f Nishanth Menon 2016-10-18 3286 {.compatible = "ti,k2g-sci", .data = &ti_sci_pmmc_k2g_desc}, 754c9477ae7872 Peter Ujfalusi 2019-04-30 3287 {.compatible = "ti,am654-sci", .data = &ti_sci_pmmc_am654_desc}, aa276781a64a5f Nishanth Menon 2016-10-18 3288 { /* Sentinel */ }, aa276781a64a5f Nishanth Menon 2016-10-18 3289 }; aa276781a64a5f Nishanth Menon 2016-10-18 3290 MODULE_DEVICE_TABLE(of, ti_sci_of_match); aa276781a64a5f Nishanth Menon 2016-10-18 3291 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST 2024-10-15 20:46 ` kernel test robot @ 2024-10-15 20:54 ` Arnd Bergmann 2024-10-15 21:34 ` Andrew Davis 0 siblings, 1 reply; 9+ messages in thread From: Arnd Bergmann @ 2024-10-15 20:54 UTC (permalink / raw) To: kernel test robot, Andrew Davis, Jassi Brar, Bjorn Andersson, Mathieu Poirier, Martyn Welch, Hari Nagalla Cc: oe-kbuild-all, linux-arm-kernel, linux-kernel Hi Andrew, On Tue, Oct 15, 2024, at 20:46, kernel test robot wrote: > In file included from drivers/firmware/ti_sci.c:14: > In file included from include/linux/io.h:14: > In file included from arch/hexagon/include/asm/io.h:328: > include/asm-generic/io.h:548:31: warning: performing pointer > arithmetic on a null pointer has undefined behavior > [-Wnull-pointer-arithmetic] > 548 | val = __raw_readb(PCI_IOBASE + addr); > | ~~~~~~~~~~ ^ > include/asm-generic/io.h:561:61: warning: performing pointer > arithmetic on a null pointer has undefined behavior > [-Wnull-pointer-arithmetic] > 561 | val = __le16_to_cpu((__le16 > __force)__raw_readw(PCI_IOBASE + addr)); > | Hopefully we will be able to finally address these in 6.13 for all drivers, it's been a decade. Don't worry about the above. > platform_device *dev, > | ^~~~~~~~~~~~~~~~~~~~~~ >>> drivers/firmware/ti_sci.c:3285:34: warning: unused variable 'ti_sci_of_match' [-Wunused-const-variable] > 3285 | static const struct of_device_id ti_sci_of_match[] = { > | ^~~~~~~~~~~~~~~ > 8 warnings generated. > Needs this change, please fold into your patch. diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 160968301b1f..6a6bf7a2d134 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -3421,7 +3421,7 @@ static struct platform_driver ti_sci_driver = { .probe = ti_sci_probe, .driver = { .name = "ti-sci", - .of_match_table = of_match_ptr(ti_sci_of_match), + .of_match_table = ti_sci_of_match, .suppress_bind_attrs = true, }, }; ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST 2024-10-15 20:54 ` Arnd Bergmann @ 2024-10-15 21:34 ` Andrew Davis 0 siblings, 0 replies; 9+ messages in thread From: Andrew Davis @ 2024-10-15 21:34 UTC (permalink / raw) To: Arnd Bergmann, kernel test robot, Jassi Brar, Bjorn Andersson, Mathieu Poirier, Martyn Welch, Hari Nagalla Cc: oe-kbuild-all, linux-arm-kernel, linux-kernel On 10/15/24 3:54 PM, Arnd Bergmann wrote: > Hi Andrew, > > On Tue, Oct 15, 2024, at 20:46, kernel test robot wrote: >> In file included from drivers/firmware/ti_sci.c:14: >> In file included from include/linux/io.h:14: >> In file included from arch/hexagon/include/asm/io.h:328: >> include/asm-generic/io.h:548:31: warning: performing pointer >> arithmetic on a null pointer has undefined behavior >> [-Wnull-pointer-arithmetic] >> 548 | val = __raw_readb(PCI_IOBASE + addr); >> | ~~~~~~~~~~ ^ >> include/asm-generic/io.h:561:61: warning: performing pointer >> arithmetic on a null pointer has undefined behavior >> [-Wnull-pointer-arithmetic] >> 561 | val = __le16_to_cpu((__le16 >> __force)__raw_readw(PCI_IOBASE + addr)); >> | > > > Hopefully we will be able to finally address these in 6.13 > for all drivers, it's been a decade. Don't worry about > the above. > > >> platform_device *dev, >> | ^~~~~~~~~~~~~~~~~~~~~~ >>>> drivers/firmware/ti_sci.c:3285:34: warning: unused variable 'ti_sci_of_match' [-Wunused-const-variable] >> 3285 | static const struct of_device_id ti_sci_of_match[] = { >> | ^~~~~~~~~~~~~~~ >> 8 warnings generated. >> > > Needs this change, please fold into your patch. Was going to clean this up in several places in another series, but will add this one to this series, v2 on the way. Andrew > > diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c > index 160968301b1f..6a6bf7a2d134 100644 > --- a/drivers/firmware/ti_sci.c > +++ b/drivers/firmware/ti_sci.c > @@ -3421,7 +3421,7 @@ static struct platform_driver ti_sci_driver = { > .probe = ti_sci_probe, > .driver = { > .name = "ti-sci", > - .of_match_table = of_match_ptr(ti_sci_of_match), > + .of_match_table = ti_sci_of_match, > .suppress_bind_attrs = true, > }, > }; > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver 2024-10-14 14:48 [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver Andrew Davis 2024-10-14 14:48 ` [PATCH 1/2] mailbox: ti-msgmgr: Remove use of of_match_ptr() helper Andrew Davis 2024-10-14 14:48 ` [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST Andrew Davis @ 2024-10-14 16:53 ` Nishanth Menon 2 siblings, 0 replies; 9+ messages in thread From: Nishanth Menon @ 2024-10-14 16:53 UTC (permalink / raw) To: Andrew Davis Cc: Jassi Brar, Arnd Bergmann, Bjorn Andersson, Mathieu Poirier, Martyn Welch, Hari Nagalla, linux-arm-kernel, linux-kernel On 09:48-20241014, Andrew Davis wrote: > Hello all, > > This driver can be compile tested on non-TI platforms. Enabling this > also allows compile testing of drivers down the dependency tree, > such as TI_SCI_PROTOCOL. > > Thanks, > Andrew > > Andrew Davis (2): > mailbox: ti-msgmgr: Remove use of of_match_ptr() helper > mailbox: ti-msgmgr: Allow building under COMPILE_TEST > > drivers/mailbox/Kconfig | 2 +- > drivers/mailbox/ti-msgmgr.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > -- > 2.39.2 > Reviewed-by: Nishanth Menon <nm@ti.com> -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-10-15 21:41 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-10-14 14:48 [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver Andrew Davis 2024-10-14 14:48 ` [PATCH 1/2] mailbox: ti-msgmgr: Remove use of of_match_ptr() helper Andrew Davis 2024-10-14 14:52 ` Arnd Bergmann 2024-10-14 14:48 ` [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST Andrew Davis 2024-10-14 14:52 ` Arnd Bergmann 2024-10-15 20:46 ` kernel test robot 2024-10-15 20:54 ` Arnd Bergmann 2024-10-15 21:34 ` Andrew Davis 2024-10-14 16:53 ` [PATCH 0/2] Enable compile testing of TI MSGMGR/SPROXY driver Nishanth Menon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox