* Re: [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers
[not found] <1290801456.18750.164.camel@neuromancer>
@ 2010-11-26 20:50 ` Ben Hutchings
2010-11-30 17:40 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2010-11-26 20:50 UTC (permalink / raw)
To: erazor_de
Cc: Randy Dunlap, Greg Kroah-Hartman, Jiri Kosina, linux-doc,
linux-kernel, linux-input, netdev
On Fri, 2010-11-26 at 20:57 +0100, Stefan Achatz wrote:
> Using pack pragma to prevent padding bytes in binary data structures
> used for hardware communication. Explanation of these pragmas was requested.
[...]
It would be clearer to use the '__packed' macro after each structure
definition instead of using this awful Microsoft extension.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers
2010-11-26 20:50 ` [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers Ben Hutchings
@ 2010-11-30 17:40 ` Greg KH
2010-12-02 15:04 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2010-11-30 17:40 UTC (permalink / raw)
To: Ben Hutchings
Cc: erazor_de, Randy Dunlap, Greg Kroah-Hartman, Jiri Kosina,
linux-doc, linux-kernel, linux-input, netdev
On Fri, Nov 26, 2010 at 08:50:16PM +0000, Ben Hutchings wrote:
> On Fri, 2010-11-26 at 20:57 +0100, Stefan Achatz wrote:
> > Using pack pragma to prevent padding bytes in binary data structures
> > used for hardware communication. Explanation of these pragmas was requested.
> [...]
>
> It would be clearer to use the '__packed' macro after each structure
> definition instead of using this awful Microsoft extension.
I agree, that's the "normal" Linux way of doing things.
Other than that, this patch set looks good to me. Jiri, if the packed
change is made, do you want me to take these through my tree, or do you
want to take them through yours? Whatever is easier for you is fine
with me.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers
2010-11-30 17:40 ` Greg KH
@ 2010-12-02 15:04 ` Jiri Kosina
2010-12-02 15:16 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2010-12-02 15:04 UTC (permalink / raw)
To: Greg KH
Cc: Ben Hutchings, erazor_de, Randy Dunlap, Greg Kroah-Hartman,
linux-doc, linux-kernel, linux-input, netdev
On Tue, 30 Nov 2010, Greg KH wrote:
> > > Using pack pragma to prevent padding bytes in binary data structures
> > > used for hardware communication. Explanation of these pragmas was requested.
> > [...]
> >
> > It would be clearer to use the '__packed' macro after each structure
> > definition instead of using this awful Microsoft extension.
>
> I agree, that's the "normal" Linux way of doing things.
>
> Other than that, this patch set looks good to me. Jiri, if the packed
> change is made, do you want me to take these through my tree, or do you
> want to take them through yours? Whatever is easier for you is fine
> with me.
Hi Greg,
as this is part of larger roccat patchset, I will be processing it through
my tree once completely reviewed.
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers
2010-12-02 15:04 ` Jiri Kosina
@ 2010-12-02 15:16 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2010-12-02 15:16 UTC (permalink / raw)
To: Jiri Kosina
Cc: Greg KH, Ben Hutchings, erazor_de, Randy Dunlap, linux-doc,
linux-kernel, linux-input, netdev
On Thu, Dec 02, 2010 at 04:04:35PM +0100, Jiri Kosina wrote:
> On Tue, 30 Nov 2010, Greg KH wrote:
>
> > > > Using pack pragma to prevent padding bytes in binary data structures
> > > > used for hardware communication. Explanation of these pragmas was requested.
> > > [...]
> > >
> > > It would be clearer to use the '__packed' macro after each structure
> > > definition instead of using this awful Microsoft extension.
> >
> > I agree, that's the "normal" Linux way of doing things.
> >
> > Other than that, this patch set looks good to me. Jiri, if the packed
> > change is made, do you want me to take these through my tree, or do you
> > want to take them through yours? Whatever is easier for you is fine
> > with me.
>
> Hi Greg,
>
> as this is part of larger roccat patchset, I will be processing it through
> my tree once completely reviewed.
Great, feel free to add my:
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
to the driver core changes.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers
@ 2010-11-26 19:57 Stefan Achatz
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Achatz @ 2010-11-26 19:57 UTC (permalink / raw)
To: Randy Dunlap, Greg Kroah-Hartman, Jiri Kosina, Stefan Achatz,
linux-doc, l
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-02 15:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1290801456.18750.164.camel@neuromancer>
2010-11-26 20:50 ` [PATCH 3/5] HID: roccat: declaring meaning of pack pragma usage in driver headers Ben Hutchings
2010-11-30 17:40 ` Greg KH
2010-12-02 15:04 ` Jiri Kosina
2010-12-02 15:16 ` Greg KH
2010-11-26 19:57 Stefan Achatz
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).