From: Hauke M. <ac...@ha...> - 2006-03-19 13:15:54
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Last week I installed gcc4.1 and glibc2.4 on my Desktop system and yesterday I compiled the acx module 20060215 against a 2.6.15 kernel and it outputs lots of warnings. It compiled successful but I haven't test it because in this PC isn't a acx100 card and my other PC is running with gcc3.4 and glibc 2.3 The log can be found here: http://www.hauke-m.de/fileadmin/acx/acx_gcc4.1_glibc2.4.log - -- Hauke Mehrtens Hauke Mehrtens Westpreu=DFenweg 10 27442 Gnarrenburg Tel. : 04763/1745 Mobil : 0162/1853062 ICQ : 160871207 Web : www.hauke-m.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEHVmeBQGWMWFrtlARAkqUAJ4pa7xBv3iVYbR1x2l/A+2XGSdpfACfRuum ZntZsPhP6Rt+7dZu3kQfIHs=3D =3DufbA -----END PGP SIGNATURE----- |
From: Carlos <ca...@cm...> - 2006-03-19 13:41:32
|
On Sunday 19 March 2006 14:16, Hauke Mehrtens wrote: > Last week I installed gcc4.1 and glibc2.4 on my Desktop system and > yesterday I compiled the acx module 20060215 against a 2.6.15 kernel and > it outputs lots of warnings. It compiled successful but I haven't test > it because in this PC isn't a acx100 card and my other PC is running > with gcc3.4 and glibc 2.3 > The log can be found here: > http://www.hauke-m.de/fileadmin/acx/acx_gcc4.1_glibc2.4.log That seems like quite an useless warning... Packed means that there is no padding between the fields in a structure. Th= is=20 padding makes it faster to access certain fields on memory, but you can't u= se=20 that to communicate with a device, which is why we sometimes require packin= g. I think the warnings just mean that it doesn't need packing, so it's ignori= ng=20 it. It may be better to just put packed at the end of the struct decl, sinc= e=20 it does the same IIRC, Denis, is this true? cmn =2D-=20 Carlos Mart=EDn Nieto | http://www.cmartin.tk Hobbyist programmer | |
From: Denis V. <vd...@il...> - 2006-03-20 06:56:13
|
On Sunday 19 March 2006 15:40, Carlos Mart=EDn wrote: > On Sunday 19 March 2006 14:16, Hauke Mehrtens wrote: > > Last week I installed gcc4.1 and glibc2.4 on my Desktop system and > > yesterday I compiled the acx module 20060215 against a 2.6.15 kernel and > > it outputs lots of warnings. It compiled successful but I haven't test > > it because in this PC isn't a acx100 card and my other PC is running > > with gcc3.4 and glibc 2.3 > > The log can be found here: > > http://www.hauke-m.de/fileadmin/acx/acx_gcc4.1_glibc2.4.log >=20 > That seems like quite an useless warning... >=20 > Packed means that there is no padding between the fields in a structure. = This=20 > padding makes it faster to access certain fields on memory, but you can't= use=20 > that to communicate with a device, which is why we sometimes require pack= ing. >=20 > I think the warnings just mean that it doesn't need packing, so it's igno= ring=20 > it. It may be better to just put packed at the end of the struct decl, si= nce=20 > it does the same IIRC, Denis, is this true? I'm not 100% sure. A counterexample would be interesting to have in the com= ments, to remove all doubt of future developers... =2D- vda |
From: Marcelo B. <mo...@mo...> - 2006-03-20 12:13:38
|
Actualy the warning is there beacause packed attribute must refer to the structure, not to the members. Try to change=20 On Sun, 2006-03-19 at 14:40 +0100, Carlos Mart=EDn wrote: > On Sunday 19 March 2006 14:16, Hauke Mehrtens wrote: > > Last week I installed gcc4.1 and glibc2.4 on my Desktop system and > > yesterday I compiled the acx module 20060215 against a 2.6.15 kernel = and > > it outputs lots of warnings. It compiled successful but I haven't tes= t > > it because in this PC isn't a acx100 card and my other PC is running > > with gcc3.4 and glibc 2.3 > > The log can be found here: > > http://www.hauke-m.de/fileadmin/acx/acx_gcc4.1_glibc2.4.log >=20 > That seems like quite an useless warning... >=20 > Packed means that there is no padding between the fields in a structure= . This=20 > padding makes it faster to access certain fields on memory, but you can= 't use=20 > that to communicate with a device, which is why we sometimes require pa= cking. >=20 > I think the warnings just mean that it doesn't need packing, so it's ig= noring=20 > it. It may be better to just put packed at the end of the struct decl, = since=20 > it does the same IIRC, Denis, is this true? >=20 > cmn |
From: Carlos <ca...@cm...> - 2006-03-20 17:20:05
|
On Monday 20 March 2006 13:13, Marcelo Bezerra wrote: > Actualy the warning is there beacause packed attribute must refer to the > structure, not to the members. Not quite, according to http://www.grok2.com/structure_packing.html you put= it=20 either to the fields or to the structure. I think it's warning because the u8s are alrady byte-aligned (or something)= ,=20 so the packed attribute doesn't do anything. It doesn't quite work if you typedef at the same time as you declare it, wh= ich=20 we have a tendency to do in the driver code, which is probably the problem= =20 Andi had. >Try to change That's a good idea anyway. cmn =2D-=20 Carlos Mart=EDn Nieto | http://www.cmartin.tk Hobbyist programmer | |
From: Andreas M. <an...@us...> - 2006-03-19 14:34:09
|
Hi, On Sun, Mar 19, 2006 at 02:40:23PM +0100, Carlos Mart=EDn wrote: > I think the warnings just mean that it doesn't need packing, so it's ig= noring=20 > it. It may be better to just put packed at the end of the struct decl, = since=20 > it does the same IIRC, Denis, is this true? Heh, that's what every single normal person on earth would think, but it really does seem to matter where *EXACTLY* you specify the packed attribute. I've been wrestling with acx100 driver for hours to get packin= g exactly right some months ago... (I did put a warning about packing in the header, or didn't I?) Crap, I really need to get back to some further driver maintenance real s= oon, methinks... (lots of things that would need integration) Andreas --=20 No programming skills!? Why not help translate many Linux applications!=20 https://launchpad.ubuntu.com/rosetta |
From: Carlos <ca...@cm...> - 2006-03-19 14:53:40
|
On Sunday 19 March 2006 15:33, Andreas Mohr wrote: > Hi, >=20 > On Sun, Mar 19, 2006 at 02:40:23PM +0100, Carlos Mart=EDn wrote: > > I think the warnings just mean that it doesn't need packing, so it's=20 ignoring=20 > > it. It may be better to just put packed at the end of the struct decl,= =20 since=20 > > it does the same IIRC, Denis, is this true? > Heh, that's what every single normal person on earth would think, > but it really does seem to matter where *EXACTLY* you specify the packed So if you put packed after the struct it doesn't put padding after the end = of=20 the struct, but it may put padding _inside_ the struct? Why would I want=20 that? Maybe using something like __attribute__((__pack_the_damn_fields__))= =20 would be useful. > attribute. I've been wrestling with acx100 driver for hours to get packing > exactly right some months ago... > (I did put a warning about packing in the header, or didn't I?) Indeed... acx_struct.h:1896:** NOTE: took me about an hour to get !@#$%^& packing rig= ht=20 =2D-> struct packing is eeeeevil... */ cmn =2D-=20 Carlos Mart=EDn Nieto | http://www.cmartin.tk Hobbyist programmer | |
From: Carlos <ca...@cm...> - 2006-03-19 15:06:10
|
On Sunday 19 March 2006 15:57, Carlos Mart=EDn wrote: > On Sunday 19 March 2006 15:33, Andreas Mohr wrote: > > Hi, > >=20 > > On Sun, Mar 19, 2006 at 02:40:23PM +0100, Carlos Mart=EDn wrote: > > > I think the warnings just mean that it doesn't need packing, so it's= =20 > ignoring=20 > > > it. It may be better to just put packed at the end of the struct decl= ,=20 > since=20 > > > it does the same IIRC, Denis, is this true? > > Heh, that's what every single normal person on earth would think, > > but it really does seem to matter where *EXACTLY* you specify the packed >=20 > So if you put packed after the struct it doesn't put padding after the en= d=20 of=20 > the struct, but it may put padding _inside_ the struct? Why would I want= =20 I've just realised. It's obvious when you see it used, of course... > that? Maybe using something like __attribute__((__pack_the_damn_fields__)= )=20 > would be useful. I still think this would be useful, though. cmn =2D-=20 Carlos Mart=EDn Nieto | http://www.cmartin.tk Hobbyist programmer | |