* [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST
@ 2025-07-15 11:28 Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 1/3] can: ti_hecc: fix -Woverflow compiler warning Vincent Mailhol
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Vincent Mailhol @ 2025-07-15 11:28 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: linux-can, linux-kernel, Vincent Mailhol
The ti_hecc and tscan1 CAN drivers can not be built on an x86_64
platform. Add the COMPILE_TEST dependency to allow build testing.
Doing that, a so far unnoticed W=0 warning showed up in ti_hecc. Fix
this warning. To prevent any potential noise in some future git
bisect, the warning is fixed before introducing COMPILE_TEST.
Note that the mscan and mpc5xxx drivers have the same issue but those
two use some helper functions, such as in_8() and out_8(), which are
only available on the powerpc platform. Those two drivers would
require some deeper code refactor to be built on x86_64 and are thus
left out of scope.
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
---
Changes in v2:
- Add HAS_IOPORT to tscan1's build depedencies
---
Vincent Mailhol (3):
can: ti_hecc: fix -Woverflow compiler warning
can: ti_hecc: Kconfig: add COMPILE_TEST
can: tscan1: Kconfig: add COMPILE_TEST
drivers/net/can/Kconfig | 2 +-
drivers/net/can/sja1000/Kconfig | 2 +-
drivers/net/can/ti_hecc.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
base-commit: 55e8757c696210292cfda6f1464991d6f5c4300f
change-id: 20250713-can-compile-test-933d513473a1
Best regards,
--
Vincent Mailhol <mailhol.vincent@wanadoo.fr>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] can: ti_hecc: fix -Woverflow compiler warning
2025-07-15 11:28 [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST Vincent Mailhol
@ 2025-07-15 11:28 ` Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 2/3] can: ti_hecc: Kconfig: add COMPILE_TEST Vincent Mailhol
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vincent Mailhol @ 2025-07-15 11:28 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: linux-can, linux-kernel, Vincent Mailhol
Fix below default (W=0) warning:
drivers/net/can/ti_hecc.c: In function 'ti_hecc_start':
drivers/net/can/ti_hecc.c:386:20: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744073709551599' to '4294967279' [-Woverflow]
386 | mbx_mask = ~BIT(HECC_RX_LAST_MBOX);
| ^
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
---
drivers/net/can/ti_hecc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 644e8b8eb91e74eec050841491f20d3e6796e9b7..e6d6661a908ab12eb4c7ec61c162848c18ef20f4 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -383,7 +383,7 @@ static void ti_hecc_start(struct net_device *ndev)
* overflows instead of the hardware silently dropping the
* messages.
*/
- mbx_mask = ~BIT(HECC_RX_LAST_MBOX);
+ mbx_mask = ~BIT_U32(HECC_RX_LAST_MBOX);
hecc_write(priv, HECC_CANOPC, mbx_mask);
/* Enable interrupts */
--
2.49.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] can: ti_hecc: Kconfig: add COMPILE_TEST
2025-07-15 11:28 [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 1/3] can: ti_hecc: fix -Woverflow compiler warning Vincent Mailhol
@ 2025-07-15 11:28 ` Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 3/3] can: tscan1: " Vincent Mailhol
2025-07-15 11:34 ` [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST Marc Kleine-Budde
3 siblings, 0 replies; 5+ messages in thread
From: Vincent Mailhol @ 2025-07-15 11:28 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: linux-can, linux-kernel, Vincent Mailhol
ti_hecc depends on ARM. Add COMPILE_TEST to the dependency list so
that this driver can also be built on other platforms.
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
---
drivers/net/can/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
index cf989bea9aa33356a94a9bb495d4c22ae907d436..d58fab0161b3ea6e12047c3fa0f884d0142002e7 100644
--- a/drivers/net/can/Kconfig
+++ b/drivers/net/can/Kconfig
@@ -201,7 +201,7 @@ config CAN_SUN4I
be called sun4i_can.
config CAN_TI_HECC
- depends on ARM
+ depends on ARM || COMPILE_TEST
tristate "TI High End CAN Controller"
select CAN_RX_OFFLOAD
help
--
2.49.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] can: tscan1: Kconfig: add COMPILE_TEST
2025-07-15 11:28 [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 1/3] can: ti_hecc: fix -Woverflow compiler warning Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 2/3] can: ti_hecc: Kconfig: add COMPILE_TEST Vincent Mailhol
@ 2025-07-15 11:28 ` Vincent Mailhol
2025-07-15 11:34 ` [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST Marc Kleine-Budde
3 siblings, 0 replies; 5+ messages in thread
From: Vincent Mailhol @ 2025-07-15 11:28 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: linux-can, linux-kernel, Vincent Mailhol
tscan1 depends on ISA. It also has a hidden dependency on HAS_IOPORT
as reported by the kernel test bot [1]. That dependency is implied by
ISA which explains why this was not an issue so far.
Add both COMPILE_TEST and HAS_IOPORT to the dependency list so that
this driver can also be built on other platforms.
[1] https://lore.kernel.org/linux-can/202507141417.qAMrchyV-lkp@intel.com/
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
---
Changelog:
v1 -> v2:
- Add HAS_IOPORT
---
drivers/net/can/sja1000/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
index 2f516cc6d22c4028b1de383baa6b3d3a7605b791..ba16d7bc09ef7e9551d9ce200f0febd19bf11eca 100644
--- a/drivers/net/can/sja1000/Kconfig
+++ b/drivers/net/can/sja1000/Kconfig
@@ -105,7 +105,7 @@ config CAN_SJA1000_PLATFORM
config CAN_TSCAN1
tristate "TS-CAN1 PC104 boards"
- depends on ISA
+ depends on ISA || (COMPILE_TEST && HAS_IOPORT)
help
This driver is for Technologic Systems' TSCAN-1 PC104 boards.
https://www.embeddedts.com/products/TS-CAN1
--
2.49.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST
2025-07-15 11:28 [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST Vincent Mailhol
` (2 preceding siblings ...)
2025-07-15 11:28 ` [PATCH v2 3/3] can: tscan1: " Vincent Mailhol
@ 2025-07-15 11:34 ` Marc Kleine-Budde
3 siblings, 0 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2025-07-15 11:34 UTC (permalink / raw)
To: Vincent Mailhol; +Cc: linux-can, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On 15.07.2025 20:28:10, Vincent Mailhol wrote:
> The ti_hecc and tscan1 CAN drivers can not be built on an x86_64
> platform. Add the COMPILE_TEST dependency to allow build testing.
>
> Doing that, a so far unnoticed W=0 warning showed up in ti_hecc. Fix
> this warning. To prevent any potential noise in some future git
> bisect, the warning is fixed before introducing COMPILE_TEST.
>
> Note that the mscan and mpc5xxx drivers have the same issue but those
> two use some helper functions, such as in_8() and out_8(), which are
> only available on the powerpc platform. Those two drivers would
> require some deeper code refactor to be built on x86_64 and are thus
> left out of scope.
Added to linux-can-next.
Thanks,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-15 11:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15 11:28 [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 1/3] can: ti_hecc: fix -Woverflow compiler warning Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 2/3] can: ti_hecc: Kconfig: add COMPILE_TEST Vincent Mailhol
2025-07-15 11:28 ` [PATCH v2 3/3] can: tscan1: " Vincent Mailhol
2025-07-15 11:34 ` [PATCH v2 0/3] can: Kconfig: add missing COMPILE_TEST Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).