All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Achatz <erazor_de@users.sourceforge.net>
To: Jiri Kosina <jkosina@suse.cz>
Cc: "Randy Dunlap" <rdunlap@xenotime.net>,
	"Bruno Prémont" <bonbons@linux-vserver.org>,
	"Stephane Chatty" <chatty@enac.fr>,
	"Don Prince" <dhprince-devel@yahoo.co.uk>,
	"Dmitry Torokhov" <dtor@mail.ru>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org
Subject: [PATCH 2/3] HID: roccat: declaring meaning of pack pragma usage in koneplus driver
Date: Sat, 06 Nov 2010 19:52:46 +0100	[thread overview]
Message-ID: <1289069566.5166.3.camel@neuromancer> (raw)
In-Reply-To: <alpine.LNX.2.00.1011051400250.15851@pobox.suse.cz>

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-koneplus.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-roccat-koneplus.h b/drivers/hid/hid-roccat-koneplus.h
index bf750fa..c25a799 100644
--- a/drivers/hid/hid-roccat-koneplus.h
+++ b/drivers/hid/hid-roccat-koneplus.h
@@ -14,6 +14,9 @@
 
 #include <linux/types.h>
 
+/*
+ * Binary data structures for communication with hardware must have no padding.
+ */
 #pragma pack(push)
 #pragma pack(1)
 
-- 
1.7.2.3




  parent reply	other threads:[~2010-11-06 18:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24 17:57 [PATCH] HID: roccat: Add support for Roccat Kone[+] Stefan Achatz
2010-11-04 18:25 ` Jiri Kosina
2010-11-05 17:42   ` Stefan Achatz
2010-11-05 18:01     ` Jiri Kosina
2010-11-06 18:51       ` [PATCH 1/3] HID: roccat: Reducing number of functions in kone and pyra drivers Stefan Achatz
2010-11-06 18:52       ` Stefan Achatz [this message]
2010-11-06 18:53       ` [PATCH 3/3] HID: roccat: declaring meaning of pack pragma usage in kone and pyra driver Stefan Achatz
2010-11-12 19:16       ` [PATCH] HID: roccat: Add support for Roccat Kone[+] Stefan Achatz
2010-11-05 17:53   ` [PATCH] HID: roccat: Using bin-attribute->private to reduce code duplication Stefan Achatz
2010-11-11  9:00 ` [PATCH] HID: roccat: Add support for Roccat Kone[+] Dmitry Torokhov

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=1289069566.5166.3.camel@neuromancer \
    --to=erazor_de@users.sourceforge.net \
    --cc=bonbons@linux-vserver.org \
    --cc=chatty@enac.fr \
    --cc=dhprince-devel@yahoo.co.uk \
    --cc=dtor@mail.ru \
    --cc=jkosina@suse.cz \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.