Remove unnecessary M_NOWAIT.

This commit is contained in:
Hidetoshi Shimokawa 2003-02-03 09:41:42 +00:00
parent 38356d1097
commit beb19fc5dd
2 changed files with 7 additions and 8 deletions

View File

@ -631,12 +631,12 @@ fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
return(EINVAL);
}
ir->bulkxfer
= (struct fw_bulkxfer *)malloc(sizeof(struct fw_bulkxfer) * ibufreq->rx.nchunk, M_FW, M_NOWAIT);
= (struct fw_bulkxfer *)malloc(sizeof(struct fw_bulkxfer) * ibufreq->rx.nchunk, M_FW, 0);
if(ir->bulkxfer == NULL){
return(ENOMEM);
}
it->bulkxfer
= (struct fw_bulkxfer *)malloc(sizeof(struct fw_bulkxfer) * ibufreq->tx.nchunk, M_FW, M_NOWAIT);
= (struct fw_bulkxfer *)malloc(sizeof(struct fw_bulkxfer) * ibufreq->tx.nchunk, M_FW, 0);
if(it->bulkxfer == NULL){
return(ENOMEM);
}
@ -645,7 +645,7 @@ fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
/* XXX psize must be 2^n and less or
equal to PAGE_SIZE */
* ((ibufreq->rx.psize + 3) &~3),
M_FW, M_NOWAIT);
M_FW, 0);
if(ir->buf == NULL){
free(ir->bulkxfer, M_FW);
free(it->bulkxfer, M_FW);
@ -659,7 +659,7 @@ fw_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, fw_proc *td)
/* XXX psize must be 2^n and less or
equal to PAGE_SIZE */
* ((ibufreq->tx.psize + 3) &~3),
M_FW, M_NOWAIT);
M_FW, 0);
if(it->buf == NULL){
free(ir->bulkxfer, M_FW);
free(it->bulkxfer, M_FW);

View File

@ -1146,7 +1146,7 @@ fwohci_db_init(struct fwohci_dbch *dbch)
STAILQ_INIT(&dbch->db_trq);
db_tr = (struct fwohcidb_tr *)
malloc(sizeof(struct fwohcidb_tr) * dbch->ndb,
M_FW, M_NOWAIT | M_ZERO);
M_FW, M_ZERO);
if(db_tr == NULL){
printf("fwohci_db_init: malloc(1) failed\n");
return;
@ -1163,8 +1163,7 @@ fwohci_db_init(struct fwohci_dbch *dbch)
return;
}
for (i = 0; i < dbch->npages; i++) {
dbch->pages[i] = malloc(PAGE_SIZE, M_FW,
M_NOWAIT | M_ZERO);
dbch->pages[i] = malloc(PAGE_SIZE, M_FW, M_ZERO);
if (dbch->pages[i] == NULL) {
printf("fwohci_db_init: malloc(2) failed\n");
for (j = 0; j < i; j ++)
@ -1594,7 +1593,7 @@ fwohci_irxbuf_enable(struct firewire_comm *fc, int dmach)
ir->queued = 0;
dbch->ndb = ir->bnpacket * ir->bnchunk;
dbch->dummy = malloc(sizeof(u_int32_t) * dbch->ndb,
M_FW, M_NOWAIT);
M_FW, 0);
if (dbch->dummy == NULL) {
err = ENOMEM;
return err;