Re: [PATCH 09/12] mn10300: use the common ascii hex helpers

From: David Howells
Date: Wed May 14 2008 - 07:29:01 EST


Harvey Harrison <harvey.harrison@xxxxxxxxx> wrote:

> @@ -1322,22 +1310,22 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
> *ptr++ = 'O';
> ptr = mem2hex(tbcberr, ptr, sizeof(tbcberr) - 1, 0);
>
> - hx = hexchars[(bcberr & 0xf0000000) >> 28];
> - *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf];
> - hx = hexchars[(bcberr & 0x0f000000) >> 24];
> - *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf];
> - hx = hexchars[(bcberr & 0x00f00000) >> 20];
> - *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf];
> - hx = hexchars[(bcberr & 0x000f0000) >> 16];
> - *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf];
> - hx = hexchars[(bcberr & 0x0000f000) >> 12];
> - *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf];
> - hx = hexchars[(bcberr & 0x00000f00) >> 8];
> - *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf];
> - hx = hexchars[(bcberr & 0x000000f0) >> 4];
> - *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf];
> - hx = hexchars[(bcberr & 0x0000000f)];
> - *ptr++ = hexchars[hx >> 4]; *ptr++ = hexchars[hx & 0xf];
> + hx = hex_asc_hi(excep >> 24);
> + ptr = pack_hex_byte(ptr, hx);
> + hx = hex_asc_lo(excep >> 24);
> + ptr = pack_hex_byte(ptr, hx);
> + hx = hex_asc_hi(excep >> 16);
> + ptr = pack_hex_byte(ptr, hx);
> + hx = hex_asc_lo(excep >> 16);
> + ptr = pack_hex_byte(ptr, hx);
> + hx = hex_asc_hi(excep >> 8);
> + ptr = pack_hex_byte(ptr, hx);
> + hx = hex_asc_lo(excep >> 8);
> + ptr = pack_hex_byte(ptr, hx);
> + hx = hex_asc_hi(excep);
> + ptr = pack_hex_byte(ptr, hx);
> + hx = hex_asc_lo(excep);
> + ptr = pack_hex_byte(ptr, hx);

NAK.

You made the code now emit excep rather than bcberr.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/