Re: [PATCH] can: kvaser_pciefd: Use IS_ENABLED() instead of #ifdef

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

 



On 22.08.2024 18:38:59, Martin Jocic wrote:
> Use the IS_ENABLED() macro to check kernel config defines
> instead of #ifdef.
>
> Signed-off-by: Martin Jocic <martin.jocic@xxxxxxxxxx>

On platforms with CONFIG_ARCH_DMA_ADDR_T_64BIT not set this throws the
following warning:

| drivers/net/can/kvaser_pciefd.c: In function ‘kvaser_pciefd_write_dma_map_altera’:
| drivers/net/can/kvaser_pciefd.c:1058:30: error: right shift count >= width of type [-Werror=shift-count-overflow]
|  1058 |                 word2 = addr >> 32;
|       |                              ^~

I'm using upper_32_bits() to avoid this warning.
https://elixir.bootlin.com/linux/v6.10.6/source/include/linux/wordpart.h#L14

regards,
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: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux