Message ID | 1293408056-45428-1-git-send-email-andreas.faerber@web.de |
---|---|
State | New |
Headers | show |
On Mon, Dec 27, 2010 at 01:00:56AM +0100, Andreas Färber wrote: > When failing due to conflicting I/O port registrations, > include the offending I/O port address in the message. > > Signed-off-by: Andreas Färber <andreas.faerber@web.de> > --- > ioport.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ioport.c b/ioport.c > index aa4188a..349915f 100644 > --- a/ioport.c > +++ b/ioport.c > @@ -149,7 +149,7 @@ int register_ioport_read(pio_addr_t start, int length, int size, > for(i = start; i < start + length; i += size) { > ioport_read_table[bsize][i] = func; > if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) > - hw_error("register_ioport_read: invalid opaque"); > + hw_error("register_ioport_read: invalid opaque for 0x%x", i); > ioport_opaque[i] = opaque; > } > return 0; > @@ -168,7 +168,7 @@ int register_ioport_write(pio_addr_t start, int length, int size, > for(i = start; i < start + length; i += size) { > ioport_write_table[bsize][i] = func; > if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) > - hw_error("register_ioport_write: invalid opaque"); > + hw_error("register_ioport_write: invalid opaque for 0x%x", i); > ioport_opaque[i] = opaque; > } > return 0; The idea looks good, but "for 0x%x" looks strange. Maybe something like "for address 0x%x"?
diff --git a/ioport.c b/ioport.c index aa4188a..349915f 100644 --- a/ioport.c +++ b/ioport.c @@ -149,7 +149,7 @@ int register_ioport_read(pio_addr_t start, int length, int size, for(i = start; i < start + length; i += size) { ioport_read_table[bsize][i] = func; if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) - hw_error("register_ioport_read: invalid opaque"); + hw_error("register_ioport_read: invalid opaque for 0x%x", i); ioport_opaque[i] = opaque; } return 0; @@ -168,7 +168,7 @@ int register_ioport_write(pio_addr_t start, int length, int size, for(i = start; i < start + length; i += size) { ioport_write_table[bsize][i] = func; if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) - hw_error("register_ioport_write: invalid opaque"); + hw_error("register_ioport_write: invalid opaque for 0x%x", i); ioport_opaque[i] = opaque; } return 0;
When failing due to conflicting I/O port registrations, include the offending I/O port address in the message. Signed-off-by: Andreas Färber <andreas.faerber@web.de> --- ioport.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)