Re: [PATCH v1 4/9] can: Add Nuvoton NCT6694 CAN support

Ming Yu
2024-11-01T01:44:17Z

> | CC [M] drivers/net/can/nct6694_canfd.o
> | drivers/net/can/nct6694_canfd.c: In function ‘nct6694_canfd_start_xmit’:
> | drivers/net/can/nct6694_canfd.c:282:22: error: variable ‘echo_byte’ set but not used [-Werror=unused-but-set-variable]
> | 282 | unsigned int echo_byte;
> | | ^~~~~~~~~
> | drivers/net/can/nct6694_canfd.c: In function ‘nct6694_canfd_rx_work’:
> | drivers/net/can/nct6694_canfd.c:677:34: error: variable ‘stats’ set but not used [-Werror=unused-but-set-variable]
> | 677 | struct net_device_stats *stats;
> | | ^~~~~
> | cc1: all warnings being treated as errors
>
> If compiling with C=1, sparse throws the following errors:
>
> | drivers/net/can/nct6694_canfd.c:417:14: warning: cast to restricted __le32
> | drivers/net/can/nct6694_canfd.c:750:9: warning: cast to restricted __le32
> | drivers/net/can/nct6694_canfd.c:777:32: warning: cast to restricted __le32
>
> Marc
>

Okay! I will delete these unnecessary variables and correct the error in
the next patch.

Thanks,
Ming