Message ID | 1290801456.18750.164.camel@neuromancer |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
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.
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 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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,
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 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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)
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(-)