Re: [PATCH 2/2] mailbox: ti-msgmgr: Allow building under COMPILE_TEST

From: Andrew Davis
Date: Tue Oct 15 2024 - 17:43:14 EST


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,
},
};