Hello All,
This is another cleanup patch changing positive return values into
negative's.
Yours Tony
Jan 22-26 2003 Linux.Conf.AU http://conf.linux.org.au/
The Australian Linux Technical Conference!
--------------------------------------------------------------------------- /* The "dev" argument isn't used. */ func_exit (); if ( p->RIOBooting ) { /* /* @@ -330,7 +330,7 @@ HostP->Copy( DownCode, StartP, rbp->Count ); rio_dprintk (RIO_DEBUG_BOOT, "Copy completed\n"); if ( !CmdBlkP ) { CmdBlkP->Packet.dest_unit = MapP->ID; if ( RIOQueueCmdBlk( HostP, MapP->ID-1, CmdBlkP) == RIO_FAIL ) { if ( !CmdBlkP ) { CmdBlkP->Packet.dest_unit = MapP->ID; if ( RIOQueueCmdBlk( HostP, MapP->ID-1, CmdBlkP) == RIO_FAIL ) { @@ -206,7 +206,7 @@ for ( Host = 0 ; Host < p->RIONumHosts; Host++ ) { if ( !CmdBlkP ) { CmdBlkP->Packet.dest_unit = MapP->ID; if ( RIOQueueCmdBlk( HostP, MapP->ID-1, CmdBlkP) == RIO_FAIL ) { @@ -279,17 +279,17 @@ if ( KillUnit.Link > 3 ) CmdBlkP = RIOGetCmdBlk(); if ( !CmdBlkP ) { CmdBlkP->Packet.dest_unit = 0; int if ( !CmdBlkP ) { CmdBlkP->Packet.dest_unit = ID; if ( RIOQueueCmdBlk( HostP, ID - 1, CmdBlkP) == RIO_FAIL ) { case RIO_ALL_MODEM: case RIO_GET_TABLE: { @@ -476,13 +476,13 @@ @@ -498,7 +498,7 @@ read more »
diff -X dontdiff -urN linux-2.4.19-pre10.clean/drivers/char/rio/rio_linux.c linux-2.4.19-pre10/drivers/char/rio/rio_linux.c
--- linux-2.4.19-pre10.clean/drivers/char/rio/rio_linux.c Tue Apr 30 13:22:07 2002
+++ linux-2.4.19-pre10/drivers/char/rio/rio_linux.c Tue Jun 4 16:27:36 2002
@@ -702,7 +702,7 @@
func_enter();
- rc = -riocontrol (p, 0, cmd, (void *)arg, suser ());
+ rc = riocontrol (p, 0, cmd, (void *)arg, suser ());
return rc;
diff -X dontdiff -urN linux-2.4.19-pre10.clean/drivers/char/rio/rioboot.c linux-2.4.19-pre10/drivers/char/rio/rioboot.c
--- linux-2.4.19-pre10.clean/drivers/char/rio/rioboot.c Tue Apr 30 13:22:07 2002
+++ linux-2.4.19-pre10/drivers/char/rio/rioboot.c Tue Jun 4 16:27:37 2002
@@ -129,7 +129,7 @@
p->RIOError.Error = HOST_FILE_TOO_LARGE;
/* restore(oldspl); */
func_exit ();
- return ENOMEM;
+ return -ENOMEM;
}
@@ -137,7 +137,7 @@
p->RIOError.Error = BOOT_IN_PROGRESS;
/* restore(oldspl); */
func_exit ();
- return EBUSY;
+ return -EBUSY;
}
@@ -165,7 +165,7 @@
p->RIOError.Error = COPYIN_FAILED;
/* restore(oldspl); */
func_exit ();
- return EFAULT;
+ return -EFAULT;
}
@@ -295,7 +295,7 @@
rio_dprintk (RIO_DEBUG_BOOT, "Bin too large\n");
p->RIOError.Error = HOST_FILE_TOO_LARGE;
func_exit ();
- return EFBIG;
+ return -EFBIG;
}
/*
** Ensure that the host really is stopped.
@@ -322,7 +322,7 @@
rio_dprintk (RIO_DEBUG_BOOT, "No system memory available\n");
p->RIOError.Error = NOT_ENOUGH_CORE_FOR_PCI_COPY;
func_exit ();
- return ENOMEM;
+ return -ENOMEM;
}
bzero(DownCode, rbp->Count);
rio_dprintk (RIO_DEBUG_BOOT, "Bad copyin of host data\n");
p->RIOError.Error = COPYIN_FAILED;
func_exit ();
- return EFAULT;
+ return -EFAULT;
}
@@ -341,7 +341,7 @@
rio_dprintk (RIO_DEBUG_BOOT, "Bad copyin of host data\n");
p->RIOError.Error = COPYIN_FAILED;
func_exit ();
- return EFAULT;
+ return -EFAULT;
}
diff -X dontdiff -urN linux-2.4.19-pre10.clean/drivers/char/rio/riocmd.c linux-2.4.19-pre10/drivers/char/rio/riocmd.c
--- linux-2.4.19-pre10.clean/drivers/char/rio/riocmd.c Tue Apr 30 13:22:07 2002
+++ linux-2.4.19-pre10/drivers/char/rio/riocmd.c Tue Jun 4 16:27:37 2002
@@ -98,7 +98,7 @@
rio_dprintk (RIO_DEBUG_CMD, "FOAD RTA: GetCmdBlk failed\n");
- return ENXIO;
+ return -ENXIO;
}
@@ -113,7 +113,7 @@
rio_dprintk (RIO_DEBUG_CMD, "FOAD RTA: Failed to queue foad command\n");
- return EIO;
+ return -EIO;
}
return 0;
}
@@ -131,7 +131,7 @@
rio_dprintk (RIO_DEBUG_CMD, "ZOMBIE RTA: GetCmdBlk failed\n");
- return ENXIO;
+ return -ENXIO;
}
@@ -146,7 +146,7 @@
rio_dprintk (RIO_DEBUG_CMD, "ZOMBIE RTA: Failed to queue zombie command\n");
- return EIO;
+ return -EIO;
}
return 0;
}
@@ -192,7 +192,7 @@
}
}
}
- return ENXIO;
+ return -ENXIO;
}
if ( copyin( (int)arg, (caddr_t)&IdRta, sizeof(IdRta) ) == COPYFAIL ) {
rio_dprintk (RIO_DEBUG_CMD, "RIO_IDENTIFY_RTA copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
- return EFAULT;
+ return -EFAULT;
}
@@ -238,7 +238,7 @@
rio_dprintk (RIO_DEBUG_CMD, "IDENTIFY RTA: GetCmdBlk failed\n");
- return ENXIO;
+ return -ENXIO;
}
@@ -252,7 +252,7 @@
rio_dprintk (RIO_DEBUG_CMD, "IDENTIFY RTA: Failed to queue command\n");
- return EIO;
+ return -EIO;
}
return 0;
}
@@ -260,7 +260,7 @@
}
}
}
- return ENOENT;
+ return -ENOENT;
}
if ( copyin( (int)arg, (caddr_t)&KillUnit, sizeof(KillUnit) ) == COPYFAIL ) {
rio_dprintk (RIO_DEBUG_CMD, "RIO_KILL_NEIGHBOUR copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
- return EFAULT;
+ return -EFAULT;
}
- return ENXIO;
+ return -ENXIO;
rio_dprintk (RIO_DEBUG_CMD, "UFOAD: GetCmdBlk failed\n");
- return ENXIO;
+ return -ENXIO;
}
@@ -310,7 +310,7 @@
if ( RIOQueueCmdBlk( HostP, RTAS_PER_HOST+KillUnit.Link,
CmdBlkP) == RIO_FAIL ) {
rio_dprintk (RIO_DEBUG_CMD, "UFOAD: Failed queue command\n");
- return EIO;
+ return -EIO;
}
return 0;
}
@@ -320,14 +320,14 @@
CmdBlkP->Packet.dest_unit = ID+1;
if ( RIOQueueCmdBlk( HostP, ID, CmdBlkP) == RIO_FAIL ) {
rio_dprintk (RIO_DEBUG_CMD, "UFOAD: Failed queue command\n");
- return EIO;
+ return -EIO;
}
return 0;
}
}
}
RIOFreeCmdBlk( CmdBlkP );
- return ENXIO;
+ return -ENXIO;
}
@@ -344,7 +344,7 @@
rio_dprintk (RIO_DEBUG_CMD, "SUSPEND BOOT ON RTA: GetCmdBlk failed\n");
- return ENXIO;
+ return -ENXIO;
}
@@ -359,7 +359,7 @@
rio_dprintk (RIO_DEBUG_CMD, "SUSPEND BOOT ON RTA: Failed to queue iwait command\n");
- return EIO;
+ return -EIO;
}
return 0;
}
diff -X dontdiff -urN linux-2.4.19-pre10.clean/drivers/char/rio/rioctrl.c linux-2.4.19-pre10/drivers/char/rio/rioctrl.c
--- linux-2.4.19-pre10.clean/drivers/char/rio/rioctrl.c Tue Apr 30 13:22:07 2002
+++ linux-2.4.19-pre10/drivers/char/rio/rioctrl.c Tue Jun 4 16:27:37 2002
@@ -230,7 +230,7 @@
}
}
} else if (host >= p->RIONumHosts) {
- return EINVAL;
+ return -EINVAL;
} else {
if ( p->RIOHosts[host].Flags == RC_RUNNING ) {
WWORD(p->RIOHosts[host].ParmMapP->timer , value);
@@ -320,12 +320,12 @@
sizeof(SpecialRupCmd)) == COPYFAIL ) {
rio_dprintk (RIO_DEBUG_CTRL, "SPECIAL_RUP_CMD copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
- return EFAULT;
+ return -EFAULT;
}
CmdBlkP = RIOGetCmdBlk();
if ( !CmdBlkP ) {
rio_dprintk (RIO_DEBUG_CTRL, "SPECIAL_RUP_CMD GetCmdBlk failed\n");
- return ENXIO;
+ return -ENXIO;
}
CmdBlkP->Packet = SpecialRupCmd.Packet;
if ( SpecialRupCmd.Host >= p->RIONumHosts )
@@ -345,12 +345,12 @@
return rio_RIODebugMemory(RIO_DEBUG_CTRL, arg);
else
#endif
- return EPERM;
+ return -EPERM;
rio_dprintk (RIO_DEBUG_CTRL, "RIO_ALL_MODEM\n");
p->RIOError.Error = IOCTL_COMMAND_UNKNOWN;
- return EINVAL;
+ return -EINVAL;
/*
@@ -365,7 +365,7 @@
TOTAL_MAP_ENTRIES*sizeof(struct Map)) == COPYFAIL) {
rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_TABLE copy failed\n");
p->RIOError.Error = COPYOUT_FAILED;
- return EFAULT;
+ return -EFAULT;
}
@@ -407,13 +407,13 @@
if ( !su ) {
rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_TABLE !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
- return EPERM;
+ return -EPERM;
}
if ( copyin((int)arg, (caddr_t)&p->RIOConnectTable[0],
TOTAL_MAP_ENTRIES*sizeof(struct Map) ) == COPYFAIL ) {
rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_TABLE copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
- return EFAULT;
+ return -EFAULT;
}
/*
***********************************
@@ -455,13 +455,13 @@
{
rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_BINDINGS !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
- return EPERM;
+ return -EPERM;
}
if (copyout((caddr_t) p->RIOBindTab, (int)arg,
(sizeof(ulong) * MAX_RTA_BINDINGS)) == COPYFAIL ) {
rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_BINDINGS copy failed\n");
p->RIOError.Error = COPYOUT_FAILED;
- return EFAULT;
+ return -EFAULT;
}
return 0;
{
rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_BINDINGS !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
- return EPERM;
+ return -EPERM;
}
if (copyin((int)arg, (caddr_t)&p->RIOBindTab[0],
(sizeof(ulong) * MAX_RTA_BINDINGS))==COPYFAIL ) {
rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_BINDINGS copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
- return EFAULT;
+ return -EFAULT;
}
return 0;
if ( !su ) {
rio_dprintk (RIO_DEBUG_CTRL, "RIO_BIND_RTA !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
- return EPERM;
+ return -EPERM;
}
for (Entry = 0; Entry < MAX_RTA_BINDINGS; Entry++) {
if ((EmptySlot == -1) && (p->RIOBindTab[Entry] == 0L))
@@ -535,17 +535,17 @@
if ((port < 0) || (port > 511)) {
rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESUME: Bad port number %d\n", port);
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
- return EINVAL;
+ return -EINVAL;
}
PortP = p->RIOPortp[port];
if (!PortP->Mapped) {
rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESUME: Port %d not mapped\n", port);
p->RIOError.Error = PORT_NOT_MAPPED_INTO_SYSTEM;
- return EINVAL;
+ return -EINVAL;
}
if (!(PortP->State & (RIO_LOPEN | RIO_MOPEN))) {
rio_dprintk
...