From: Stefan Achatz <erazor_de@users.sourceforge.net>
To: Randy Dunlap <rdunlap@xenotime.net>,
Greg Kroah-Hartman <gregkh@suse.de>,
Jiri Kosina <jkosina@suse.cz>,
Stefan Achatz <erazor_de@users.sourceforge.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers
Date: Fri, 26 Nov 2010 20:57:36 +0100 [thread overview]
Message-ID: <1290801456.18750.164.camel@neuromancer> (raw)
Using pack pragma to prevent padding bytes in binary data structures
used for hardware communication. Explanation of these pragmas was requested.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
---
drivers/hid/hid-roccat-kone.h | 3 +++
drivers/hid/hid-roccat-pyra.h | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-roccat-kone.h b/drivers/hid/hid-roccat-kone.h
index 130d656..11203a7 100644
--- a/drivers/hid/hid-roccat-kone.h
+++ b/drivers/hid/hid-roccat-kone.h
@@ -14,6 +14,9 @@
#include <linux/types.h>
+/*
+ * Binary data structures used for hardware communication must have no padding.
+ */
#pragma pack(push)
#pragma pack(1)
diff --git a/drivers/hid/hid-roccat-pyra.h b/drivers/hid/hid-roccat-pyra.h
index 22f80a8..ac5996e 100644
--- a/drivers/hid/hid-roccat-pyra.h
+++ b/drivers/hid/hid-roccat-pyra.h
@@ -14,6 +14,9 @@
#include <linux/types.h>
+/*
+ * Binary data structures used for hardware communication must have no padding.
+ */
#pragma pack(push)
#pragma pack(1)
--
1.7.2.3
next reply other threads:[~2010-11-26 19:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-26 19:57 Stefan Achatz [this message]
2010-11-26 20:50 ` [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers Ben Hutchings
2010-11-27 7:35 ` [PATCH] HID: roccat: replaced #pragma pack() with __packed macro Stefan Achatz
2010-11-30 17:40 ` [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers Greg KH
2010-12-02 15:04 ` Jiri Kosina
2010-12-02 15:16 ` Greg KH
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=1290801456.18750.164.camel@neuromancer \
--to=erazor_de@users.sourceforge.net \
--cc=gregkh@suse.de \
--cc=jkosina@suse.cz \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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