*/
if (cp == tp->nego_cp)
- tp->nego_cp = 0;
+ tp->nego_cp = NULL;
/*
** If auto-sense performed, change scsi status.
if (cp == lp->held_ccb) {
xpt_que_splice(&lp->skip_ccbq, &lp->wait_ccbq);
xpt_que_init(&lp->skip_ccbq);
- lp->held_ccb = 0;
+ lp->held_ccb = NULL;
}
}
} else {
script_ofs = dsp;
script_size = 0;
- script_base = 0;
+ script_base = NULL;
script_name = "mem";
}
if (!(cmd & 6)) {
cp = np->header.cp;
if (CCB_PHYS(cp, phys) != dsa)
- cp = 0;
+ cp = NULL;
} else {
cp = np->ccb;
while (cp && (CCB_PHYS (cp, phys) != dsa))
** try to find the interrupted script command,
** and the address at which to continue.
*/
- vdsp = 0;
+ vdsp = NULL;
nxtdsp = 0;
if (dsp > np->p_script &&
dsp <= np->p_script + sizeof(struct script)) {
u_char scntl3;
u_char chg, ofs, per, fak, wide;
u_char num = INB (nc_dsps);
- struct ccb *cp=0;
+ struct ccb *cp=NULL;
u_long dsa = INL (nc_dsa);
u_char target = INB (nc_sdid) & 0x0f;
struct tcb *tp = &np->target[target];
if (cp->magic) {
PRINT_LUN(np, tn, ln);
printk ("ccb free list corrupted (@%p)\n", cp);
- cp = 0;
+ cp = NULL;
}
else {
xpt_insque_tail(qp, &lp->wait_ccbq);
{
struct tcb *tp = &np->target[tn];
struct lcb *lp = tp->lp[ln];
- struct ccb *cp = 0;
+ struct ccb *cp = NULL;
/*
** Allocate memory for this CCB.
NCR_LOCK_NCB(np, flags);
ncr_exception(np);
done_list = np->done_list;
- np->done_list = 0;
+ np->done_list = NULL;
NCR_UNLOCK_NCB(np, flags);
if (DEBUG_FLAGS & DEBUG_TINY) printk ("]\n");
NCR_LOCK_NCB(np, flags);
ncr_timeout(np);
done_list = np->done_list;
- np->done_list = 0;
+ np->done_list = NULL;
NCR_UNLOCK_NCB(np, flags);
if (done_list) {
sts = ncr_reset_bus(np, cmd, 1);
done_list = np->done_list;
- np->done_list = 0;
+ np->done_list = NULL;
NCR_UNLOCK_NCB(np, flags);
ncr_flush_done_cmds(done_list);
sts = ncr_abort_command(np, cmd);
out:
done_list = np->done_list;
- np->done_list = 0;
+ np->done_list = NULL;
NCR_UNLOCK_NCB(np, flags);
ncr_flush_done_cmds(done_list);
#ifdef DEBUG_WAITING_LIST
printk("%s: cmd %lx inserted into waiting list\n", ncr_name(np), (u_long) cmd);
#endif
- cmd->next_wcmd = 0;
+ cmd->next_wcmd = NULL;
if (!(wcmd = np->waiting_list)) np->waiting_list = cmd;
else {
while ((wcmd->next_wcmd) != 0)
if (cmd == *pcmd) {
if (to_remove) {
*pcmd = (struct scsi_cmnd *) cmd->next_wcmd;
- cmd->next_wcmd = 0;
+ cmd->next_wcmd = NULL;
}
#ifdef DEBUG_WAITING_LIST
printk("%s: cmd %lx retrieved from waiting list\n", ncr_name(np), (u_long) cmd);
}
pcmd = (struct scsi_cmnd **) &(*pcmd)->next_wcmd;
}
- return 0;
+ return NULL;
}
static void process_waiting_list(struct ncb *np, int sts)
struct scsi_cmnd *waiting_list, *wcmd;
waiting_list = np->waiting_list;
- np->waiting_list = 0;
+ np->waiting_list = NULL;
#ifdef DEBUG_WAITING_LIST
if (waiting_list) printk("%s: waiting_list=%lx processing sts=%d\n", ncr_name(np), (u_long) waiting_list, sts);
#endif
while ((wcmd = waiting_list) != 0) {
waiting_list = (struct scsi_cmnd *) wcmd->next_wcmd;
- wcmd->next_wcmd = 0;
+ wcmd->next_wcmd = NULL;
if (sts == DID_OK) {
#ifdef DEBUG_WAITING_LIST
printk("%s: cmd %lx trying to requeue\n", ncr_name(np), (u_long) wcmd);
int length, int func)
{
struct host_data *host_data;
- struct ncb *ncb = 0;
+ struct ncb *ncb = NULL;
int retv;
#ifdef DEBUG_PROC_INFO
**==========================================================
*/
#ifdef MODULE
-char *ncr53c8xx = 0; /* command line passed by insmod */
+char *ncr53c8xx; /* command line passed by insmod */
MODULE_PARM(ncr53c8xx, "s");
#endif
int unit, struct ncr_device *device)
{
struct host_data *host_data;
- struct ncb *np = 0;
- struct Scsi_Host *instance = 0;
+ struct ncb *np = NULL;
+ struct Scsi_Host *instance = NULL;
u_long flags = 0;
int i;