projects/linux·commit 8cb2c928

can: virtio: Fix comment in UAPI header

8cb2c928 · Nathan Chancellor <[email protected]> · 2026-06-04 15:57:15 -07:00

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 <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Message-ID: <20260604-virtio_can-fix-uapi-comment-v1-1-199fa96ec5f0@kernel.org>
Commit
8cb2c9285e4ce9154f45fb15633ebd45dfd8d9cf
Parents
083082a4

Changes

1 files changed · +1 −1

FileStatusAddDelContent
include/uapi/linux/virtio_can.hmodified+1−1View file

include/uapi/linux/virtio_can.h

View file
diff --git a/include/uapi/linux/virtio_can.h b/include/uapi/linux/virtio_can.h
index 08d7e3e..e054d50 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 */