On Mon, Jun 30, 2008 at 10:47:23PM +0200, Rudolf Marek wrote:
@@ -97,7 +97,8 @@ if (!oddparity(readarr[1])) printf_debug("RDID byte 1 parity violation.\n"); manuf_id = (readarr[0] << 8) | readarr[1];
model_id = readarr[2];
model_id = (bytes == 3) ? readarr[2] :
((readarr[2] << 8) | readarr[3]);
Please improve this a bit, I suggest:
model_id=readarr[2]; if(bytes>3) { /* or 4==bytes */ model_id<<=8; model_id|=readarr[3]; }
With a fix (not neccessarily mine) for the above, this is:
Acked-by: Peter Stuge peter@stuge.se