Skip to content

Commit

Permalink
USB: m66592-udc: reduce size of data structure.
Browse files Browse the repository at this point in the history
Poking around with pahole, we see that m66592 handily shoves a u16 in
between larger types on 2 separate occasions leaving us with 2 2-byte
holes:

struct m66592 {
	...

	/* size: 1196, cachelines: 38 */
	/* sum members: 1192, holes: 2, sum holes: 4 */
	/* last cacheline: 12 bytes */
};	/* definitions: 1 */

Pairing them gets back 4-bytes:

struct m66592 {
	...

	/* size: 1192, cachelines: 38 */
	/* last cacheline: 8 bytes */
};	/* definitions: 1 */

Unfortunately it's not enough to save a cacheline with this massive
structure, but every byte helps.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Paul Mundt authored and Greg Kroah-Hartman committed Apr 25, 2008
1 parent 135db04 commit 96f9bc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/m66592-udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ struct m66592 {

struct usb_request *ep0_req; /* for internal request */
u16 ep0_data; /* for internal request */
u16 old_vbus;

struct timer_list timer;

u16 old_vbus;
int scount;

int old_dvsq;
Expand Down

0 comments on commit 96f9bc3

Please sign in to comment.