summaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-01 12:22:38 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-19 10:00:34 -0400
commit8e6b85945155da5af95dc0fa58ae38b86428deea (patch)
treed1c21953d9c5e3018baec98d6cc76bd24c6b1771 /include/linux/usb.h
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff)
USB: usb.h: tweak struct urb to remove wasted space
By moving one field around in 'struct urb' we reduce the size of the structure by 8 bytes. Before the patch on x86_64 the overall size of the structure as reported by pahole was: /* size: 192, cachelines: 3, members: 30 */ /* sum members: 184, holes: 2, sum holes: 8 */ After the patch we now have: /* size: 184, cachelines: 3, members: 30 */ /* last cacheline: 56 bytes */ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 5e49e82c4368..4229eb74bd2c 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1545,10 +1545,10 @@ typedef void (*usb_complete_t)(struct urb *);
1545struct urb { 1545struct urb {
1546 /* private: usb core and host controller only fields in the urb */ 1546 /* private: usb core and host controller only fields in the urb */
1547 struct kref kref; /* reference count of the URB */ 1547 struct kref kref; /* reference count of the URB */
1548 int unlinked; /* unlink error code */
1548 void *hcpriv; /* private data for host controller */ 1549 void *hcpriv; /* private data for host controller */
1549 atomic_t use_count; /* concurrent submissions counter */ 1550 atomic_t use_count; /* concurrent submissions counter */
1550 atomic_t reject; /* submissions will fail */ 1551 atomic_t reject; /* submissions will fail */
1551 int unlinked; /* unlink error code */
1552 1552
1553 /* public: documented fields in the urb that can be used by drivers */ 1553 /* public: documented fields in the urb that can be used by drivers */
1554 struct list_head urb_list; /* list head for use by the urb's 1554 struct list_head urb_list; /* list head for use by the urb's