Skip to contentSkip to conversation

New: Documentation: networking/can.rst contains incorrect definition for bcm_head_msg

Bug 217783 [email protected] 1 participant 2 messages Aug 10, 2023 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=217783

Bug ID: 217783
Summary: Documentation: networking/can.rst contains incorrect
definition for bcm_head_msg
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: man-pages
Assignee: [email protected]
Reporter: [email protected]
Regression: No

The documentation for bcm_msg_head is as follows in the doc:

struct bcm_msg_head {

        __u32 opcode;                   /* command */
        __u32 flags;                    /* special flags */
        __u32 count;                    /* run 'count' times with ival1 */
        struct timeval ival1, ival2;    /* count and subsequent interval */
        canid_t can_id;                 /* unique can_id for task */
        __u32 nframes;                  /* number of can_frames following */
        struct can_frame frames[0];
};

The last member is incorrect and should be struct can_frame frames[];. This causes problems with documentation further down that suggests using a super struct:

struct {
        struct bcm_msg_head msg_head;
        struct canfd_frame frame[5];
} msg;

which is illegal in later GCC versions with C++

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 217783] Documentation: networking/can.rst contains incorrect definition for bcm_head_msg

https://bugzilla.kernel.org/show_bug.cgi?id=217783

Mingye Wang ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Mingye Wang ([email protected]) --- Can confirm that the 0-length was replaced in Linux source code. Commit
https://github.com/torvalds/linux/commit/94dfc73e7cf4a31da66b8843f0b9283ddd6b8381

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.