Linux CAN drivers development
 help / color / mirror / Atom feed
* [PATCH] can: virtio: Fix comment in UAPI header
@ 2026-06-04 22:57 Nathan Chancellor
  0 siblings, 0 replies; only message in thread
From: Nathan Chancellor @ 2026-06-04 22:57 UTC (permalink / raw)
  To: Harald Mommer, Matias Ezequiel Vara Larsen, Michael S. Tsirkin,
	Jason Wang
  Cc: Xuan Zhuo, Eugenio Pérez, Mikhail Golubev-Ciuchea,
	Marc Kleine-Budde, Francesco Valla, virtualization, linux-can,
	linux-kernel, llvm, Nathan Chancellor

When compile testing the UAPI headers with clang, there is an warning turned
error for using a C++ style ('//') comment, which is explicitly forbidden for
UAPI headers.

  In file included from <built-in>:1:
  ./usr/include/linux/virtio_can.h:29:35: error: // comments are not allowed in this language [-Werror,-Wcomment]
     29 | #define VIRTIO_CAN_MAX_DLEN    64 // this is like CANFD_MAX_DLEN
        |                                   ^
  1 error generated.

Switch to a standard C style comment.

Fixes: 2b6b4bb7d96f ("can: virtio: Add virtio CAN driver")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 include/uapi/linux/virtio_can.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/virtio_can.h b/include/uapi/linux/virtio_can.h
index 08d7e3e78776..e054d5099241 100644
--- a/include/uapi/linux/virtio_can.h
+++ b/include/uapi/linux/virtio_can.h
@@ -26,7 +26,7 @@
 #define VIRTIO_CAN_FLAGS_FD             0x4000
 #define VIRTIO_CAN_FLAGS_RTR            0x2000
 
-#define VIRTIO_CAN_MAX_DLEN    64 // this is like CANFD_MAX_DLEN
+#define VIRTIO_CAN_MAX_DLEN    64 /* this is like CANFD_MAX_DLEN */
 
 struct virtio_can_config {
 #define VIRTIO_CAN_S_CTRL_BUSOFF (1u << 0) /* Controller BusOff */

---
base-commit: 7a85231f762aa97b945878abb9a26683486836c6
change-id: 20260604-virtio_can-fix-uapi-comment-bcafa08b4b8a

Best regards,
--  
Cheers,
Nathan


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-04 22:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 22:57 [PATCH] can: virtio: Fix comment in UAPI header Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox