Skip to contentSkip to conversation

USB: usb.h: tweak struct urb to remove wasted space

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 2, 2019 USB

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw
Quoted 6 lines · Oliver Neukum
Quoted 5 lines · Greg Kroah-Hartman
Quoted 4 lines · Oliver Neukum
Quoted 2 lines · Greg Kroah-Hartman

By moving one field around in 'struct urb' we reduce the size of the structure by 8 bytes.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

If you are going for this I have to ask why unlink and status are full size ints anyway.

History, they hold a "normal" negative error code. I guess we could turn them into s16, if it really matters, but that feels odd to me.

Returning internal error codes to user space is a bug.

Where does status and unlink end up going to userspace? Maybe through usbfs?

confused,

greg k-h