linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] device.h: pack struct dev_links_info
@ 2019-02-26 14:41 Greg Kroah-Hartman
  2019-02-26 14:41 ` [PATCH 2/2] device.h: reorganize struct device Greg Kroah-Hartman
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Greg Kroah-Hartman @ 2019-02-26 14:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Rafael J. Wysocki

The dev_links_info structure has 4 bytes of padding at the end of it
when embedded in struct device (which is the only place it lives).  To
help reduce the size of struct device pack this structure so we can take
advantage of the hole with later structure reorganizations.

Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/linux/device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index 6cb4640b6160..b63165276a09 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -884,7 +884,7 @@ struct dev_links_info {
 	struct list_head suppliers;
 	struct list_head consumers;
 	enum dl_dev_state status;
-};
+} __packed;
 
 /**
  * struct device - The basic device structure
-- 
2.21.0


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

end of thread, other threads:[~2019-02-28 23:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26 14:41 [PATCH 1/2] device.h: pack struct dev_links_info Greg Kroah-Hartman
2019-02-26 14:41 ` [PATCH 2/2] device.h: reorganize struct device Greg Kroah-Hartman
2019-02-26 15:40 ` [PATCH 1/2] device.h: pack struct dev_links_info Rafael J. Wysocki
2019-02-27  9:23 ` Johan Hovold
2019-02-27  9:31   ` Greg Kroah-Hartman
2019-02-27  9:40     ` Johan Hovold
2019-02-27  9:54       ` Greg Kroah-Hartman
2019-02-27 10:59         ` Johan Hovold
2019-02-27 12:06           ` Greg Kroah-Hartman
2019-02-27 13:32             ` Johan Hovold
2019-02-28  8:35               ` Greg Kroah-Hartman
2019-02-28 23:43                 ` Rafael J. Wysocki
2019-02-28 13:58 ` [PATCH v2] device.h: reorganize struct device Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).