projects/linux·commit dd0fc66f

[PATCH] gfp flags annotations - part 1

dd0fc66f · Al Viro <[email protected]> · 2005-10-07 07:46:04 +01:00

- added typedef unsigned int __nocast gfp_t;

 - replaced __nocast uses for gfp flags with gfp_t - it gives exactly
   the same warnings as far as sparse is concerned, doesn't change
   generated code (from gcc point of view we replaced unsigned int with
   typedef) and documents what's going on far better.

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
dd0fc66fb33cd610bc1a5db8a5e232d34879b4d7
Parents
3b0e77bd

Changes

145 files changed · +340 −360

FileStatusAddDelContent
arch/cris/arch-v32/drivers/pci/dma.cmodified+1−1View file
arch/i386/kernel/pci-dma.cmodified+1−1View file
arch/ppc64/kernel/bpa_iommu.cmodified+1−1View file
arch/ppc64/kernel/dma.cmodified+1−1View file
arch/ppc64/kernel/iommu.cmodified+1−1View file
arch/ppc64/kernel/pci_direct_iommu.cmodified+1−1View file
arch/ppc64/kernel/pci_iommu.cmodified+1−1View file
arch/ppc64/kernel/vio.cmodified+1−1View file
drivers/atm/ambassador.cmodified+1−1View file
drivers/atm/firestream.cmodified+2−3View file
drivers/atm/fore200e.cmodified+1−1View file
drivers/base/dmapool.cmodified+2−3View file
drivers/block/pktcdvd.cmodified+2−2View file
drivers/bluetooth/bpa10x.cmodified+1−1View file
drivers/bluetooth/hci_usb.cmodified+1−1View file
drivers/connector/connector.cmodified+1−2View file
drivers/ieee1394/raw1394.cmodified+1−1View file
drivers/infiniband/core/mad.cmodified+1−1View file
drivers/infiniband/core/sa_query.cmodified+3−3View file
drivers/md/dm-crypt.cmodified+1−1View file
drivers/md/dm-io.cmodified+1−1View file
drivers/md/dm-raid1.cmodified+1−1View file
drivers/md/multipath.cmodified+1−1View file
drivers/md/raid1.cmodified+2−2View file
drivers/md/raid10.cmodified+2−2View file
drivers/net/bonding/bond_main.cmodified+1−1View file
drivers/net/ns83820.cmodified+1−1View file
drivers/net/sungem.hmodified+1−1View file
drivers/s390/scsi/zfcp_aux.cmodified+1−1View file
fs/bio.cmodified+5−5View file
fs/buffer.cmodified+1−1View file
fs/mpage.cmodified+1−1View file
fs/ntfs/malloc.hmodified+1−1View file
fs/posix_acl.cmodified+3−3View file
fs/xfs/linux-2.6/kmem.cmodified+5−5View file
fs/xfs/linux-2.6/kmem.hmodified+6−7View file
include/asm-generic/dma-mapping.hmodified+2−2View file
include/asm-i386/dma-mapping.hmodified+1−1View file
include/asm-ppc/dma-mapping.hmodified+1−1View file
include/asm-ppc64/dma-mapping.hmodified+2−2View file
include/asm-ppc64/iommu.hmodified+1−1View file
include/linux/atmdev.hmodified+1−1View file
include/linux/bio.hmodified+3−3View file
include/linux/buffer_head.hmodified+1−1View file
include/linux/connector.hmodified+1−1View file
include/linux/cpuset.hmodified+2−3View file
include/linux/dmapool.hmodified+1−1View file
include/linux/gfp.hmodified+7−7View file
include/linux/jbd.hmodified+1−1View file
include/linux/kfifo.hmodified+2−2View file
include/linux/mempool.hmodified+4−5View file
include/linux/netlink.hmodified+1−1View file
include/linux/pagemap.hmodified+1−1View file
include/linux/posix_acl.hmodified+3−3View file
include/linux/radix-tree.hmodified+1−1View file
include/linux/security.hmodified+2−4View file
include/linux/skbuff.hmodified+14−14View file
include/linux/slab.hmodified+9−10View file
include/linux/string.hmodified+1−1View file
include/linux/swap.hmodified+1−1View file
include/linux/textsearch.hmodified+1−1View file
include/linux/types.hmodified+4−0View file
include/linux/vmalloc.hmodified+2−2View file
include/net/bluetooth/bluetooth.hmodified+1−1View file
include/net/bluetooth/rfcomm.hmodified+1−1View file
include/net/dn_nsp.hmodified+4−4View file
include/net/dn_route.hmodified+1−1View file
include/net/inet_connection_sock.hmodified+1−1View file
include/net/ip_vs.hmodified+1−1View file
include/net/llc_conn.hmodified+1−1View file
include/net/sctp/sctp.hmodified+1−1View file
include/net/sctp/sm.hmodified+5−5View file
include/net/sctp/structs.hmodified+12−12View file
include/net/sctp/ulpevent.hmodified+8−8View file
include/net/sctp/ulpqueue.hmodified+4−7View file
include/net/sock.hmodified+8−8View file
include/net/tcp.hmodified+1−2View file
include/net/xfrm.hmodified+1−1View file
include/rdma/ib_mad.hmodified+1−1View file
include/rdma/ib_sa.hmodified+5−5View file
include/rxrpc/call.hmodified+1−1View file
include/rxrpc/message.hmodified+1−1View file
include/sound/core.hmodified+4−4View file
include/sound/driver.hmodified+1−1View file
kernel/audit.cmodified+1−1View file
kernel/cpuset.cmodified+1−1View file
kernel/kfifo.cmodified+2−2View file
kernel/signal.cmodified+1−1View file
lib/radix-tree.cmodified+1−1View file
lib/ts_bm.cmodified+1−1View file
lib/ts_fsm.cmodified+1−1View file
lib/ts_kmp.cmodified+1−1View file
mm/highmem.cmodified+1−1View file
mm/mempolicy.cmodified+4−4View file
mm/mempool.cmodified+3−3View file
mm/nommu.cmodified+1−2View file
mm/oom_kill.cmodified+1−1View file
mm/page_alloc.cmodified+6−6View file
mm/page_io.cmodified+1−1View file
mm/shmem.cmodified+1−2View file
mm/slab.cmodified+16−18View file
mm/swap_state.cmodified+1−1View file
mm/vmalloc.cmodified+2−2View file
net/atm/atm_misc.cmodified+1−1View file
net/bluetooth/l2cap.cmodified+1−1View file
net/bluetooth/rfcomm/core.cmodified+1−1View file
net/bluetooth/rfcomm/sock.cmodified+1−1View file
net/bluetooth/rfcomm/tty.cmodified+1−1View file
net/bluetooth/sco.cmodified+1−1View file
net/core/dev.cmodified+1−1View file
net/core/skbuff.cmodified+7−7View file
net/core/sock.cmodified+5−5View file
net/dccp/ackvec.cmodified+1−1View file
net/dccp/ackvec.hmodified+2−2View file
net/dccp/ccids/lib/loss_interval.hmodified+1−1View file
net/dccp/ccids/lib/packet_history.hmodified+2−2View file
net/decnet/af_decnet.cmodified+2−4View file
net/decnet/dn_nsp_out.cmodified+9−11View file
net/ieee80211/ieee80211_tx.cmodified+1−1View file
net/ipv4/inet_connection_sock.cmodified+1−1View file
net/ipv4/ipvs/ip_vs_app.cmodified+1−1View file
net/ipv4/tcp_output.cmodified+1−1View file
net/key/af_key.cmodified+3−3View file
net/llc/llc_conn.cmodified+1−2View file
net/netfilter/nfnetlink.cmodified+1−2View file
net/netlink/af_netlink.cmodified+2−2View file
net/rxrpc/call.cmodified+1−1View file
net/rxrpc/connection.cmodified+1−1View file
net/sctp/associola.cmodified+5−5View file
net/sctp/bind_addr.cmodified+6−6View file
net/sctp/chunk.cmodified+1−1View file
net/sctp/endpointola.cmodified+2−3View file
net/sctp/protocol.cmodified+1−1View file
net/sctp/sm_make_chunk.cmodified+7−7View file
net/sctp/sm_sideeffect.cmodified+6−6View file
net/sctp/ssnmap.cmodified+1−1View file
net/sctp/transport.cmodified+2−2View file
net/sctp/ulpevent.cmodified+9−9View file
net/sctp/ulpqueue.cmodified+4−4View file
net/sunrpc/sched.cmodified+1−1View file
net/xfrm/xfrm_policy.cmodified+1−1View file
sound/core/memalloc.cmodified+1−1View file
sound/core/memory.cmodified+5−5View file
sound/core/seq/instr/ainstr_iw.cmodified+1−1View file
sound/core/wrappers.cmodified+1−1View file

Only the first 600 diff lines are shown. Download the complete patch.

arch/cris/arch-v32/drivers/pci/dma.c

View file
diff --git a/arch/cris/arch-v32/drivers/pci/dma.c b/arch/cris/arch-v32/drivers/pci/dma.c
index 1032930..426b098 100644
--- a/arch/cris/arch-v32/drivers/pci/dma.c
+++ b/arch/cris/arch-v32/drivers/pci/dma.c
@@ -24,7 +24,7 @@ struct dma_coherent_mem {
};
void *dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, unsigned int __nocast gfp)
+ dma_addr_t *dma_handle, gfp_t gfp)
{
void *ret;
struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;

arch/i386/kernel/pci-dma.c

View file
diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c
index 1e51427..25fe668 100644
--- a/arch/i386/kernel/pci-dma.c
+++ b/arch/i386/kernel/pci-dma.c
@@ -23,7 +23,7 @@ struct dma_coherent_mem {
};
void *dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, unsigned int __nocast gfp)
+ dma_addr_t *dma_handle, gfp_t gfp)
{
void *ret;
struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;

arch/ppc64/kernel/bpa_iommu.c

View file
diff --git a/arch/ppc64/kernel/bpa_iommu.c b/arch/ppc64/kernel/bpa_iommu.c
index 507eb9d..5f24600 100644
--- a/arch/ppc64/kernel/bpa_iommu.c
+++ b/arch/ppc64/kernel/bpa_iommu.c
@@ -310,7 +310,7 @@ static void bpa_map_iommu(void)
static void *bpa_alloc_coherent(struct device *hwdev, size_t size,
- dma_addr_t *dma_handle, unsigned int __nocast flag)
+ dma_addr_t *dma_handle, gfp_t flag)
{
void *ret;

arch/ppc64/kernel/dma.c

View file
diff --git a/arch/ppc64/kernel/dma.c b/arch/ppc64/kernel/dma.c
index 4da8e31..7c34196 100644
--- a/arch/ppc64/kernel/dma.c
+++ b/arch/ppc64/kernel/dma.c
@@ -53,7 +53,7 @@ int dma_set_mask(struct device *dev, u64 dma_mask)
EXPORT_SYMBOL(dma_set_mask);
void *dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, unsigned int __nocast flag)
+ dma_addr_t *dma_handle, gfp_t flag)
{
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);

arch/ppc64/kernel/iommu.c

View file
diff --git a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c
index 9032b6b..4d9b438 100644
--- a/arch/ppc64/kernel/iommu.c
+++ b/arch/ppc64/kernel/iommu.c
@@ -519,7 +519,7 @@ void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle,
* to the dma address (mapping) of the first page.
*/
void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
- dma_addr_t *dma_handle, unsigned int __nocast flag)
+ dma_addr_t *dma_handle, gfp_t flag)
{
void *ret = NULL;
dma_addr_t mapping;

arch/ppc64/kernel/pci_direct_iommu.c

View file
diff --git a/arch/ppc64/kernel/pci_direct_iommu.c b/arch/ppc64/kernel/pci_direct_iommu.c
index b8f7f58..54055c8 100644
--- a/arch/ppc64/kernel/pci_direct_iommu.c
+++ b/arch/ppc64/kernel/pci_direct_iommu.c
@@ -31,7 +31,7 @@
#include "pci.h"
static void *pci_direct_alloc_coherent(struct device *hwdev, size_t size,
- dma_addr_t *dma_handle, unsigned int __nocast flag)
+ dma_addr_t *dma_handle, gfp_t flag)
{
void *ret;

arch/ppc64/kernel/pci_iommu.c

View file
diff --git a/arch/ppc64/kernel/pci_iommu.c b/arch/ppc64/kernel/pci_iommu.c
index 14647e0..d9e33b7 100644
--- a/arch/ppc64/kernel/pci_iommu.c
+++ b/arch/ppc64/kernel/pci_iommu.c
@@ -76,7 +76,7 @@ static inline struct iommu_table *devnode_table(struct device *dev)
* to the dma address (mapping) of the first page.
*/
static void *pci_iommu_alloc_coherent(struct device *hwdev, size_t size,
- dma_addr_t *dma_handle, unsigned int __nocast flag)
+ dma_addr_t *dma_handle, gfp_t flag)
{
return iommu_alloc_coherent(devnode_table(hwdev), size, dma_handle,
flag);

arch/ppc64/kernel/vio.c

View file
diff --git a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c
index c90e1dd..0e555b7 100644
--- a/arch/ppc64/kernel/vio.c
+++ b/arch/ppc64/kernel/vio.c
@@ -218,7 +218,7 @@ static void vio_unmap_sg(struct device *dev, struct scatterlist *sglist,
}
static void *vio_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle, unsigned int __nocast flag)
+ dma_addr_t *dma_handle, gfp_t flag)
{
return iommu_alloc_coherent(to_vio_dev(dev)->iommu_table, size,
dma_handle, flag);

drivers/atm/ambassador.c

View file
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index d74a7c5..4b6bf19 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -795,7 +795,7 @@ static void drain_rx_pools (amb_dev * dev) {
}
static inline void fill_rx_pool (amb_dev * dev, unsigned char pool,
- unsigned int __nocast priority)
+ gfp_t priority)
{
rx_in rx;
amb_rxq * rxq;

drivers/atm/firestream.c

View file
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 5821974..7f7ec28 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -1374,8 +1374,7 @@ static void reset_chip (struct fs_dev *dev)
}
}
-static void __devinit *aligned_kmalloc (int size, unsigned int __nocast flags,
- int alignment)
+static void __devinit *aligned_kmalloc (int size, gfp_t flags, int alignment)
{
void *t;
@@ -1466,7 +1465,7 @@ static inline int nr_buffers_in_freepool (struct fs_dev *dev, struct freepool *f
working again after that... -- REW */
static void top_off_fp (struct fs_dev *dev, struct freepool *fp,
- unsigned int __nocast gfp_flags)
+ gfp_t gfp_flags)
{
struct FS_BPENTRY *qe, *ne;
struct sk_buff *skb;

drivers/atm/fore200e.c

View file
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 6f1a83c..14f6a62 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -178,7 +178,7 @@ fore200e_irq_itoa(int irq)
static void*
-fore200e_kmalloc(int size, unsigned int __nocast flags)
+fore200e_kmalloc(int size, gfp_t flags)
{
void *chunk = kzalloc(size, flags);

drivers/base/dmapool.c

View file
diff --git a/drivers/base/dmapool.c b/drivers/base/dmapool.c
index 60a7ef6..e2f64f9 100644
--- a/drivers/base/dmapool.c
+++ b/drivers/base/dmapool.c
@@ -156,7 +156,7 @@ dma_pool_create (const char *name, struct device *dev,
static struct dma_page *
-pool_alloc_page (struct dma_pool *pool, unsigned int __nocast mem_flags)
+pool_alloc_page (struct dma_pool *pool, gfp_t mem_flags)
{
struct dma_page *page;
int mapsize;
@@ -262,8 +262,7 @@ dma_pool_destroy (struct dma_pool *pool)
* If such a memory block can't be allocated, null is returned.
*/
void *
-dma_pool_alloc (struct dma_pool *pool, unsigned int __nocast mem_flags,
- dma_addr_t *handle)
+dma_pool_alloc (struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)
{
unsigned long flags;
struct dma_page *page;

drivers/block/pktcdvd.c

View file
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 7e22a58..a280e67 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -229,7 +229,7 @@ static int pkt_grow_pktlist(struct pktcdvd_device *pd, int nr_packets)
return 1;
}
-static void *pkt_rb_alloc(unsigned int __nocast gfp_mask, void *data)
+static void *pkt_rb_alloc(gfp_t gfp_mask, void *data)
{
return kmalloc(sizeof(struct pkt_rb_node), gfp_mask);
}
@@ -2082,7 +2082,7 @@ static int pkt_close(struct inode *inode, struct file *file)
}
-static void *psd_pool_alloc(unsigned int __nocast gfp_mask, void *data)
+static void *psd_pool_alloc(gfp_t gfp_mask, void *data)
{
return kmalloc(sizeof(struct packet_stacked_data), gfp_mask);
}

drivers/bluetooth/bpa10x.c

View file
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index a1bf8f0..4fa8523 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -308,7 +308,7 @@ unlock:
}
static inline struct urb *bpa10x_alloc_urb(struct usb_device *udev, unsigned int pipe,
- size_t size, unsigned int __nocast flags, void *data)
+ size_t size, gfp_t flags, void *data)
{
struct urb *urb;
struct usb_ctrlrequest *cr;

drivers/bluetooth/hci_usb.c

View file
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index 57c48bb..6756cb2 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -132,7 +132,7 @@ static struct usb_device_id blacklist_ids[] = {
{ } /* Terminating entry */
};
-static struct _urb *_urb_alloc(int isoc, unsigned int __nocast gfp)
+static struct _urb *_urb_alloc(int isoc, gfp_t gfp)
{
struct _urb *_urb = kmalloc(sizeof(struct _urb) +
sizeof(struct usb_iso_packet_descriptor) * isoc, gfp);

drivers/connector/connector.c

View file
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 1422285..505677f 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -69,8 +69,7 @@ int cn_already_initialized = 0;
* a new message.
*
*/
-int cn_netlink_send(struct cn_msg *msg, u32 __group,
- unsigned int __nocast gfp_mask)
+int cn_netlink_send(struct cn_msg *msg, u32 __group, gfp_t gfp_mask)
{
struct cn_callback_entry *__cbq;
unsigned int size;

drivers/ieee1394/raw1394.c

View file
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index 5fe4f2b..315f5ca 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -98,7 +98,7 @@ static struct hpsb_address_ops arm_ops = {
static void queue_complete_cb(struct pending_request *req);
-static struct pending_request *__alloc_pending_request(unsigned int __nocast flags)
+static struct pending_request *__alloc_pending_request(gfp_t flags)
{
struct pending_request *req;

drivers/infiniband/core/mad.c

View file
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index a4a4d9c..a14ca87 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -783,7 +783,7 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent,
u32 remote_qpn, u16 pkey_index,
struct ib_ah *ah, int rmpp_active,
int hdr_len, int data_len,
- unsigned int __nocast gfp_mask)
+ gfp_t gfp_mask)
{
struct ib_mad_agent_private *mad_agent_priv;
struct ib_mad_send_buf *send_buf;

drivers/infiniband/core/sa_query.c

View file
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index 78de2dd..2626182 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -574,7 +574,7 @@ static void ib_sa_path_rec_release(struct ib_sa_query *sa_query)
int ib_sa_path_rec_get(struct ib_device *device, u8 port_num,
struct ib_sa_path_rec *rec,
ib_sa_comp_mask comp_mask,
- int timeout_ms, unsigned int __nocast gfp_mask,
+ int timeout_ms, gfp_t gfp_mask,
void (*callback)(int status,
struct ib_sa_path_rec *resp,
void *context),
@@ -676,7 +676,7 @@ static void ib_sa_service_rec_release(struct ib_sa_query *sa_query)
int ib_sa_service_rec_query(struct ib_device *device, u8 port_num, u8 method,
struct ib_sa_service_rec *rec,
ib_sa_comp_mask comp_mask,
- int timeout_ms, unsigned int __nocast gfp_mask,
+ int timeout_ms, gfp_t gfp_mask,
void (*callback)(int status,
struct ib_sa_service_rec *resp,
void *context),
@@ -759,7 +759,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num,
u8 method,
struct ib_sa_mcmember_rec *rec,
ib_sa_comp_mask comp_mask,
- int timeout_ms, unsigned int __nocast gfp_mask,
+ int timeout_ms, gfp_t gfp_mask,
void (*callback)(int status,
struct ib_sa_mcmember_rec *resp,
void *context),

drivers/md/dm-crypt.c

View file
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index b82bc31..b6148f6 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -96,7 +96,7 @@ static kmem_cache_t *_crypt_io_pool;
/*
* Mempool alloc and free functions for the page
*/
-static void *mempool_alloc_page(unsigned int __nocast gfp_mask, void *data)
+static void *mempool_alloc_page(gfp_t gfp_mask, void *data)
{
return alloc_page(gfp_mask);
}

drivers/md/dm-io.c

View file
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
index 9de0001..4809b20 100644
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@ -32,7 +32,7 @@ struct io {
static unsigned _num_ios;
static mempool_t *_io_pool;
-static void *alloc_io(unsigned int __nocast gfp_mask, void *pool_data)
+static void *alloc_io(gfp_t gfp_mask, void *pool_data)
{
return kmalloc(sizeof(struct io), gfp_mask);
}

drivers/md/dm-raid1.c

View file
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 8632825..2375709 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -122,7 +122,7 @@ static inline sector_t region_to_sector(struct region_hash *rh, region_t region)
/* FIXME move this */
static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw);
-static void *region_alloc(unsigned int __nocast gfp_mask, void *pool_data)
+static void *region_alloc(gfp_t gfp_mask, void *pool_data)
{
return kmalloc(sizeof(struct region), gfp_mask);
}

drivers/md/multipath.c

View file
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 2863423..1151c3e 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -38,7 +38,7 @@
static mdk_personality_t multipath_personality;
-static void *mp_pool_alloc(unsigned int __nocast gfp_flags, void *data)
+static void *mp_pool_alloc(gfp_t gfp_flags, void *data)
{
struct multipath_bh *mpb;
mpb = kmalloc(sizeof(*mpb), gfp_flags);

drivers/md/raid1.c

View file
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index a93ca47..0e1f148 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -52,7 +52,7 @@ static mdk_personality_t raid1_personality;
static void unplug_slaves(mddev_t *mddev);
-static void * r1bio_pool_alloc(unsigned int __nocast gfp_flags, void *data)
+static void * r1bio_pool_alloc(gfp_t gfp_flags, void *data)
{
struct pool_info *pi = data;
r1bio_t *r1_bio;
@@ -79,7 +79,7 @@ static void r1bio_pool_free(void *r1_bio, void *data)
#define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE)
#define RESYNC_WINDOW (2048*1024)
-static void * r1buf_pool_alloc(unsigned int __nocast gfp_flags, void *data)
+static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data)
{
struct pool_info *pi = data;
struct page *page;

drivers/md/raid10.c

View file
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 5bd1e9e..28dd028 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -47,7 +47,7 @@
static void unplug_slaves(mddev_t *mddev);
-static void * r10bio_pool_alloc(unsigned int __nocast gfp_flags, void *data)
+static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data)
{
conf_t *conf = data;
r10bio_t *r10_bio;
@@ -81,7 +81,7 @@ static void r10bio_pool_free(void *r10_bio, void *data)
* one for write (we recover only one drive per r10buf)
*
*/
-static void * r10buf_pool_alloc(unsigned int __nocast gfp_flags, void *data)
+static void * r10buf_pool_alloc(gfp_t gfp_flags, void *data)
{
conf_t *conf = data;
struct page *page;

drivers/net/bonding/bond_main.c

View file
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f0a5b77..f264ff1 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1290,7 +1290,7 @@ static void bond_mc_list_destroy(struct bonding *bond)
* Copy all the Multicast addresses from src to the bonding device dst
*/
static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond,
- unsigned int __nocast gfp_flag)
+ gfp_t gfp_flag)
{
struct dev_mc_list *dmi, *new_dmi;

drivers/net/ns83820.c

View file
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 83334db..e4811b4 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -584,7 +584,7 @@ static inline int ns83820_add_rx_skb(struct ns83820 *dev, struct sk_buff *skb)
return 0;
}
-static inline int rx_refill(struct net_device *ndev, unsigned int __nocast gfp)
+static inline int rx_refill(struct net_device *ndev, gfp_t gfp)
{
struct ns83820 *dev = PRIV(ndev);
unsigned i;

drivers/net/sungem.h

View file
diff --git a/drivers/net/sungem.h b/drivers/net/sungem.h
index 16edbb1..13006d7 100644
--- a/drivers/net/sungem.h
+++ b/drivers/net/sungem.h
@@ -1036,7 +1036,7 @@ struct gem {
#define ALIGNED_RX_SKB_ADDR(addr) \
((((unsigned long)(addr) + (64UL - 1UL)) & ~(64UL - 1UL)) - (unsigned long)(addr))
static __inline__ struct sk_buff *gem_alloc_skb(int size,
- unsigned int __nocast gfp_flags)
+ gfp_t gfp_flags)
{
struct sk_buff *skb = alloc_skb(size + 64, gfp_flags);

drivers/s390/scsi/zfcp_aux.c

View file
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 0b5087f..cab0985 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -833,7 +833,7 @@ zfcp_unit_dequeue(struct zfcp_unit *unit)
}
static void *
-zfcp_mempool_alloc(unsigned int __nocast gfp_mask, void *size)
+zfcp_mempool_alloc(gfp_t gfp_mask, void *size)
{
return kmalloc((size_t) size, gfp_mask);
}

fs/bio.c

View file
diff --git a/fs/bio.c b/fs/bio.c
index 83a3495..7d81a93 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -75,7 +75,7 @@ struct bio_set {
*/
static struct bio_set *fs_bio_set;
-static inline struct bio_vec *bvec_alloc_bs(unsigned int __nocast gfp_mask, int nr, unsigned long *idx, struct bio_set *bs)
+static inline struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, struct bio_set *bs)
{
struct bio_vec *bvl;
struct biovec_slab *bp;
@@ -155,7 +155,7 @@ inline void bio_init(struct bio *bio)
* allocate bio and iovecs from the memory pools specified by the
* bio_set structure.
**/
-struct bio *bio_alloc_bioset(unsigned int __nocast gfp_mask, int nr_iovecs, struct bio_set *bs)
+struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
{
struct bio *bio = mempool_alloc(bs->bio_pool, gfp_mask);
@@ -181,7 +181,7 @@ out:
return bio;
}
-struct bio *bio_alloc(unsigned int __nocast gfp_mask, int nr_iovecs)
+struct bio *bio_alloc(gfp_t gfp_mask, int nr_iovecs)
{
struct bio *bio = bio_alloc_bioset(gfp_mask, nr_iovecs, fs_bio_set);
@@ -277,7 +277,7 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src)
*
* Like __bio_clone, only also allocates the returned bio
*/
-struct bio *bio_clone(struct bio *bio, unsigned int __nocast gfp_mask)
+struct bio *bio_clone(struct bio *bio, gfp_t gfp_mask)
{
struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, fs_bio_set);
@@ -1078,7 +1078,7 @@ struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, int first_sectors)
return bp;
}
-static void *bio_pair_alloc(unsigned int __nocast gfp_flags, void *data)
+static void *bio_pair_alloc(gfp_t gfp_flags, void *data)
{
return kmalloc(sizeof(struct bio_pair), gfp_flags);
}

fs/buffer.c

View file
diff --git a/fs/buffer.c b/fs/buffer.c
index 6cbfcea..1216c0d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -3045,7 +3045,7 @@ static void recalc_bh_state(void)
buffer_heads_over_limit = (tot > max_buffer_heads);
}
-struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags)
+struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
{
struct buffer_head *ret = kmem_cache_alloc(bh_cachep, gfp_flags);
if (ret) {

fs/mpage.c

View file
diff --git a/fs/mpage.c b/fs/mpage.c
index bb9aebe..c5adcdd 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -102,7 +102,7 @@ static struct bio *mpage_bio_submit(int rw, struct bio *bio)
static struct bio *
mpage_alloc(struct block_device *bdev,
sector_t first_sector, int nr_vecs,
- unsigned int __nocast gfp_flags)
+ gfp_t gfp_flags)
{
struct bio *bio;

fs/ntfs/malloc.h

View file
diff --git a/fs/ntfs/malloc.h b/fs/ntfs/malloc.h
index 006946e..590887b 100644
--- a/fs/ntfs/malloc.h
+++ b/fs/ntfs/malloc.h
@@ -40,7 +40,7 @@
* Depending on @gfp_mask the allocation may be guaranteed to succeed.
*/
static inline void *__ntfs_malloc(unsigned long size,
- unsigned int __nocast gfp_mask)
+ gfp_t gfp_mask)
{
if (likely(size <= PAGE_SIZE)) {
BUG_ON(!size);

fs/posix_acl.c

View file
diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index 296480e..6c8dcf7 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -35,7 +35,7 @@ EXPORT_SYMBOL(posix_acl_permission);
* Allocate a new ACL with the specified number of entries.
*/
struct posix_acl *
-posix_acl_alloc(int count, unsigned int __nocast flags)
+posix_acl_alloc(int count, gfp_t flags)
{
const size_t size = sizeof(struct posix_acl) +
count * sizeof(struct posix_acl_entry);
@@ -51,7 +51,7 @@ posix_acl_alloc(int count, unsigned int __nocast flags)
* Clone an ACL.
*/
struct posix_acl *
-posix_acl_clone(const struct posix_acl *acl, unsigned int __nocast flags)
+posix_acl_clone(const struct posix_acl *acl, gfp_t flags)
{
struct posix_acl *clone = NULL;
@@ -185,7 +185,7 @@ posix_acl_equiv_mode(const struct posix_acl *acl, mode_t *mode_p)
* Create an ACL representing the file mode permission bits of an inode.
*/
struct posix_acl *
-posix_acl_from_mode(mode_t mode, unsigned int __nocast flags)
+posix_acl_from_mode(mode_t mode, gfp_t flags)
{
struct posix_acl *acl = posix_acl_alloc(3, flags);
if (!acl)

fs/xfs/linux-2.6/kmem.c

View file
diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c
index 4b18455..d2653b5 100644
--- a/fs/xfs/linux-2.6/kmem.c
+++ b/fs/xfs/linux-2.6/kmem.c
@@ -45,7 +45,7 @@
void *
-kmem_alloc(size_t size, unsigned int __nocast flags)
+kmem_alloc(size_t size, gfp_t flags)
{
int retries = 0;
unsigned int lflags = kmem_flags_convert(flags);
@@ -67,7 +67,7 @@ kmem_alloc(size_t size, unsigned int __nocast flags)
}
void *
-kmem_zalloc(size_t size, unsigned int __nocast flags)
+kmem_zalloc(size_t size, gfp_t flags)
{
void *ptr;
@@ -90,7 +90,7 @@ kmem_free(void *ptr, size_t size)
void *
kmem_realloc(void *ptr, size_t newsize, size_t oldsize,
- unsigned int __nocast flags)
+ gfp_t flags)
{
void *new;
@@ -105,7 +105,7 @@ kmem_realloc(void *ptr, size_t newsize, size_t oldsize,
}
void *
-kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags)
+kmem_zone_alloc(kmem_zone_t *zone, gfp_t flags)
{

This diff is incomplete. Download the complete patch.

fs/xfs/linux-2.6/kmem.h

View file

This diff is incomplete. Download the complete patch.

include/asm-generic/dma-mapping.h

View file

This diff is incomplete. Download the complete patch.

include/asm-i386/dma-mapping.h

View file

This diff is incomplete. Download the complete patch.

include/asm-ppc/dma-mapping.h

View file

This diff is incomplete. Download the complete patch.

include/asm-ppc64/dma-mapping.h

View file

This diff is incomplete. Download the complete patch.

include/asm-ppc64/iommu.h

View file

This diff is incomplete. Download the complete patch.

include/linux/atmdev.h

View file

This diff is incomplete. Download the complete patch.

include/linux/bio.h

View file

This diff is incomplete. Download the complete patch.

include/linux/buffer_head.h

View file

This diff is incomplete. Download the complete patch.

include/linux/connector.h

View file

This diff is incomplete. Download the complete patch.

include/linux/cpuset.h

View file

This diff is incomplete. Download the complete patch.

include/linux/dmapool.h

View file

This diff is incomplete. Download the complete patch.

include/linux/gfp.h

View file

This diff is incomplete. Download the complete patch.

include/linux/jbd.h

View file

This diff is incomplete. Download the complete patch.

include/linux/kfifo.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mempool.h

View file

This diff is incomplete. Download the complete patch.

include/linux/netlink.h

View file

This diff is incomplete. Download the complete patch.

include/linux/pagemap.h

View file

This diff is incomplete. Download the complete patch.

include/linux/posix_acl.h

View file

This diff is incomplete. Download the complete patch.

include/linux/radix-tree.h

View file

This diff is incomplete. Download the complete patch.

include/linux/security.h

View file

This diff is incomplete. Download the complete patch.

include/linux/skbuff.h

View file

This diff is incomplete. Download the complete patch.

include/linux/slab.h

View file

This diff is incomplete. Download the complete patch.

include/linux/string.h

View file

This diff is incomplete. Download the complete patch.

include/linux/swap.h

View file

This diff is incomplete. Download the complete patch.

include/linux/textsearch.h

View file

This diff is incomplete. Download the complete patch.

include/linux/types.h

View file

This diff is incomplete. Download the complete patch.

include/linux/vmalloc.h

View file

This diff is incomplete. Download the complete patch.

include/net/bluetooth/bluetooth.h

View file

This diff is incomplete. Download the complete patch.

include/net/bluetooth/rfcomm.h

View file

This diff is incomplete. Download the complete patch.

include/net/dn_nsp.h

View file

This diff is incomplete. Download the complete patch.

include/net/dn_route.h

View file

This diff is incomplete. Download the complete patch.

include/net/inet_connection_sock.h

View file

This diff is incomplete. Download the complete patch.

include/net/ip_vs.h

View file

This diff is incomplete. Download the complete patch.

include/net/llc_conn.h

View file

This diff is incomplete. Download the complete patch.

include/net/sctp/sctp.h

View file

This diff is incomplete. Download the complete patch.

include/net/sctp/sm.h

View file

This diff is incomplete. Download the complete patch.

include/net/sctp/structs.h

View file

This diff is incomplete. Download the complete patch.

include/net/sctp/ulpevent.h

View file

This diff is incomplete. Download the complete patch.

include/net/sctp/ulpqueue.h

View file

This diff is incomplete. Download the complete patch.

include/net/sock.h

View file

This diff is incomplete. Download the complete patch.

include/net/tcp.h

View file

This diff is incomplete. Download the complete patch.

include/net/xfrm.h

View file

This diff is incomplete. Download the complete patch.

include/rdma/ib_mad.h

View file

This diff is incomplete. Download the complete patch.

include/rdma/ib_sa.h

View file

This diff is incomplete. Download the complete patch.

include/rxrpc/call.h

View file

This diff is incomplete. Download the complete patch.

include/rxrpc/message.h

View file

This diff is incomplete. Download the complete patch.

include/sound/core.h

View file

This diff is incomplete. Download the complete patch.

include/sound/driver.h

View file

This diff is incomplete. Download the complete patch.

kernel/audit.c

View file

This diff is incomplete. Download the complete patch.

kernel/cpuset.c

View file

This diff is incomplete. Download the complete patch.

kernel/kfifo.c

View file

This diff is incomplete. Download the complete patch.

kernel/signal.c

View file

This diff is incomplete. Download the complete patch.

lib/radix-tree.c

View file

This diff is incomplete. Download the complete patch.

lib/ts_bm.c

View file

This diff is incomplete. Download the complete patch.

lib/ts_fsm.c

View file

This diff is incomplete. Download the complete patch.

lib/ts_kmp.c

View file

This diff is incomplete. Download the complete patch.

mm/highmem.c

View file

This diff is incomplete. Download the complete patch.

mm/mempolicy.c

View file

This diff is incomplete. Download the complete patch.

mm/mempool.c

View file

This diff is incomplete. Download the complete patch.

mm/nommu.c

View file

This diff is incomplete. Download the complete patch.

mm/oom_kill.c

View file

This diff is incomplete. Download the complete patch.

mm/page_alloc.c

View file

This diff is incomplete. Download the complete patch.

mm/page_io.c

View file

This diff is incomplete. Download the complete patch.

mm/shmem.c

View file

This diff is incomplete. Download the complete patch.

mm/slab.c

View file

This diff is incomplete. Download the complete patch.

mm/swap_state.c

View file

This diff is incomplete. Download the complete patch.

mm/vmalloc.c

View file

This diff is incomplete. Download the complete patch.

net/atm/atm_misc.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/l2cap.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/rfcomm/core.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/rfcomm/sock.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/rfcomm/tty.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/sco.c

View file

This diff is incomplete. Download the complete patch.

net/core/dev.c

View file

This diff is incomplete. Download the complete patch.

net/core/skbuff.c

View file

This diff is incomplete. Download the complete patch.

net/core/sock.c

View file

This diff is incomplete. Download the complete patch.

net/dccp/ackvec.c

View file

This diff is incomplete. Download the complete patch.

net/dccp/ackvec.h

View file

This diff is incomplete. Download the complete patch.

net/dccp/ccids/lib/loss_interval.h

View file

This diff is incomplete. Download the complete patch.

net/dccp/ccids/lib/packet_history.h

View file

This diff is incomplete. Download the complete patch.

net/decnet/af_decnet.c

View file

This diff is incomplete. Download the complete patch.

net/decnet/dn_nsp_out.c

View file

This diff is incomplete. Download the complete patch.

net/ieee80211/ieee80211_tx.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/inet_connection_sock.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/ipvs/ip_vs_app.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_output.c

View file

This diff is incomplete. Download the complete patch.

net/key/af_key.c

View file

This diff is incomplete. Download the complete patch.

net/llc/llc_conn.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nfnetlink.c

View file

This diff is incomplete. Download the complete patch.

net/netlink/af_netlink.c

View file

This diff is incomplete. Download the complete patch.

net/rxrpc/call.c

View file

This diff is incomplete. Download the complete patch.

net/rxrpc/connection.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/associola.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/bind_addr.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/chunk.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/endpointola.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/protocol.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/sm_make_chunk.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/sm_sideeffect.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/ssnmap.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/transport.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/ulpevent.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/ulpqueue.c

View file

This diff is incomplete. Download the complete patch.

net/sunrpc/sched.c

View file

This diff is incomplete. Download the complete patch.

net/xfrm/xfrm_policy.c

View file

This diff is incomplete. Download the complete patch.

sound/core/memalloc.c

View file

This diff is incomplete. Download the complete patch.

sound/core/memory.c

View file

This diff is incomplete. Download the complete patch.

sound/core/seq/instr/ainstr_iw.c

View file

This diff is incomplete. Download the complete patch.

sound/core/wrappers.c

View file

This diff is incomplete. Download the complete patch.