public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [Bug 217783] New: Documentation: networking/can.rst contains incorrect definition for bcm_head_msg
@ 2023-08-10 14:41 bugzilla-daemon
  2023-08-10 18:38 ` [Bug 217783] " bugzilla-daemon
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla-daemon @ 2023-08-10 14:41 UTC (permalink / raw)
  To: linux-man

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: documentation_man-pages@kernel-bugs.osdl.org
          Reporter: kjeremy@gmail.com
        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++

-- 
You may reply to this email to add a comment.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug 217783] Documentation: networking/can.rst contains incorrect definition for bcm_head_msg
  2023-08-10 14:41 [Bug 217783] New: Documentation: networking/can.rst contains incorrect definition for bcm_head_msg bugzilla-daemon
@ 2023-08-10 18:38 ` bugzilla-daemon
  0 siblings, 0 replies; 2+ messages in thread
From: bugzilla-daemon @ 2023-08-10 18:38 UTC (permalink / raw)
  To: linux-man

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

Mingye Wang (arthur200126@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arthur200126@gmail.com

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

-- 
You may reply to this email to add a comment.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-10 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 14:41 [Bug 217783] New: Documentation: networking/can.rst contains incorrect definition for bcm_head_msg bugzilla-daemon
2023-08-10 18:38 ` [Bug 217783] " bugzilla-daemon

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