netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"David S . Miller" <davem@davemloft.net>
Cc: Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <yehezkel.bernat@intel.com>,
	Amir Levy <amir.jer.levy@intel.com>,
	Mario.Limonciello@dell.com, Lukas Wunner <lukas@wunner.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 02/19] thunderbolt: Remove __packed from ICM message structures
Date: Mon,  2 Oct 2017 13:38:29 +0300	[thread overview]
Message-ID: <20171002103846.64602-3-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20171002103846.64602-1-mika.westerberg@linux.intel.com>

These messages are all 32-byte aligned and they should be packed without
the __packed attribute just fine. It also allows compiler to generate
better code on some architectures.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Michael Jamet <michael.jamet@intel.com>
Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
---
 drivers/thunderbolt/tb_msgs.h | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/thunderbolt/tb_msgs.h b/drivers/thunderbolt/tb_msgs.h
index de6441e4a060..f3adf58a40ce 100644
--- a/drivers/thunderbolt/tb_msgs.h
+++ b/drivers/thunderbolt/tb_msgs.h
@@ -130,7 +130,7 @@ struct icm_pkg_header {
 	u8 flags;
 	u8 packet_id;
 	u8 total_packets;
-} __packed;
+};
 
 #define ICM_FLAGS_ERROR			BIT(0)
 #define ICM_FLAGS_NO_KEY		BIT(1)
@@ -139,20 +139,20 @@ struct icm_pkg_header {
 
 struct icm_pkg_driver_ready {
 	struct icm_pkg_header hdr;
-} __packed;
+};
 
 struct icm_pkg_driver_ready_response {
 	struct icm_pkg_header hdr;
 	u8 romver;
 	u8 ramver;
 	u16 security_level;
-} __packed;
+};
 
 /* Falcon Ridge & Alpine Ridge common messages */
 
 struct icm_fr_pkg_get_topology {
 	struct icm_pkg_header hdr;
-} __packed;
+};
 
 #define ICM_GET_TOPOLOGY_PACKETS	14
 
@@ -167,7 +167,7 @@ struct icm_fr_pkg_get_topology_response {
 	u32 reserved[2];
 	u32 ports[16];
 	u32 port_hop_info[16];
-} __packed;
+};
 
 #define ICM_SWITCH_USED			BIT(0)
 #define ICM_SWITCH_UPSTREAM_PORT_MASK	GENMASK(7, 1)
@@ -184,7 +184,7 @@ struct icm_fr_event_device_connected {
 	u8 connection_id;
 	u16 link_info;
 	u32 ep_name[55];
-} __packed;
+};
 
 #define ICM_LINK_INFO_LINK_MASK		0x7
 #define ICM_LINK_INFO_DEPTH_SHIFT	4
@@ -197,13 +197,13 @@ struct icm_fr_pkg_approve_device {
 	u8 connection_key;
 	u8 connection_id;
 	u16 reserved;
-} __packed;
+};
 
 struct icm_fr_event_device_disconnected {
 	struct icm_pkg_header hdr;
 	u16 reserved;
 	u16 link_info;
-} __packed;
+};
 
 struct icm_fr_pkg_add_device_key {
 	struct icm_pkg_header hdr;
@@ -212,7 +212,7 @@ struct icm_fr_pkg_add_device_key {
 	u8 connection_id;
 	u16 reserved;
 	u32 key[8];
-} __packed;
+};
 
 struct icm_fr_pkg_add_device_key_response {
 	struct icm_pkg_header hdr;
@@ -220,7 +220,7 @@ struct icm_fr_pkg_add_device_key_response {
 	u8 connection_key;
 	u8 connection_id;
 	u16 reserved;
-} __packed;
+};
 
 struct icm_fr_pkg_challenge_device {
 	struct icm_pkg_header hdr;
@@ -229,7 +229,7 @@ struct icm_fr_pkg_challenge_device {
 	u8 connection_id;
 	u16 reserved;
 	u32 challenge[8];
-} __packed;
+};
 
 struct icm_fr_pkg_challenge_device_response {
 	struct icm_pkg_header hdr;
@@ -239,7 +239,7 @@ struct icm_fr_pkg_challenge_device_response {
 	u16 reserved;
 	u32 challenge[8];
 	u32 response[8];
-} __packed;
+};
 
 /* Alpine Ridge only messages */
 
@@ -247,7 +247,7 @@ struct icm_ar_pkg_get_route {
 	struct icm_pkg_header hdr;
 	u16 reserved;
 	u16 link_info;
-} __packed;
+};
 
 struct icm_ar_pkg_get_route_response {
 	struct icm_pkg_header hdr;
@@ -255,6 +255,6 @@ struct icm_ar_pkg_get_route_response {
 	u16 link_info;
 	u32 route_hi;
 	u32 route_lo;
-} __packed;
+};
 
 #endif
-- 
2.14.2

  parent reply	other threads:[~2017-10-02 10:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 10:38 [PATCH v3 00/19] Thunderbolt networking Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 01/19] byteorder: Move {cpu_to_be32,be32_to_cpu}_array() from Thunderbolt to core Mika Westerberg
2017-10-02 10:38 ` Mika Westerberg [this message]
2017-10-02 11:45   ` [PATCH v3 02/19] thunderbolt: Remove __packed from ICM message structures Andy Shevchenko
2017-10-02 10:38 ` [PATCH v3 03/19] thunderbolt: Add support for XDomain properties Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 04/19] thunderbolt: Move enum tb_cfg_pkg_type to thunderbolt.h Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 05/19] thunderbolt: Move thunderbolt domain structure " Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 06/19] thunderbolt: Move tb_switch_phy_port_from_link() " Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 07/19] thunderbolt: Add support for XDomain discovery protocol Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 08/19] thunderbolt: Configure interrupt throttling for all interrupts Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 09/19] thunderbolt: Add support for frame mode Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 10/19] thunderbolt: Export ring handling functions to modules Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 11/19] thunderbolt: Move ring descriptor flags to thunderbolt.h Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 12/19] thunderbolt: Use spinlock in ring serialization Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 13/19] thunderbolt: Use spinlock in NHI serialization Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 14/19] thunderbolt: Add polling mode for rings Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 15/19] thunderbolt: Add function to retrieve DMA device for the ring Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 16/19] thunderbolt: Allocate ring HopID automatically if requested Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 17/19] MAINTAINERS: Add thunderbolt.h to the Thunderbolt driver entry Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 18/19] net: Add support for networking over Thunderbolt cable Mika Westerberg
2017-10-02 10:38 ` [PATCH v3 19/19] MAINTAINERS: Add entry for Thunderbolt network driver Mika Westerberg
2017-10-02 18:25 ` [PATCH v3 00/19] Thunderbolt networking David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171002103846.64602-3-mika.westerberg@linux.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=Mario.Limonciello@dell.com \
    --cc=amir.jer.levy@intel.com \
    --cc=andreas.noever@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=michael.jamet@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=yehezkel.bernat@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).