[Prism54-devel] [PATCH] use platform-independent types in isl_oid.h

Jens Maurer Jens.Maurer@gmx.net
Tue, 30 Dec 2003 22:45:26 +0100


This is a multi-part message in MIME format.
--------------040306060103080006000705
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hello!

isl_oid.h defines the communication protocol with the firmware.
Structure layouts are fixed, thus there are plenty of
__attribute__((packed)) so that gcc doesn't add padding.

That's great, except that there are a few places where
isl_oid.h uses "short" or "char" in the definition of the structs.
Those could be larger than 16 or 8 bits on a non-x86 platform.

I've replaced those with u16 and u8, assuming all the values
are unsigned anyway, see the attached patch.

Jens Maurer

--------------040306060103080006000705
Content-Type: text/plain;
 name="oid-struct-cleanup.patch"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="oid-struct-cleanup.patch"

LS0tIHByaXNtNTQtbmcuYmFja3VwL2tzcmMvaXNsX29pZC5oCUZyaSBEZWMgMjYgMTc6MzI6
MzEgMjAwMworKysgcHJpc201NC1uZy9rc3JjL2lzbF9vaWQuaAlUdWUgRGVjIDMwIDIyOjI3
OjE3IDIwMDMKQEAgLTI4LDEzICsyOCwxMyBAQAogCiBzdHJ1Y3Qgb2JqX3NzaWQgewogCXU4
IGxlbmd0aDsKLQljaGFyIG9jdGV0c1szM107CisJdTggb2N0ZXRzWzMzXTsKIH0gX19hdHRy
aWJ1dGVfXygocGFja2VkKSk7CiAKIHN0cnVjdCBvYmpfa2V5IHsKIAl1OCB0eXBlOyAvKiBk
b3QxMV9wcml2X3QgKi8KIAl1OCBsZW5ndGg7Ci0JY2hhciBrZXlbMzJdOworCXU4IGtleVsz
Ml07CiB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwogCiBzdHJ1Y3Qgb2JqX21sbWUgewpA
QCAtNjIsMjAgKzYyLDIwIEBACiAJdTggYWRkcmVzc1s2XTsKIAlpbnQgOiAxNjsgLyogcGFk
ZGluZyAqLwogCi0JY2hhciBzdGF0ZTsKLQljaGFyIHJlc2Vyd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