Skip to content

Commit

Permalink
[PATCH] slab: remove SLAB_ATOMIC
Browse files Browse the repository at this point in the history
SLAB_ATOMIC is an alias of GFP_ATOMIC

Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Dec 7, 2006
1 parent f7267c0 commit 54e6ecb
Show file tree
Hide file tree
Showing 55 changed files with 107 additions and 108 deletions.
2 changes: 1 addition & 1 deletion drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ __alloc_tpd(struct he_dev *he_dev)
struct he_tpd *tpd;
dma_addr_t dma_handle;

tpd = pci_pool_alloc(he_dev->tpd_pool, SLAB_ATOMIC|SLAB_DMA, &dma_handle);
tpd = pci_pool_alloc(he_dev->tpd_pool, GFP_ATOMIC|SLAB_DMA, &dma_handle);
if (tpd == NULL)
return NULL;

Expand Down
2 changes: 1 addition & 1 deletion drivers/base/dmapool.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ dma_pool_alloc (struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)
}
}
}
if (!(page = pool_alloc_page (pool, SLAB_ATOMIC))) {
if (!(page = pool_alloc_page (pool, GFP_ATOMIC))) {
if (mem_flags & __GFP_WAIT) {
DECLARE_WAITQUEUE (wait, current);

Expand Down
4 changes: 2 additions & 2 deletions drivers/block/DAC960.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,13 @@ static boolean DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller)
Command->Next = Controller->FreeCommands;
Controller->FreeCommands = Command;
Controller->Commands[CommandIdentifier-1] = Command;
ScatterGatherCPU = pci_pool_alloc(ScatterGatherPool, SLAB_ATOMIC,
ScatterGatherCPU = pci_pool_alloc(ScatterGatherPool, GFP_ATOMIC,
&ScatterGatherDMA);
if (ScatterGatherCPU == NULL)
return DAC960_Failure(Controller, "AUXILIARY STRUCTURE CREATION");

if (RequestSensePool != NULL) {
RequestSenseCPU = pci_pool_alloc(RequestSensePool, SLAB_ATOMIC,
RequestSenseCPU = pci_pool_alloc(RequestSensePool, GFP_ATOMIC,
&RequestSenseDMA);
if (RequestSenseCPU == NULL) {
pci_pool_free(ScatterGatherPool, ScatterGatherCPU,
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/watchdog/pcwd_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_devi
usb_pcwd->intr_size = (le16_to_cpu(endpoint->wMaxPacketSize) > 8 ? le16_to_cpu(endpoint->wMaxPacketSize) : 8);

/* set up the memory buffer's */
if (!(usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, SLAB_ATOMIC, &usb_pcwd->intr_dma))) {
if (!(usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, GFP_ATOMIC, &usb_pcwd->intr_dma))) {
printk(KERN_ERR PFX "Out of memory\n");
goto error;
}
Expand Down
30 changes: 15 additions & 15 deletions drivers/ieee1394/raw1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static void host_reset(struct hpsb_host *host)
if (hi != NULL) {
list_for_each_entry(fi, &hi->file_info_list, list) {
if (fi->notification == RAW1394_NOTIFY_ON) {
req = __alloc_pending_request(SLAB_ATOMIC);
req = __alloc_pending_request(GFP_ATOMIC);

if (req != NULL) {
req->file_info = fi;
Expand Down Expand Up @@ -306,13 +306,13 @@ static void iso_receive(struct hpsb_host *host, int channel, quadlet_t * data,
if (!(fi->listen_channels & (1ULL << channel)))
continue;

req = __alloc_pending_request(SLAB_ATOMIC);
req = __alloc_pending_request(GFP_ATOMIC);
if (!req)
break;

if (!ibs) {
ibs = kmalloc(sizeof(*ibs) + length,
SLAB_ATOMIC);
GFP_ATOMIC);
if (!ibs) {
kfree(req);
break;
Expand Down Expand Up @@ -367,13 +367,13 @@ static void fcp_request(struct hpsb_host *host, int nodeid, int direction,
if (!fi->fcp_buffer)
continue;

req = __alloc_pending_request(SLAB_ATOMIC);
req = __alloc_pending_request(GFP_ATOMIC);
if (!req)
break;

if (!ibs) {
ibs = kmalloc(sizeof(*ibs) + length,
SLAB_ATOMIC);
GFP_ATOMIC);
if (!ibs) {
kfree(req);
break;
Expand Down Expand Up @@ -593,7 +593,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req)
switch (req->req.type) {
case RAW1394_REQ_LIST_CARDS:
spin_lock_irqsave(&host_info_lock, flags);
khl = kmalloc(sizeof(*khl) * host_count, SLAB_ATOMIC);
khl = kmalloc(sizeof(*khl) * host_count, GFP_ATOMIC);

if (khl) {
req->req.misc = host_count;
Expand Down Expand Up @@ -1045,7 +1045,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
}
if (arm_addr->notification_options & ARM_READ) {
DBGMSG("arm_read -> entering notification-section");
req = __alloc_pending_request(SLAB_ATOMIC);
req = __alloc_pending_request(GFP_ATOMIC);
if (!req) {
DBGMSG("arm_read -> rcode_conflict_error");
spin_unlock_irqrestore(&host_info_lock, irqflags);
Expand All @@ -1064,7 +1064,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
sizeof(struct arm_response) +
sizeof(struct arm_request_response);
}
req->data = kmalloc(size, SLAB_ATOMIC);
req->data = kmalloc(size, GFP_ATOMIC);
if (!(req->data)) {
free_pending_request(req);
DBGMSG("arm_read -> rcode_conflict_error");
Expand Down Expand Up @@ -1198,7 +1198,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid,
}
if (arm_addr->notification_options & ARM_WRITE) {
DBGMSG("arm_write -> entering notification-section");
req = __alloc_pending_request(SLAB_ATOMIC);
req = __alloc_pending_request(GFP_ATOMIC);
if (!req) {
DBGMSG("arm_write -> rcode_conflict_error");
spin_unlock_irqrestore(&host_info_lock, irqflags);
Expand All @@ -1209,7 +1209,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid,
sizeof(struct arm_request) + sizeof(struct arm_response) +
(length) * sizeof(byte_t) +
sizeof(struct arm_request_response);
req->data = kmalloc(size, SLAB_ATOMIC);
req->data = kmalloc(size, GFP_ATOMIC);
if (!(req->data)) {
free_pending_request(req);
DBGMSG("arm_write -> rcode_conflict_error");
Expand Down Expand Up @@ -1400,15 +1400,15 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
if (arm_addr->notification_options & ARM_LOCK) {
byte_t *buf1, *buf2;
DBGMSG("arm_lock -> entering notification-section");
req = __alloc_pending_request(SLAB_ATOMIC);
req = __alloc_pending_request(GFP_ATOMIC);
if (!req) {
DBGMSG("arm_lock -> rcode_conflict_error");
spin_unlock_irqrestore(&host_info_lock, irqflags);
return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
The request may be retried */
}
size = sizeof(struct arm_request) + sizeof(struct arm_response) + 3 * sizeof(*store) + sizeof(struct arm_request_response); /* maximum */
req->data = kmalloc(size, SLAB_ATOMIC);
req->data = kmalloc(size, GFP_ATOMIC);
if (!(req->data)) {
free_pending_request(req);
DBGMSG("arm_lock -> rcode_conflict_error");
Expand Down Expand Up @@ -1628,15 +1628,15 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
if (arm_addr->notification_options & ARM_LOCK) {
byte_t *buf1, *buf2;
DBGMSG("arm_lock64 -> entering notification-section");
req = __alloc_pending_request(SLAB_ATOMIC);
req = __alloc_pending_request(GFP_ATOMIC);
if (!req) {
spin_unlock_irqrestore(&host_info_lock, irqflags);
DBGMSG("arm_lock64 -> rcode_conflict_error");
return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
The request may be retried */
}
size = sizeof(struct arm_request) + sizeof(struct arm_response) + 3 * sizeof(*store) + sizeof(struct arm_request_response); /* maximum */
req->data = kmalloc(size, SLAB_ATOMIC);
req->data = kmalloc(size, GFP_ATOMIC);
if (!(req->data)) {
free_pending_request(req);
spin_unlock_irqrestore(&host_info_lock, irqflags);
Expand Down Expand Up @@ -2443,7 +2443,7 @@ static void queue_rawiso_event(struct file_info *fi)
/* only one ISO activity event may be in the queue */
if (!__rawiso_event_in_queue(fi)) {
struct pending_request *req =
__alloc_pending_request(SLAB_ATOMIC);
__alloc_pending_request(GFP_ATOMIC);

if (req) {
req->file_info = fi;
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/amso1100/c2_vq.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void vq_req_put(struct c2_dev *c2dev, struct c2_vq_req *r)
*/
void *vq_repbuf_alloc(struct c2_dev *c2dev)
{
return kmem_cache_alloc(c2dev->host_msg_cache, SLAB_ATOMIC);
return kmem_cache_alloc(c2dev->host_msg_cache, GFP_ATOMIC);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/mthca/mthca_av.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ int mthca_create_ah(struct mthca_dev *dev,
on_hca_fail:
if (ah->type == MTHCA_AH_PCI_POOL) {
ah->av = pci_pool_alloc(dev->av_table.pool,
SLAB_ATOMIC, &ah->avdma);
GFP_ATOMIC, &ah->avdma);
if (!ah->av)
return -ENOMEM;

Expand Down
20 changes: 10 additions & 10 deletions drivers/isdn/gigaset/bas-gigaset.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ static int atread_submit(struct cardstate *cs, int timeout)
ucs->rcvbuf, ucs->rcvbuf_size,
read_ctrl_callback, cs->inbuf);

if ((ret = usb_submit_urb(ucs->urb_cmd_in, SLAB_ATOMIC)) != 0) {
if ((ret = usb_submit_urb(ucs->urb_cmd_in, GFP_ATOMIC)) != 0) {
update_basstate(ucs, 0, BS_ATRDPEND);
dev_err(cs->dev, "could not submit HD_READ_ATMESSAGE: %s\n",
get_usb_rcmsg(ret));
Expand Down Expand Up @@ -747,7 +747,7 @@ static void read_int_callback(struct urb *urb)
check_pending(ucs);

resubmit:
rc = usb_submit_urb(urb, SLAB_ATOMIC);
rc = usb_submit_urb(urb, GFP_ATOMIC);
if (unlikely(rc != 0 && rc != -ENODEV)) {
dev_err(cs->dev, "could not resubmit interrupt URB: %s\n",
get_usb_rcmsg(rc));
Expand Down Expand Up @@ -807,7 +807,7 @@ static void read_iso_callback(struct urb *urb)
urb->number_of_packets = BAS_NUMFRAMES;
gig_dbg(DEBUG_ISO, "%s: isoc read overrun/resubmit",
__func__);
rc = usb_submit_urb(urb, SLAB_ATOMIC);
rc = usb_submit_urb(urb, GFP_ATOMIC);
if (unlikely(rc != 0 && rc != -ENODEV)) {
dev_err(bcs->cs->dev,
"could not resubmit isochronous read "
Expand Down Expand Up @@ -900,7 +900,7 @@ static int starturbs(struct bc_state *bcs)
}

dump_urb(DEBUG_ISO, "Initial isoc read", urb);
if ((rc = usb_submit_urb(urb, SLAB_ATOMIC)) != 0)
if ((rc = usb_submit_urb(urb, GFP_ATOMIC)) != 0)
goto error;
}

Expand Down Expand Up @@ -935,7 +935,7 @@ static int starturbs(struct bc_state *bcs)
/* submit two URBs, keep third one */
for (k = 0; k < 2; ++k) {
dump_urb(DEBUG_ISO, "Initial isoc write", urb);
rc = usb_submit_urb(ubc->isoouturbs[k].urb, SLAB_ATOMIC);
rc = usb_submit_urb(ubc->isoouturbs[k].urb, GFP_ATOMIC);
if (rc != 0)
goto error;
}
Expand Down Expand Up @@ -1042,7 +1042,7 @@ static int submit_iso_write_urb(struct isow_urbctx_t *ucx)
return 0; /* no data to send */
urb->number_of_packets = nframe;

rc = usb_submit_urb(urb, SLAB_ATOMIC);
rc = usb_submit_urb(urb, GFP_ATOMIC);
if (unlikely(rc)) {
if (rc == -ENODEV)
/* device removed - give up silently */
Expand Down Expand Up @@ -1341,7 +1341,7 @@ static void read_iso_tasklet(unsigned long data)
urb->dev = bcs->cs->hw.bas->udev;
urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = BAS_NUMFRAMES;
rc = usb_submit_urb(urb, SLAB_ATOMIC);
rc = usb_submit_urb(urb, GFP_ATOMIC);
if (unlikely(rc != 0 && rc != -ENODEV)) {
dev_err(cs->dev,
"could not resubmit isochronous read URB: %s\n",
Expand Down Expand Up @@ -1458,7 +1458,7 @@ static void write_ctrl_callback(struct urb *urb)
ucs->retry_ctrl);
/* urb->dev is clobbered by USB subsystem */
urb->dev = ucs->udev;
rc = usb_submit_urb(urb, SLAB_ATOMIC);
rc = usb_submit_urb(urb, GFP_ATOMIC);
if (unlikely(rc)) {
dev_err(&ucs->interface->dev,
"could not resubmit request 0x%02x: %s\n",
Expand Down Expand Up @@ -1517,7 +1517,7 @@ static int req_submit(struct bc_state *bcs, int req, int val, int timeout)
(unsigned char*) &ucs->dr_ctrl, NULL, 0,
write_ctrl_callback, ucs);
ucs->retry_ctrl = 0;
ret = usb_submit_urb(ucs->urb_ctrl, SLAB_ATOMIC);
ret = usb_submit_urb(ucs->urb_ctrl, GFP_ATOMIC);
if (unlikely(ret)) {
dev_err(bcs->cs->dev, "could not submit request 0x%02x: %s\n",
req, get_usb_rcmsg(ret));
Expand Down Expand Up @@ -1763,7 +1763,7 @@ static int atwrite_submit(struct cardstate *cs, unsigned char *buf, int len)
usb_sndctrlpipe(ucs->udev, 0),
(unsigned char*) &ucs->dr_cmd_out, buf, len,
write_command_callback, cs);
rc = usb_submit_urb(ucs->urb_cmd_out, SLAB_ATOMIC);
rc = usb_submit_urb(ucs->urb_cmd_out, GFP_ATOMIC);
if (unlikely(rc)) {
update_basstate(ucs, 0, BS_ATWRPEND);
dev_err(cs->dev, "could not submit HD_WRITE_ATMESSAGE: %s\n",
Expand Down
6 changes: 3 additions & 3 deletions drivers/isdn/gigaset/usb-gigaset.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ static void gigaset_read_int_callback(struct urb *urb)

if (resubmit) {
spin_lock_irqsave(&cs->lock, flags);
r = cs->connected ? usb_submit_urb(urb, SLAB_ATOMIC) : -ENODEV;
r = cs->connected ? usb_submit_urb(urb, GFP_ATOMIC) : -ENODEV;
spin_unlock_irqrestore(&cs->lock, flags);
if (r)
dev_err(cs->dev, "error %d when resubmitting urb.\n",
Expand Down Expand Up @@ -486,7 +486,7 @@ static int send_cb(struct cardstate *cs, struct cmdbuf_t *cb)
atomic_set(&ucs->busy, 1);

spin_lock_irqsave(&cs->lock, flags);
status = cs->connected ? usb_submit_urb(ucs->bulk_out_urb, SLAB_ATOMIC) : -ENODEV;
status = cs->connected ? usb_submit_urb(ucs->bulk_out_urb, GFP_ATOMIC) : -ENODEV;
spin_unlock_irqrestore(&cs->lock, flags);

if (status) {
Expand Down Expand Up @@ -664,7 +664,7 @@ static int write_modem(struct cardstate *cs)
ucs->bulk_out_endpointAddr & 0x0f),
ucs->bulk_out_buffer, count,
gigaset_write_bulk_callback, cs);
ret = usb_submit_urb(ucs->bulk_out_urb, SLAB_ATOMIC);
ret = usb_submit_urb(ucs->bulk_out_urb, GFP_ATOMIC);
} else {
ret = -ENODEV;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-usb/usb-urb.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static int usb_allocate_stream_buffers(struct usb_data_stream *stream, int num,
for (stream->buf_num = 0; stream->buf_num < num; stream->buf_num++) {
deb_mem("allocating buffer %d\n",stream->buf_num);
if (( stream->buf_list[stream->buf_num] =
usb_buffer_alloc(stream->udev, size, SLAB_ATOMIC,
usb_buffer_alloc(stream->udev, size, GFP_ATOMIC,
&stream->dma_addr[stream->buf_num]) ) == NULL) {
deb_mem("not enough memory for urb-buffer allocation.\n");
usb_free_stream_buffers(stream);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/ttusb-dec/ttusb_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ static int ttusb_dec_init_usb(struct ttusb_dec *dec)
return -ENOMEM;
}
dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE,
SLAB_ATOMIC, &dec->irq_dma_handle);
GFP_ATOMIC, &dec->irq_dma_handle);
if(!dec->irq_buffer) {
return -ENOMEM;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/s390/scsi/zfcp_fsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ zfcp_fsf_req_alloc(mempool_t *pool, int req_flags)
ptr = kmalloc(size, GFP_ATOMIC);
else
ptr = kmem_cache_alloc(zfcp_data.fsf_req_qtcb_cache,
SLAB_ATOMIC);
GFP_ATOMIC);
}

if (unlikely(!ptr))
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ void usb_hub_tt_clear_buffer (struct usb_device *udev, int pipe)
* since each TT has "at least two" buffers that can need it (and
* there can be many TTs per hub). even if they're uncommon.
*/
if ((clear = kmalloc (sizeof *clear, SLAB_ATOMIC)) == NULL) {
if ((clear = kmalloc (sizeof *clear, GFP_ATOMIC)) == NULL) {
dev_err (&udev->dev, "can't save CLEAR_TT_BUFFER state\n");
/* FIXME recover somehow ... RESET_TT? */
return;
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ void usb_sg_wait (struct usb_sg_request *io)
int retval;

io->urbs [i]->dev = io->dev;
retval = usb_submit_urb (io->urbs [i], SLAB_ATOMIC);
retval = usb_submit_urb (io->urbs [i], GFP_ATOMIC);

/* after we submit, let completions or cancelations fire;
* we handshake using io->status.
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/host/ehci-dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ show_periodic (struct class_device *class_dev, char *buf)
unsigned i;
__le32 tag;

if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, SLAB_ATOMIC)))
if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, GFP_ATOMIC)))
return 0;
seen_count = 0;

Expand Down
Loading

0 comments on commit 54e6ecb

Please sign in to comment.