Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Steven J. Hill" <sjhill@realitydiluted.com>,
	Linux/MIPS Development <linux-mips@oss.sgi.com>
Subject: Re: [PATCH] Removal of warning messages for gdb-stub.c
Date: Fri, 8 Feb 2002 12:42:26 -0500	[thread overview]
Message-ID: <20020208124226.A24322@nevyn.them.org> (raw)
In-Reply-To: <Pine.GSO.4.21.0202081713590.19681-100000@vervain.sonytel.be>

On Fri, Feb 08, 2002 at 05:16:00PM +0100, Geert Uytterhoeven wrote:
> On Fri, 8 Feb 2002, Steven J. Hill wrote:
> > Just more clean ups. I tested it, it works.
> > 
> > -Steve
> > 
> > diff -urN -X cvs-exc.txt mipslinux-2.4.17-xfs/arch/mips/kernel/gdb-stub.c settop/arch/mips/kernel/gdb-stub.c
> > --- mipslinux-2.4.17-xfs/arch/mips/kernel/gdb-stub.c	Thu Nov 29 09:13:08 2001
> > +++ settop/arch/mips/kernel/gdb-stub.c	Fri Feb  8 09:14:52 2002
> > @@ -306,7 +306,7 @@
> >  	unsigned char ch;
> >  
> >  	while (count-- > 0) {
> > -		if (kgdb_read_byte(mem++, &ch) != 0)
> > +		if (kgdb_read_byte((unsigned *) mem++, (unsigned *) &ch) != 0)
> >  			return 0;
> >  		*buf++ = hexchars[ch >> 4];
> >  		*buf++ = hexchars[ch & 0xf];
> > @@ -332,7 +332,7 @@
> >  	{
> >  		ch = hex(*buf++) << 4;
> >  		ch |= hex(*buf++);
> > -		if (kgdb_write_byte(ch, mem++) != 0)
> > +		if (kgdb_write_byte((unsigned) ch, (unsigned *) mem++) != 0)
> >  			return 0;
> >  	}
> >  
> 
> Wouldn't it be better to change the prototypes
> 
> | int kgdb_read_byte(unsigned *address, unsigned *dest);
> | int kgdb_write_byte(unsigned val, unsigned *dest);
> 
> instead?
> 
> If these routines work on bytes, why have them taking unsigned (wasn't plain
> `unsigned' deprecated in some recent C standard?) parameters instead of char
> parameters?

Because Ralf dropped one of my patches, or messed up a merge, or more
likely I simply sent him a bad patch.  My working directory from when I
remember writing those functions says unsigned char...

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

      reply	other threads:[~2002-02-08 17:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-08 15:33 [PATCH] Removal of warning messages for gdb-stub.c Steven J. Hill
2002-02-08 16:16 ` Geert Uytterhoeven
2002-02-08 17:42   ` Daniel Jacobowitz [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=20020208124226.A24322@nevyn.them.org \
    --to=dan@debian.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-mips@oss.sgi.com \
    --cc=sjhill@realitydiluted.com \
    /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