Re: [irda-users] Kingsun KS-959 USB IrDA dongle - release?candidate for submission (try 1)

Samuel Ortiz <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.irda.general
Message-ID <[email protected]>
On Sat, Jul 21, 2007 at 12:04:27AM +0200, Oliver Neukum wrote:
> Hi,
> 
> > +struct ks959_speedparams {
> > +	__le32 baudrate;		/* baud rate, little endian */
> > +	unsigned int data_bits : 2;	/* data bits - 5 (5..8) */
> > +	unsigned int : 1;
> > +	unsigned int stop_bits : 1;
> > +	unsigned int parity_enable : 1;
> > +	unsigned int parity_type : 1;
> > +	unsigned int : 1;
> > +	unsigned int reset : 1;
> > +	__u8 reserved[3];
> > +} __attribute__ ((packed));
> 
> The attribute is not needed.
The driver uses sizeof(struct ks959_speedparams) in a couple places in
the code. If you don't pack it, the size will vary with different
architectures since it's not 32 bits aligned, so I think this attribute
is correct.

Cheers,
Samuel.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.