public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: dhowells@redhat.com, Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 09/12] mn10300: use the common ascii hex helpers
Date: Wed, 14 May 2008 12:28:47 +0100	[thread overview]
Message-ID: <1533.1210764527@redhat.com> (raw)
In-Reply-To: <1210619142.24092.60.camel@brick>

Harvey Harrison <harvey.harrison@gmail.com> 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

      reply	other threads:[~2008-05-14 11:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12 19:05 [PATCH 09/12] mn10300: use the common ascii hex helpers Harvey Harrison
2008-05-14 11:28 ` David Howells [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533.1210764527@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox