History

[PATCH] gfp flags annotations - part 1

- 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.

Al Viro committed 21 years ago

Commit dd0fc661 parent 3b0e77b145 files · +340 −360Browse files

Unified · Split

145 files
  1. arch/cris/arch-v32/drivers/pci/dma.c +1 −1
  2. arch/i386/kernel/pci-dma.c +1 −1
  3. arch/ppc64/kernel/bpa_iommu.c +1 −1
  4. arch/ppc64/kernel/dma.c +1 −1
  5. arch/ppc64/kernel/iommu.c +1 −1
  6. arch/ppc64/kernel/pci_direct_iommu.c +1 −1
  7. arch/ppc64/kernel/pci_iommu.c +1 −1
  8. arch/ppc64/kernel/vio.c +1 −1
  9. drivers/atm/ambassador.c +1 −1
  10. drivers/atm/firestream.c +2 −3
  11. drivers/atm/fore200e.c +1 −1
  12. drivers/base/dmapool.c +2 −3
  13. drivers/block/pktcdvd.c +2 −2
  14. drivers/bluetooth/bpa10x.c +1 −1
  15. drivers/bluetooth/hci_usb.c +1 −1
  16. drivers/connector/connector.c +1 −2
  17. drivers/ieee1394/raw1394.c +1 −1
  18. drivers/infiniband/core/mad.c +1 −1
  19. drivers/infiniband/core/sa_query.c +3 −3
  20. drivers/md/dm-crypt.c +1 −1
  21. drivers/md/dm-io.c +1 −1
  22. drivers/md/dm-raid1.c +1 −1
  23. drivers/md/multipath.c +1 −1
  24. drivers/md/raid1.c +2 −2
  25. drivers/md/raid10.c +2 −2
  26. drivers/net/bonding/bond_main.c +1 −1
  27. drivers/net/ns83820.c +1 −1
  28. drivers/net/sungem.h +1 −1
  29. drivers/s390/scsi/zfcp_aux.c +1 −1
  30. fs/bio.c +5 −5
  31. fs/buffer.c +1 −1
  32. fs/mpage.c +1 −1
  33. fs/ntfs/malloc.h +1 −1
  34. fs/posix_acl.c +3 −3
  35. fs/xfs/linux-2.6/kmem.c +5 −5
  36. fs/xfs/linux-2.6/kmem.h +6 −7
  37. include/asm-generic/dma-mapping.h +2 −2
  38. include/asm-i386/dma-mapping.h +1 −1
  39. include/asm-ppc/dma-mapping.h +1 −1
  40. include/asm-ppc64/dma-mapping.h +2 −2
  41. include/asm-ppc64/iommu.h +1 −1
  42. include/linux/atmdev.h +1 −1
  43. include/linux/bio.h +3 −3
  44. include/linux/buffer_head.h +1 −1
  45. include/linux/connector.h +1 −1
  46. include/linux/cpuset.h +2 −3
  47. include/linux/dmapool.h +1 −1
  48. include/linux/gfp.h +7 −7
  49. include/linux/jbd.h +1 −1
  50. include/linux/kfifo.h +2 −2
  51. include/linux/mempool.h +4 −5
  52. include/linux/netlink.h +1 −1
  53. include/linux/pagemap.h +1 −1
  54. include/linux/posix_acl.h +3 −3
  55. include/linux/radix-tree.h +1 −1
  56. include/linux/security.h +2 −4
  57. include/linux/skbuff.h +14 −14
  58. include/linux/slab.h +9 −10
  59. include/linux/string.h +1 −1
  60. include/linux/swap.h +1 −1
  61. include/linux/textsearch.h +1 −1
  62. include/linux/types.h +4 −0
  63. include/linux/vmalloc.h +2 −2
  64. include/net/bluetooth/bluetooth.h +1 −1
  65. include/net/bluetooth/rfcomm.h +1 −1
  66. include/net/dn_nsp.h +4 −4
  67. include/net/dn_route.h +1 −1
  68. include/net/inet_connection_sock.h +1 −1
  69. include/net/ip_vs.h +1 −1
  70. include/net/llc_conn.h +1 −1
  71. include/net/sctp/sctp.h +1 −1
  72. include/net/sctp/sm.h +5 −5
  73. include/net/sctp/structs.h +12 −12
  74. include/net/sctp/ulpevent.h +8 −8
  75. include/net/sctp/ulpqueue.h +4 −7
  76. include/net/sock.h +8 −8
  77. include/net/tcp.h +1 −2
  78. include/net/xfrm.h +1 −1
  79. include/rdma/ib_mad.h +1 −1
  80. include/rdma/ib_sa.h +5 −5
  81. include/rxrpc/call.h +1 −1
  82. include/rxrpc/message.h +1 −1
  83. include/sound/core.h +4 −4
  84. include/sound/driver.h +1 −1
  85. kernel/audit.c +1 −1
  86. kernel/cpuset.c +1 −1
  87. kernel/kfifo.c +2 −2
  88. kernel/signal.c +1 −1
  89. lib/radix-tree.c +1 −1
  90. lib/ts_bm.c +1 −1
  91. lib/ts_fsm.c +1 −1
  92. lib/ts_kmp.c +1 −1
  93. mm/highmem.c +1 −1
  94. mm/mempolicy.c +4 −4
  95. mm/mempool.c +3 −3
  96. mm/nommu.c +1 −2
  97. mm/oom_kill.c +1 −1
  98. mm/page_alloc.c +6 −6
  99. mm/page_io.c +1 −1
  100. mm/shmem.c +1 −2
  101. mm/slab.c +16 −18
  102. mm/swap_state.c +1 −1
  103. mm/vmalloc.c +2 −2
  104. net/atm/atm_misc.c +1 −1
  105. net/bluetooth/l2cap.c +1 −1
  106. net/bluetooth/rfcomm/core.c +1 −1
  107. net/bluetooth/rfcomm/sock.c +1 −1
  108. net/bluetooth/rfcomm/tty.c +1 −1
  109. net/bluetooth/sco.c +1 −1
  110. net/core/dev.c +1 −1
  111. net/core/skbuff.c +7 −7
  112. net/core/sock.c +5 −5
  113. net/dccp/ackvec.c +1 −1
  114. net/dccp/ackvec.h +2 −2
  115. net/dccp/ccids/lib/loss_interval.h +1 −1
  116. net/dccp/ccids/lib/packet_history.h +2 −2
  117. net/decnet/af_decnet.c +2 −4
  118. net/decnet/dn_nsp_out.c +9 −11
  119. net/ieee80211/ieee80211_tx.c +1 −1
  120. net/ipv4/inet_connection_sock.c +1 −1
  121. net/ipv4/ipvs/ip_vs_app.c +1 −1
  122. net/ipv4/tcp_output.c +1 −1
  123. net/key/af_key.c +3 −3
  124. net/llc/llc_conn.c +1 −2
  125. net/netfilter/nfnetlink.c +1 −2
  126. net/netlink/af_netlink.c +2 −2
  127. net/rxrpc/call.c +1 −1
  128. net/rxrpc/connection.c +1 −1
  129. net/sctp/associola.c +5 −5
  130. net/sctp/bind_addr.c +6 −6
  131. net/sctp/chunk.c +1 −1
  132. net/sctp/endpointola.c +2 −3
  133. net/sctp/protocol.c +1 −1
  134. net/sctp/sm_make_chunk.c +7 −7
  135. net/sctp/sm_sideeffect.c +6 −6
  136. net/sctp/ssnmap.c +1 −1
  137. net/sctp/transport.c +2 −2
  138. net/sctp/ulpevent.c +9 −9
  139. net/sctp/ulpqueue.c +4 −4
  140. net/sunrpc/sched.c +1 −1
  141. net/xfrm/xfrm_policy.c +1 −1
  142. sound/core/memalloc.c +1 −1
  143. sound/core/memory.c +5 −5
  144. sound/core/seq/instr/ainstr_iw.c +1 −1
  145. sound/core/wrappers.c +1 −1
arch/cris/arch-v32/drivers/pci/dma.c+1−1
@@ -24,7 +24,7 @@ struct dma_coherent_mem { · 23 unmodified lines
2424 };
2525
2626 void *dma_alloc_coherent(struct device *dev, size_t size,
27− dma_addr_t *dma_handle, unsigned int __nocast gfp)
27+ dma_addr_t *dma_handle, gfp_t gfp)
2828 {
2929 void *ret;
3030 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
arch/i386/kernel/pci-dma.c+1−1
@@ -23,7 +23,7 @@ struct dma_coherent_mem { · 22 unmodified lines
2323 };
2424
2525 void *dma_alloc_coherent(struct device *dev, size_t size,
26− dma_addr_t *dma_handle, unsigned int __nocast gfp)
26+ dma_addr_t *dma_handle, gfp_t gfp)
2727 {
2828 void *ret;
2929 struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
arch/ppc64/kernel/bpa_iommu.c+1−1
@@ -310,7 +310,7 @@ static void bpa_map_iommu(void) · 309 unmodified lines
310310
311311
312312 static void *bpa_alloc_coherent(struct device *hwdev, size_t size,
313− dma_addr_t *dma_handle, unsigned int __nocast flag)
313+ dma_addr_t *dma_handle, gfp_t flag)
314314 {
315315 void *ret;
316316
arch/ppc64/kernel/dma.c+1−1
@@ -53,7 +53,7 @@ int dma_set_mask(struct device *dev, u64 dma_mask) · 52 unmodified lines
5353 EXPORT_SYMBOL(dma_set_mask);
5454
5555 void *dma_alloc_coherent(struct device *dev, size_t size,
56− dma_addr_t *dma_handle, unsigned int __nocast flag)
56+ dma_addr_t *dma_handle, gfp_t flag)
5757 {
5858 struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
5959
arch/ppc64/kernel/iommu.c+1−1
@@ -519,7 +519,7 @@ void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, · 518 unmodified lines
519519 * to the dma address (mapping) of the first page.
520520 */
521521 void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
522− dma_addr_t *dma_handle, unsigned int __nocast flag)
522+ dma_addr_t *dma_handle, gfp_t flag)
523523 {
524524 void *ret = NULL;
525525 dma_addr_t mapping;
arch/ppc64/kernel/pci_direct_iommu.c+1−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
3131 #include "pci.h"
3232
3333 static void *pci_direct_alloc_coherent(struct device *hwdev, size_t size,
34− dma_addr_t *dma_handle, unsigned int __nocast flag)
34+ dma_addr_t *dma_handle, gfp_t flag)
3535 {
3636 void *ret;
3737
arch/ppc64/kernel/pci_iommu.c+1−1
@@ -76,7 +76,7 @@ static inline struct iommu_table *devnode_table(struct device *dev) · 75 unmodified lines
7676 * to the dma address (mapping) of the first page.
7777 */
7878 static void *pci_iommu_alloc_coherent(struct device *hwdev, size_t size,
79− dma_addr_t *dma_handle, unsigned int __nocast flag)
79+ dma_addr_t *dma_handle, gfp_t flag)
8080 {
8181 return iommu_alloc_coherent(devnode_table(hwdev), size, dma_handle,
8282 flag);
arch/ppc64/kernel/vio.c+1−1
@@ -218,7 +218,7 @@ static void vio_unmap_sg(struct device *dev, struct scatterlist *sglist, · 217 unmodified lines
218218 }
219219
220220 static void *vio_alloc_coherent(struct device *dev, size_t size,
221− dma_addr_t *dma_handle, unsigned int __nocast flag)
221+ dma_addr_t *dma_handle, gfp_t flag)
222222 {
223223 return iommu_alloc_coherent(to_vio_dev(dev)->iommu_table, size,
224224 dma_handle, flag);
drivers/atm/ambassador.c+1−1
@@ -795,7 +795,7 @@ static void drain_rx_pools (amb_dev * dev) { · 794 unmodified lines
795795 }
796796
797797 static inline void fill_rx_pool (amb_dev * dev, unsigned char pool,
798− unsigned int __nocast priority)
798+ gfp_t priority)
799799 {
800800 rx_in rx;
801801 amb_rxq * rxq;
drivers/atm/firestream.c+2−3
@@ -1374,8 +1374,7 @@ static void reset_chip (struct fs_dev *dev) · 1373 unmodified lines
13741374 }
13751375 }
13761376
1377−static void __devinit *aligned_kmalloc (int size, unsigned int __nocast flags,
1378− int alignment)
1377+static void __devinit *aligned_kmalloc (int size, gfp_t flags, int alignment)
13791378 {
13801379 void *t;
13811380
@@ -1466,7 +1465,7 @@ static inline int nr_buffers_in_freepool (struct fs_dev *dev, struct freepool *f · 84 unmodified lines
14661465 working again after that... -- REW */
14671466
14681467 static void top_off_fp (struct fs_dev *dev, struct freepool *fp,
1469− unsigned int __nocast gfp_flags)
1468+ gfp_t gfp_flags)
14701469 {
14711470 struct FS_BPENTRY *qe, *ne;
14721471 struct sk_buff *skb;
drivers/atm/fore200e.c+1−1
@@ -178,7 +178,7 @@ fore200e_irq_itoa(int irq) · 177 unmodified lines
178178
179179
180180 static void*
181−fore200e_kmalloc(int size, unsigned int __nocast flags)
181+fore200e_kmalloc(int size, gfp_t flags)
182182 {
183183 void *chunk = kzalloc(size, flags);
184184
drivers/base/dmapool.c+2−3
@@ -156,7 +156,7 @@ dma_pool_create (const char *name, struct device *dev, · 155 unmodified lines
156156
157157
158158 static struct dma_page *
159−pool_alloc_page (struct dma_pool *pool, unsigned int __nocast mem_flags)
159+pool_alloc_page (struct dma_pool *pool, gfp_t mem_flags)
160160 {
161161 struct dma_page *page;
162162 int mapsize;
@@ -262,8 +262,7 @@ dma_pool_destroy (struct dma_pool *pool) · 99 unmodified lines
262262 * If such a memory block can't be allocated, null is returned.
263263 */
264264 void *
265−dma_pool_alloc (struct dma_pool *pool, unsigned int __nocast mem_flags,
266− dma_addr_t *handle)
265+dma_pool_alloc (struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)
267266 {
268267 unsigned long flags;
269268 struct dma_page *page;
drivers/block/pktcdvd.c+2−2
@@ -229,7 +229,7 @@ static int pkt_grow_pktlist(struct pktcdvd_device *pd, int nr_packets) · 228 unmodified lines
229229 return 1;
230230 }
231231
232−static void *pkt_rb_alloc(unsigned int __nocast gfp_mask, void *data)
232+static void *pkt_rb_alloc(gfp_t gfp_mask, void *data)
233233 {
234234 return kmalloc(sizeof(struct pkt_rb_node), gfp_mask);
235235 }
@@ -2082,7 +2082,7 @@ static int pkt_close(struct inode *inode, struct file *file) · 1846 unmodified lines
20822082 }
20832083
20842084
2085−static void *psd_pool_alloc(unsigned int __nocast gfp_mask, void *data)
2085+static void *psd_pool_alloc(gfp_t gfp_mask, void *data)
20862086 {
20872087 return kmalloc(sizeof(struct packet_stacked_data), gfp_mask);
20882088 }
drivers/bluetooth/bpa10x.c+1−1
@@ -308,7 +308,7 @@ unlock: · 307 unmodified lines
308308 }
309309
310310 static inline struct urb *bpa10x_alloc_urb(struct usb_device *udev, unsigned int pipe,
311− size_t size, unsigned int __nocast flags, void *data)
311+ size_t size, gfp_t flags, void *data)
312312 {
313313 struct urb *urb;
314314 struct usb_ctrlrequest *cr;
drivers/bluetooth/hci_usb.c+1−1
@@ -132,7 +132,7 @@ static struct usb_device_id blacklist_ids[] = { · 131 unmodified lines
132132 { } /* Terminating entry */
133133 };
134134
135−static struct _urb *_urb_alloc(int isoc, unsigned int __nocast gfp)
135+static struct _urb *_urb_alloc(int isoc, gfp_t gfp)
136136 {
137137 struct _urb *_urb = kmalloc(sizeof(struct _urb) +
138138 sizeof(struct usb_iso_packet_descriptor) * isoc, gfp);
drivers/connector/connector.c+1−2
@@ -69,8 +69,7 @@ int cn_already_initialized = 0; · 68 unmodified lines
6969 * a new message.
7070 *
7171 */
72−int cn_netlink_send(struct cn_msg *msg, u32 __group,
73− unsigned int __nocast gfp_mask)
72+int cn_netlink_send(struct cn_msg *msg, u32 __group, gfp_t gfp_mask)
7473 {
7574 struct cn_callback_entry *__cbq;
7675 unsigned int size;
drivers/ieee1394/raw1394.c+1−1
@@ -98,7 +98,7 @@ static struct hpsb_address_ops arm_ops = { · 97 unmodified lines
9898
9999 static void queue_complete_cb(struct pending_request *req);
100100
101−static struct pending_request *__alloc_pending_request(unsigned int __nocast flags)
101+static struct pending_request *__alloc_pending_request(gfp_t flags)
102102 {
103103 struct pending_request *req;
104104
drivers/infiniband/core/mad.c+1−1
@@ -783,7 +783,7 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent, · 782 unmodified lines
783783 u32 remote_qpn, u16 pkey_index,
784784 struct ib_ah *ah, int rmpp_active,
785785 int hdr_len, int data_len,
786− unsigned int __nocast gfp_mask)
786+ gfp_t gfp_mask)
787787 {
788788 struct ib_mad_agent_private *mad_agent_priv;
789789 struct ib_mad_send_buf *send_buf;
drivers/infiniband/core/sa_query.c+3−3
@@ -574,7 +574,7 @@ static void ib_sa_path_rec_release(struct ib_sa_query *sa_query) · 573 unmodified lines
574574 int ib_sa_path_rec_get(struct ib_device *device, u8 port_num,
575575 struct ib_sa_path_rec *rec,
576576 ib_sa_comp_mask comp_mask,
577− int timeout_ms, unsigned int __nocast gfp_mask,
577+ int timeout_ms, gfp_t gfp_mask,
578578 void (*callback)(int status,
579579 struct ib_sa_path_rec *resp,
580580 void *context),
@@ -676,7 +676,7 @@ static void ib_sa_service_rec_release(struct ib_sa_query *sa_query) · 95 unmodified lines
676676 int ib_sa_service_rec_query(struct ib_device *device, u8 port_num, u8 method,
677677 struct ib_sa_service_rec *rec,
678678 ib_sa_comp_mask comp_mask,
679− int timeout_ms, unsigned int __nocast gfp_mask,
679+ int timeout_ms, gfp_t gfp_mask,
680680 void (*callback)(int status,
681681 struct ib_sa_service_rec *resp,
682682 void *context),
@@ -759,7 +759,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num, · 76 unmodified lines
759759 u8 method,
760760 struct ib_sa_mcmember_rec *rec,
761761 ib_sa_comp_mask comp_mask,
762− int timeout_ms, unsigned int __nocast gfp_mask,
762+ int timeout_ms, gfp_t gfp_mask,
763763 void (*callback)(int status,
764764 struct ib_sa_mcmember_rec *resp,
765765 void *context),
drivers/md/dm-crypt.c+1−1
@@ -96,7 +96,7 @@ static kmem_cache_t *_crypt_io_pool; · 95 unmodified lines
9696 /*
9797 * Mempool alloc and free functions for the page
9898 */
99−static void *mempool_alloc_page(unsigned int __nocast gfp_mask, void *data)
99+static void *mempool_alloc_page(gfp_t gfp_mask, void *data)
100100 {
101101 return alloc_page(gfp_mask);
102102 }
drivers/md/dm-io.c+1−1
@@ -32,7 +32,7 @@ struct io { · 31 unmodified lines
3232 static unsigned _num_ios;
3333 static mempool_t *_io_pool;
3434
35−static void *alloc_io(unsigned int __nocast gfp_mask, void *pool_data)
35+static void *alloc_io(gfp_t gfp_mask, void *pool_data)
3636 {
3737 return kmalloc(sizeof(struct io), gfp_mask);
3838 }
drivers/md/dm-raid1.c+1−1
@@ -122,7 +122,7 @@ static inline sector_t region_to_sector(struct region_hash *rh, region_t region) · 121 unmodified lines
122122 /* FIXME move this */
123123 static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw);
124124
125−static void *region_alloc(unsigned int __nocast gfp_mask, void *pool_data)
125+static void *region_alloc(gfp_t gfp_mask, void *pool_data)
126126 {
127127 return kmalloc(sizeof(struct region), gfp_mask);
128128 }
drivers/md/multipath.c+1−1
@@ -38,7 +38,7 @@ · 37 unmodified lines
3838 static mdk_personality_t multipath_personality;
3939
4040
41−static void *mp_pool_alloc(unsigned int __nocast gfp_flags, void *data)
41+static void *mp_pool_alloc(gfp_t gfp_flags, void *data)
4242 {
4343 struct multipath_bh *mpb;
4444 mpb = kmalloc(sizeof(*mpb), gfp_flags);
drivers/md/raid1.c+2−2
@@ -52,7 +52,7 @@ static mdk_personality_t raid1_personality; · 51 unmodified lines
5252 static void unplug_slaves(mddev_t *mddev);
5353
5454
55−static void * r1bio_pool_alloc(unsigned int __nocast gfp_flags, void *data)
55+static void * r1bio_pool_alloc(gfp_t gfp_flags, void *data)
5656 {
5757 struct pool_info *pi = data;
5858 r1bio_t *r1_bio;
@@ -79,7 +79,7 @@ static void r1bio_pool_free(void *r1_bio, void *data) · 20 unmodified lines
7979 #define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE)
8080 #define RESYNC_WINDOW (2048*1024)
8181
82−static void * r1buf_pool_alloc(unsigned int __nocast gfp_flags, void *data)
82+static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data)
8383 {
8484 struct pool_info *pi = data;
8585 struct page *page;
drivers/md/raid10.c+2−2
@@ -47,7 +47,7 @@ · 46 unmodified lines
4747
4848 static void unplug_slaves(mddev_t *mddev);
4949
50−static void * r10bio_pool_alloc(unsigned int __nocast gfp_flags, void *data)
50+static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data)
5151 {
5252 conf_t *conf = data;
5353 r10bio_t *r10_bio;
@@ -81,7 +81,7 @@ static void r10bio_pool_free(void *r10_bio, void *data) · 27 unmodified lines
8181 * one for write (we recover only one drive per r10buf)
8282 *
8383 */
84−static void * r10buf_pool_alloc(unsigned int __nocast gfp_flags, void *data)
84+static void * r10buf_pool_alloc(gfp_t gfp_flags, void *data)
8585 {
8686 conf_t *conf = data;
8787 struct page *page;
drivers/net/bonding/bond_main.c+1−1
@@ -1290,7 +1290,7 @@ static void bond_mc_list_destroy(struct bonding *bond) · 1289 unmodified lines
12901290 * Copy all the Multicast addresses from src to the bonding device dst
12911291 */
12921292 static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond,
1293− unsigned int __nocast gfp_flag)
1293+ gfp_t gfp_flag)
12941294 {
12951295 struct dev_mc_list *dmi, *new_dmi;
12961296
drivers/net/ns83820.c+1−1
@@ -584,7 +584,7 @@ static inline int ns83820_add_rx_skb(struct ns83820 *dev, struct sk_buff *skb) · 583 unmodified lines
584584 return 0;
585585 }
586586
587−static inline int rx_refill(struct net_device *ndev, unsigned int __nocast gfp)
587+static inline int rx_refill(struct net_device *ndev, gfp_t gfp)
588588 {
589589 struct ns83820 *dev = PRIV(ndev);
590590 unsigned i;
drivers/net/sungem.h+1−1
@@ -1036,7 +1036,7 @@ struct gem { · 1035 unmodified lines
10361036 #define ALIGNED_RX_SKB_ADDR(addr) \
10371037 ((((unsigned long)(addr) + (64UL - 1UL)) & ~(64UL - 1UL)) - (unsigned long)(addr))
10381038 static __inline__ struct sk_buff *gem_alloc_skb(int size,
1039− unsigned int __nocast gfp_flags)
1039+ gfp_t gfp_flags)
10401040 {
10411041 struct sk_buff *skb = alloc_skb(size + 64, gfp_flags);
10421042
drivers/s390/scsi/zfcp_aux.c+1−1
@@ -833,7 +833,7 @@ zfcp_unit_dequeue(struct zfcp_unit *unit) · 832 unmodified lines
833833 }
834834
835835 static void *
836−zfcp_mempool_alloc(unsigned int __nocast gfp_mask, void *size)
836+zfcp_mempool_alloc(gfp_t gfp_mask, void *size)
837837 {
838838 return kmalloc((size_t) size, gfp_mask);
839839 }
fs/bio.c+5−5
@@ -75,7 +75,7 @@ struct bio_set { · 74 unmodified lines
7575 */
7676 static struct bio_set *fs_bio_set;
7777
78−static inline struct bio_vec *bvec_alloc_bs(unsigned int __nocast gfp_mask, int nr, unsigned long *idx, struct bio_set *bs)
78+static inline struct bio_vec *bvec_alloc_bs(gfp_t gfp_mask, int nr, unsigned long *idx, struct bio_set *bs)
7979 {
8080 struct bio_vec *bvl;
8181 struct biovec_slab *bp;
@@ -155,7 +155,7 @@ inline void bio_init(struct bio *bio) · 73 unmodified lines
155155 * allocate bio and iovecs from the memory pools specified by the
156156 * bio_set structure.
157157 **/
158−struct bio *bio_alloc_bioset(unsigned int __nocast gfp_mask, int nr_iovecs, struct bio_set *bs)
158+struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
159159 {
160160 struct bio *bio = mempool_alloc(bs->bio_pool, gfp_mask);
161161
@@ -181,7 +181,7 @@ out: · 19 unmodified lines
181181 return bio;
182182 }
183183
184−struct bio *bio_alloc(unsigned int __nocast gfp_mask, int nr_iovecs)
184+struct bio *bio_alloc(gfp_t gfp_mask, int nr_iovecs)
185185 {
186186 struct bio *bio = bio_alloc_bioset(gfp_mask, nr_iovecs, fs_bio_set);
187187
@@ -277,7 +277,7 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src) · 89 unmodified lines
277277 *
278278 * Like __bio_clone, only also allocates the returned bio
279279 */
280−struct bio *bio_clone(struct bio *bio, unsigned int __nocast gfp_mask)
280+struct bio *bio_clone(struct bio *bio, gfp_t gfp_mask)
281281 {
282282 struct bio *b = bio_alloc_bioset(gfp_mask, bio->bi_max_vecs, fs_bio_set);
283283
@@ -1078,7 +1078,7 @@ struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, int first_sectors) · 794 unmodified lines
10781078 return bp;
10791079 }
10801080
1081−static void *bio_pair_alloc(unsigned int __nocast gfp_flags, void *data)
1081+static void *bio_pair_alloc(gfp_t gfp_flags, void *data)
10821082 {
10831083 return kmalloc(sizeof(struct bio_pair), gfp_flags);
10841084 }
fs/buffer.c+1−1
@@ -3045,7 +3045,7 @@ static void recalc_bh_state(void) · 3044 unmodified lines
30453045 buffer_heads_over_limit = (tot > max_buffer_heads);
30463046 }
30473047
3048−struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags)
3048+struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
30493049 {
30503050 struct buffer_head *ret = kmem_cache_alloc(bh_cachep, gfp_flags);
30513051 if (ret) {
fs/mpage.c+1−1
@@ -102,7 +102,7 @@ static struct bio *mpage_bio_submit(int rw, struct bio *bio) · 101 unmodified lines
102102 static struct bio *
103103 mpage_alloc(struct block_device *bdev,
104104 sector_t first_sector, int nr_vecs,
105− unsigned int __nocast gfp_flags)
105+ gfp_t gfp_flags)
106106 {
107107 struct bio *bio;
108108
fs/ntfs/malloc.h+1−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 * Depending on @gfp_mask the allocation may be guaranteed to succeed.
4141 */
4242 static inline void *__ntfs_malloc(unsigned long size,
43− unsigned int __nocast gfp_mask)
43+ gfp_t gfp_mask)
4444 {
4545 if (likely(size <= PAGE_SIZE)) {
4646 BUG_ON(!size);
fs/posix_acl.c+3−3
@@ -35,7 +35,7 @@ EXPORT_SYMBOL(posix_acl_permission); · 34 unmodified lines
3535 * Allocate a new ACL with the specified number of entries.
3636 */
3737 struct posix_acl *
38−posix_acl_alloc(int count, unsigned int __nocast flags)
38+posix_acl_alloc(int count, gfp_t flags)
3939 {
4040 const size_t size = sizeof(struct posix_acl) +
4141 count * sizeof(struct posix_acl_entry);
@@ -51,7 +51,7 @@ posix_acl_alloc(int count, unsigned int __nocast flags) · 9 unmodified lines
5151 * Clone an ACL.
5252 */
5353 struct posix_acl *
54−posix_acl_clone(const struct posix_acl *acl, unsigned int __nocast flags)
54+posix_acl_clone(const struct posix_acl *acl, gfp_t flags)
5555 {
5656 struct posix_acl *clone = NULL;
5757
@@ -185,7 +185,7 @@ posix_acl_equiv_mode(const struct posix_acl *acl, mode_t *mode_p) · 127 unmodified lines
185185 * Create an ACL representing the file mode permission bits of an inode.
186186 */
187187 struct posix_acl *
188−posix_acl_from_mode(mode_t mode, unsigned int __nocast flags)
188+posix_acl_from_mode(mode_t mode, gfp_t flags)
189189 {
190190 struct posix_acl *acl = posix_acl_alloc(3, flags);
191191 if (!acl)
fs/xfs/linux-2.6/kmem.c+5−5
@@ -45,7 +45,7 @@ · 44 unmodified lines
4545
4646
4747 void *
48−kmem_alloc(size_t size, unsigned int __nocast flags)
48+kmem_alloc(size_t size, gfp_t flags)
4949 {
5050 int retries = 0;
5151 unsigned int lflags = kmem_flags_convert(flags);
@@ -67,7 +67,7 @@ kmem_alloc(size_t size, unsigned int __nocast flags) · 15 unmodified lines
6767 }
6868
6969 void *
70−kmem_zalloc(size_t size, unsigned int __nocast flags)
70+kmem_zalloc(size_t size, gfp_t flags)
7171 {
7272 void *ptr;
7373
@@ -90,7 +90,7 @@ kmem_free(void *ptr, size_t size) · 16 unmodified lines
9090
9191 void *
9292 kmem_realloc(void *ptr, size_t newsize, size_t oldsize,
93− unsigned int __nocast flags)
93+ gfp_t flags)
9494 {
9595 void *new;
9696
@@ -105,7 +105,7 @@ kmem_realloc(void *ptr, size_t newsize, size_t oldsize, · 8 unmodified lines
105105 }
106106
107107 void *
108−kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags)
108+kmem_zone_alloc(kmem_zone_t *zone, gfp_t flags)
109109 {
110110 int retries = 0;
111111 unsigned int lflags = kmem_flags_convert(flags);
@@ -124,7 +124,7 @@ kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags) · 12 unmodified lines
124124 }
125125
126126 void *
127−kmem_zone_zalloc(kmem_zone_t *zone, unsigned int __nocast flags)
127+kmem_zone_zalloc(kmem_zone_t *zone, gfp_t flags)
128128 {
129129 void *ptr;
130130
fs/xfs/linux-2.6/kmem.h+6−7
@@ -81,7 +81,7 @@ typedef unsigned long xfs_pflags_t; · 80 unmodified lines
8181 *(NSTATEP) = *(OSTATEP); \
8282 } while (0)
8383
84−static __inline unsigned int kmem_flags_convert(unsigned int __nocast flags)
84+static __inline unsigned int kmem_flags_convert(gfp_t flags)
8585 {
8686 unsigned int lflags = __GFP_NOWARN; /* we'll report problems, if need be */
8787
@@ -125,13 +125,12 @@ kmem_zone_destroy(kmem_zone_t *zone) · 37 unmodified lines
125125 BUG();
126126 }
127127
128−extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
129−extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast);
128+extern void *kmem_zone_zalloc(kmem_zone_t *, gfp_t);
129+extern void *kmem_zone_alloc(kmem_zone_t *, gfp_t);
130130
131−extern void *kmem_alloc(size_t, unsigned int __nocast);
132−extern void *kmem_realloc(void *, size_t, size_t,
133− unsigned int __nocast);
134−extern void *kmem_zalloc(size_t, unsigned int __nocast);
131+extern void *kmem_alloc(size_t, gfp_t);
132+extern void *kmem_realloc(void *, size_t, size_t, gfp_t);
133+extern void *kmem_zalloc(size_t, gfp_t);
135134 extern void kmem_free(void *, size_t);
136135
137136 typedef struct shrinker *kmem_shaker_t;
include/asm-generic/dma-mapping.h+2−2
@@ -35,7 +35,7 @@ dma_set_mask(struct device *dev, u64 dma_mask) · 34 unmodified lines
3535
3636 static inline void *
3737 dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
38− unsigned int __nocast flag)
38+ gfp_t flag)
3939 {
4040 BUG_ON(dev->bus != &pci_bus_type);
4141
@@ -168,7 +168,7 @@ dma_set_mask(struct device *dev, u64 dma_mask) · 126 unmodified lines
168168
169169 static inline void *
170170 dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
171− unsigned int __nocast flag)
171+ gfp_t flag)
172172 {
173173 BUG();
174174 return NULL;
include/asm-i386/dma-mapping.h+1−1
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
1212
1313 void *dma_alloc_coherent(struct device *dev, size_t size,
14− dma_addr_t *dma_handle, unsigned int __nocast flag);
14+ dma_addr_t *dma_handle, gfp_t flag);
1515
1616 void dma_free_coherent(struct device *dev, size_t size,
1717 void *vaddr, dma_addr_t dma_handle);
include/asm-ppc/dma-mapping.h+1−1
@@ -61,7 +61,7 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) · 60 unmodified lines
6161
6262 static inline void *dma_alloc_coherent(struct device *dev, size_t size,
6363 dma_addr_t * dma_handle,
64− unsigned int __nocast gfp)
64+ gfp_t gfp)
6565 {
6666 #ifdef CONFIG_NOT_COHERENT_CACHE
6767 return __dma_alloc_coherent(size, dma_handle, gfp);
include/asm-ppc64/dma-mapping.h+2−2
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919 extern int dma_supported(struct device *dev, u64 mask);
2020 extern int dma_set_mask(struct device *dev, u64 dma_mask);
2121 extern void *dma_alloc_coherent(struct device *dev, size_t size,
22− dma_addr_t *dma_handle, unsigned int __nocast flag);
22+ dma_addr_t *dma_handle, gfp_t flag);
2323 extern void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
2424 dma_addr_t dma_handle);
2525 extern dma_addr_t dma_map_single(struct device *dev, void *cpu_addr,
@@ -118,7 +118,7 @@ dma_cache_sync(void *vaddr, size_t size, · 92 unmodified lines
118118 */
119119 struct dma_mapping_ops {
120120 void * (*alloc_coherent)(struct device *dev, size_t size,
121− dma_addr_t *dma_handle, unsigned int __nocast flag);
121+ dma_addr_t *dma_handle, gfp_t flag);
122122 void (*free_coherent)(struct device *dev, size_t size,
123123 void *vaddr, dma_addr_t dma_handle);
124124 dma_addr_t (*map_single)(struct device *dev, void *ptr,
include/asm-ppc64/iommu.h+1−1
@@ -122,7 +122,7 @@ extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, · 121 unmodified lines
122122 int nelems, enum dma_data_direction direction);
123123
124124 extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
125− dma_addr_t *dma_handle, unsigned int __nocast flag);
125+ dma_addr_t *dma_handle, gfp_t flag);
126126 extern void iommu_free_coherent(struct iommu_table *tbl, size_t size,
127127 void *vaddr, dma_addr_t dma_handle);
128128 extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
include/linux/atmdev.h+1−1
@@ -467,7 +467,7 @@ static inline void atm_dev_put(struct atm_dev *dev) · 466 unmodified lines
467467
468468 int atm_charge(struct atm_vcc *vcc,int truesize);
469469 struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
470− unsigned int __nocast gfp_flags);
470+ gfp_t gfp_flags);
471471 int atm_pcr_goal(struct atm_trafprm *tp);
472472
473473 void vcc_release_async(struct atm_vcc *vcc, int reply);
include/linux/bio.h+3−3
@@ -276,8 +276,8 @@ extern void bio_pair_release(struct bio_pair *dbio); · 275 unmodified lines
276276 extern struct bio_set *bioset_create(int, int, int);
277277 extern void bioset_free(struct bio_set *);
278278
279−extern struct bio *bio_alloc(unsigned int __nocast, int);
280−extern struct bio *bio_alloc_bioset(unsigned int __nocast, int, struct bio_set *);
279+extern struct bio *bio_alloc(gfp_t, int);
280+extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
281281 extern void bio_put(struct bio *);
282282 extern void bio_free(struct bio *, struct bio_set *);
283283
@@ -287,7 +287,7 @@ extern int bio_phys_segments(struct request_queue *, struct bio *); · 3 unmodified lines
287287 extern int bio_hw_segments(struct request_queue *, struct bio *);
288288
289289 extern void __bio_clone(struct bio *, struct bio *);
290−extern struct bio *bio_clone(struct bio *, unsigned int __nocast);
290+extern struct bio *bio_clone(struct bio *, gfp_t);
291291
292292 extern void bio_init(struct bio *);
293293
include/linux/buffer_head.h+1−1
@@ -172,7 +172,7 @@ void __brelse(struct buffer_head *); · 171 unmodified lines
172172 void __bforget(struct buffer_head *);
173173 void __breadahead(struct block_device *, sector_t block, int size);
174174 struct buffer_head *__bread(struct block_device *, sector_t block, int size);
175−struct buffer_head *alloc_buffer_head(unsigned int __nocast gfp_flags);
175+struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
176176 void free_buffer_head(struct buffer_head * bh);
177177 void FASTCALL(unlock_buffer(struct buffer_head *bh));
178178 void FASTCALL(__lock_buffer(struct buffer_head *bh));
include/linux/connector.h+1−1
@@ -149,7 +149,7 @@ struct cn_dev { · 148 unmodified lines
149149
150150 int cn_add_callback(struct cb_id *, char *, void (*callback) (void *));
151151 void cn_del_callback(struct cb_id *);
152−int cn_netlink_send(struct cn_msg *, u32, unsigned int __nocast);
152+int cn_netlink_send(struct cn_msg *, u32, gfp_t);
153153
154154 int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *));
155155 void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
include/linux/cpuset.h+2−3
@@ -23,7 +23,7 @@ void cpuset_init_current_mems_allowed(void); · 22 unmodified lines
2323 void cpuset_update_current_mems_allowed(void);
2424 void cpuset_restrict_to_mems_allowed(unsigned long *nodes);
2525 int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl);
26−extern int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask);
26+extern int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask);
2727 extern int cpuset_excl_nodes_overlap(const struct task_struct *p);
2828 extern struct file_operations proc_cpuset_operations;
2929 extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer);
@@ -49,8 +49,7 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) · 19 unmodified lines
4949 return 1;
5050 }
5151
52−static inline int cpuset_zone_allowed(struct zone *z,
53− unsigned int __nocast gfp_mask)
52+static inline int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
5453 {
5554 return 1;
5655 }
include/linux/dmapool.h+1−1
@@ -19,7 +19,7 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev, · 18 unmodified lines
1919
2020 void dma_pool_destroy(struct dma_pool *pool);
2121
22−void *dma_pool_alloc(struct dma_pool *pool, unsigned int __nocast mem_flags,
22+void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
2323 dma_addr_t *handle);
2424
2525 void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);
include/linux/gfp.h+7−7
@@ -85,9 +85,9 @@ static inline void arch_free_page(struct page *page, int order) { } · 84 unmodified lines
8585 #endif
8686
8787 extern struct page *
88−FASTCALL(__alloc_pages(unsigned int, unsigned int, struct zonelist *));
88+FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));
8989
90−static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_mask,
90+static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
9191 unsigned int order)
9292 {
9393 if (unlikely(order >= MAX_ORDER))
@@ -98,17 +98,17 @@ static inline struct page *alloc_pages_node(int nid, unsigned int __nocast gfp_m · 4 unmodified lines
9898 }
9999
100100 #ifdef CONFIG_NUMA
101−extern struct page *alloc_pages_current(unsigned int __nocast gfp_mask, unsigned order);
101+extern struct page *alloc_pages_current(gfp_t gfp_mask, unsigned order);
102102
103103 static inline struct page *
104−alloc_pages(unsigned int __nocast gfp_mask, unsigned int order)
104+alloc_pages(gfp_t gfp_mask, unsigned int order)
105105 {
106106 if (unlikely(order >= MAX_ORDER))
107107 return NULL;
108108
109109 return alloc_pages_current(gfp_mask, order);
110110 }
111−extern struct page *alloc_page_vma(unsigned __nocast gfp_mask,
111+extern struct page *alloc_page_vma(gfp_t gfp_mask,
112112 struct vm_area_struct *vma, unsigned long addr);
113113 #else
114114 #define alloc_pages(gfp_mask, order) \
@@ -117,8 +117,8 @@ extern struct page *alloc_page_vma(unsigned __nocast gfp_mask, · 2 unmodified lines
117117 #endif
118118 #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
119119
120−extern unsigned long FASTCALL(__get_free_pages(unsigned int __nocast gfp_mask, unsigned int order));
121−extern unsigned long FASTCALL(get_zeroed_page(unsigned int __nocast gfp_mask));
120+extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order));
121+extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask));
122122
123123 #define __get_free_page(gfp_mask) \
124124 __get_free_pages((gfp_mask),0)
include/linux/jbd.h+1−1
@@ -935,7 +935,7 @@ void journal_put_journal_head(struct journal_head *jh); · 934 unmodified lines
935935 */
936936 extern kmem_cache_t *jbd_handle_cache;
937937
938−static inline handle_t *jbd_alloc_handle(unsigned int __nocast gfp_flags)
938+static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
939939 {
940940 return kmem_cache_alloc(jbd_handle_cache, gfp_flags);
941941 }
include/linux/kfifo.h+2−2
@@ -35,8 +35,8 @@ struct kfifo { · 34 unmodified lines
3535 };
3636
3737 extern struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
38− unsigned int __nocast gfp_mask, spinlock_t *lock);
39−extern struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask,
38+ gfp_t gfp_mask, spinlock_t *lock);
39+extern struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask,
4040 spinlock_t *lock);
4141 extern void kfifo_free(struct kfifo *fifo);
4242 extern unsigned int __kfifo_put(struct kfifo *fifo,
include/linux/mempool.h+4−5
@@ -6,7 +6,7 @@ · 5 unmodified lines
66
77 #include <linux/wait.h>
88
9−typedef void * (mempool_alloc_t)(unsigned int __nocast gfp_mask, void *pool_data);
9+typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
1010 typedef void (mempool_free_t)(void *element, void *pool_data);
1111
1212 typedef struct mempool_s {
@@ -26,17 +26,16 @@ extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn, · 13 unmodified lines
2626 extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
2727 mempool_free_t *free_fn, void *pool_data, int nid);
2828
29−extern int mempool_resize(mempool_t *pool, int new_min_nr,
30− unsigned int __nocast gfp_mask);
29+extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask);
3130 extern void mempool_destroy(mempool_t *pool);
32−extern void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask);
31+extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask);
3332 extern void mempool_free(void *element, mempool_t *pool);
3433
3534 /*
3635 * A mempool_alloc_t and mempool_free_t that get the memory from
3736 * a slab that is passed in through pool_data.
3837 */
39−void *mempool_alloc_slab(unsigned int __nocast gfp_mask, void *pool_data);
38+void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
4039 void mempool_free_slab(void *element, void *pool_data);
4140
4241 #endif /* _LINUX_MEMPOOL_H */
include/linux/netlink.h+1−1
@@ -131,7 +131,7 @@ extern struct sock *netlink_kernel_create(int unit, unsigned int groups, void (* · 130 unmodified lines
131131 extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
132132 extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
133133 extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
134− __u32 group, unsigned int __nocast allocation);
134+ __u32 group, gfp_t allocation);
135135 extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
136136 extern int netlink_register_notifier(struct notifier_block *nb);
137137 extern int netlink_unregister_notifier(struct notifier_block *nb);
include/linux/pagemap.h+1−1
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919 #define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */
2020 #define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */
2121
22−static inline unsigned int __nocast mapping_gfp_mask(struct address_space * mapping)
22+static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
2323 {
2424 return mapping->flags & __GFP_BITS_MASK;
2525 }
include/linux/posix_acl.h+3−3
@@ -71,11 +71,11 @@ posix_acl_release(struct posix_acl *acl) · 70 unmodified lines
7171
7272 /* posix_acl.c */
7373
74−extern struct posix_acl *posix_acl_alloc(int, unsigned int __nocast);
75−extern struct posix_acl *posix_acl_clone(const struct posix_acl *, unsigned int __nocast);
74+extern struct posix_acl *posix_acl_alloc(int, gfp_t);
75+extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t);
7676 extern int posix_acl_valid(const struct posix_acl *);
7777 extern int posix_acl_permission(struct inode *, const struct posix_acl *, int);
78−extern struct posix_acl *posix_acl_from_mode(mode_t, unsigned int __nocast);
78+extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t);
7979 extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *);
8080 extern int posix_acl_create_masq(struct posix_acl *, mode_t *);
8181 extern int posix_acl_chmod_masq(struct posix_acl *, mode_t);
include/linux/radix-tree.h+1−1
@@ -50,7 +50,7 @@ void *radix_tree_delete(struct radix_tree_root *, unsigned long); · 49 unmodified lines
5050 unsigned int
5151 radix_tree_gang_lookup(struct radix_tree_root *root, void **results,
5252 unsigned long first_index, unsigned int max_items);
53−int radix_tree_preload(unsigned int __nocast gfp_mask);
53+int radix_tree_preload(gfp_t gfp_mask);
5454 void radix_tree_init(void);
5555 void *radix_tree_tag_set(struct radix_tree_root *root,
5656 unsigned long index, int tag);
include/linux/security.h+2−4
@@ -2634,8 +2634,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o · 2633 unmodified lines
26342634 return security_ops->socket_getpeersec(sock, optval, optlen, len);
26352635 }
26362636
2637−static inline int security_sk_alloc(struct sock *sk, int family,
2638− unsigned int __nocast priority)
2637+static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
26392638 {
26402639 return security_ops->sk_alloc_security(sk, family, priority);
26412640 }
@@ -2752,8 +2751,7 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o · 110 unmodified lines
27522751 return -ENOPROTOOPT;
27532752 }
27542753
2755−static inline int security_sk_alloc(struct sock *sk, int family,
2756− unsigned int __nocast priority)
2754+static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)
27572755 {
27582756 return 0;
27592757 }
include/linux/skbuff.h+14−14
@@ -302,37 +302,37 @@ struct sk_buff { · 301 unmodified lines
302302
303303 extern void __kfree_skb(struct sk_buff *skb);
304304 extern struct sk_buff *__alloc_skb(unsigned int size,
305− unsigned int __nocast priority, int fclone);
305+ gfp_t priority, int fclone);
306306 static inline struct sk_buff *alloc_skb(unsigned int size,
307− unsigned int __nocast priority)
307+ gfp_t priority)
308308 {
309309 return __alloc_skb(size, priority, 0);
310310 }
311311
312312 static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
313− unsigned int __nocast priority)
313+ gfp_t priority)
314314 {
315315 return __alloc_skb(size, priority, 1);
316316 }
317317
318318 extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
319319 unsigned int size,
320− unsigned int __nocast priority);
320+ gfp_t priority);
321321 extern void kfree_skbmem(struct sk_buff *skb);
322322 extern struct sk_buff *skb_clone(struct sk_buff *skb,
323− unsigned int __nocast priority);
323+ gfp_t priority);
324324 extern struct sk_buff *skb_copy(const struct sk_buff *skb,
325− unsigned int __nocast priority);
325+ gfp_t priority);
326326 extern struct sk_buff *pskb_copy(struct sk_buff *skb,
327− unsigned int __nocast gfp_mask);
327+ gfp_t gfp_mask);
328328 extern int pskb_expand_head(struct sk_buff *skb,
329329 int nhead, int ntail,
330− unsigned int __nocast gfp_mask);
330+ gfp_t gfp_mask);
331331 extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
332332 unsigned int headroom);
333333 extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
334334 int newheadroom, int newtailroom,
335− unsigned int __nocast priority);
335+ gfp_t priority);
336336 extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad);
337337 #define dev_kfree_skb(a) kfree_skb(a)
338338 extern void skb_over_panic(struct sk_buff *skb, int len,
@@ -484,7 +484,7 @@ static inline int skb_shared(const struct sk_buff *skb) · 145 unmodified lines
484484 * NULL is returned on a memory allocation failure.
485485 */
486486 static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
487− unsigned int __nocast pri)
487+ gfp_t pri)
488488 {
489489 might_sleep_if(pri & __GFP_WAIT);
490490 if (skb_shared(skb)) {
@@ -516,7 +516,7 @@ static inline struct sk_buff *skb_share_check(struct sk_buff *skb, · 25 unmodified lines
516516 * %NULL is returned on a memory allocation failure.
517517 */
518518 static inline struct sk_buff *skb_unshare(struct sk_buff *skb,
519− unsigned int __nocast pri)
519+ gfp_t pri)
520520 {
521521 might_sleep_if(pri & __GFP_WAIT);
522522 if (skb_cloned(skb)) {
@@ -1017,7 +1017,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) · 494 unmodified lines
10171017 * %NULL is returned in there is no free memory.
10181018 */
10191019 static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
1020− unsigned int __nocast gfp_mask)
1020+ gfp_t gfp_mask)
10211021 {
10221022 struct sk_buff *skb = alloc_skb(length + 16, gfp_mask);
10231023 if (likely(skb))
@@ -1130,8 +1130,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i, · 106 unmodified lines
11301130 * If there is no free memory -ENOMEM is returned, otherwise zero
11311131 * is returned and the old skb data released.
11321132 */
1133−extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp);
1134−static inline int skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp)
1133+extern int __skb_linearize(struct sk_buff *skb, gfp_t gfp);
1134+static inline int skb_linearize(struct sk_buff *skb, gfp_t gfp)
11351135 {
11361136 return __skb_linearize(skb, gfp);
11371137 }
include/linux/slab.h+9−10
@@ -61,11 +61,11 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo · 60 unmodified lines
6161 void (*)(void *, kmem_cache_t *, unsigned long));
6262 extern int kmem_cache_destroy(kmem_cache_t *);
6363 extern int kmem_cache_shrink(kmem_cache_t *);
64−extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
64+extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
6565 extern void kmem_cache_free(kmem_cache_t *, void *);
6666 extern unsigned int kmem_cache_size(kmem_cache_t *);
6767 extern const char *kmem_cache_name(kmem_cache_t *);
68−extern kmem_cache_t *kmem_find_general_cachep(size_t size, unsigned int __nocast gfpflags);
68+extern kmem_cache_t *kmem_find_general_cachep(size_t size, gfp_t gfpflags);
6969
7070 /* Size description struct for general caches. */
7171 struct cache_sizes {
@@ -74,9 +74,9 @@ struct cache_sizes { · 2 unmodified lines
7474 kmem_cache_t *cs_dmacachep;
7575 };
7676 extern struct cache_sizes malloc_sizes[];
77−extern void *__kmalloc(size_t, unsigned int __nocast);
77+extern void *__kmalloc(size_t, gfp_t);
7878
79−static inline void *kmalloc(size_t size, unsigned int __nocast flags)
79+static inline void *kmalloc(size_t size, gfp_t flags)
8080 {
8181 if (__builtin_constant_p(size)) {
8282 int i = 0;
@@ -99,7 +99,7 @@ found: · 16 unmodified lines
9999 return __kmalloc(size, flags);
100100 }
101101
102−extern void *kzalloc(size_t, unsigned int __nocast);
102+extern void *kzalloc(size_t, gfp_t);
103103
104104 /**
105105 * kcalloc - allocate memory for an array. The memory is set to zero.
@@ -107,7 +107,7 @@ extern void *kzalloc(size_t, unsigned int __nocast); · 1 unmodified line
107107 * @size: element size.
108108 * @flags: the type of memory to allocate.
109109 */
110−static inline void *kcalloc(size_t n, size_t size, unsigned int __nocast flags)
110+static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
111111 {
112112 if (n != 0 && size > INT_MAX / n)
113113 return NULL;
@@ -118,15 +118,14 @@ extern void kfree(const void *); · 4 unmodified lines
118118 extern unsigned int ksize(const void *);
119119
120120 #ifdef CONFIG_NUMA
121−extern void *kmem_cache_alloc_node(kmem_cache_t *,
122− unsigned int __nocast flags, int node);
123−extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node);
121+extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node);
122+extern void *kmalloc_node(size_t size, gfp_t flags, int node);
124123 #else
125124 static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
126125 {
127126 return kmem_cache_alloc(cachep, flags);
128127 }
129−static inline void *kmalloc_node(size_t size, unsigned int __nocast flags, int node)
128+static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
130129 {
131130 return kmalloc(size, flags);
132131 }
include/linux/string.h+1−1
@@ -88,7 +88,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t); · 87 unmodified lines
8888 extern void * memchr(const void *,int,__kernel_size_t);
8989 #endif
9090
91−extern char *kstrdup(const char *s, unsigned int __nocast gfp);
91+extern char *kstrdup(const char *s, gfp_t gfp);
9292
9393 #ifdef __cplusplus
9494 }
include/linux/swap.h+1−1
@@ -147,7 +147,7 @@ struct swap_list_t { · 146 unmodified lines
147147 #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
148148
149149 /* linux/mm/oom_kill.c */
150−extern void out_of_memory(unsigned int __nocast gfp_mask, int order);
150+extern void out_of_memory(gfp_t gfp_mask, int order);
151151
152152 /* linux/mm/memory.c */
153153 extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);
include/linux/textsearch.h+1−1
@@ -159,7 +159,7 @@ extern unsigned int textsearch_find_continuous(struct ts_config *, · 158 unmodified lines
159159 #define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1))
160160
161161 static inline struct ts_config *alloc_ts_config(size_t payload,
162− unsigned int __nocast gfp_mask)
162+ gfp_t gfp_mask)
163163 {
164164 struct ts_config *conf;
165165
include/linux/types.h+4−0
@@ -165,6 +165,10 @@ typedef __u64 __bitwise __le64; · 164 unmodified lines
165165 typedef __u64 __bitwise __be64;
166166 #endif
167167
168+#ifdef __KERNEL__
169+typedef unsigned __nocast gfp_t;
170+#endif
171+
168172 struct ustat {
169173 __kernel_daddr_t f_tfree;
170174 __kernel_ino_t f_tinode;
include/linux/vmalloc.h+2−2
@@ -34,8 +34,8 @@ struct vm_struct { · 33 unmodified lines
3434 extern void *vmalloc(unsigned long size);
3535 extern void *vmalloc_exec(unsigned long size);
3636 extern void *vmalloc_32(unsigned long size);
37−extern void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask, pgprot_t prot);
38−extern void *__vmalloc_area(struct vm_struct *area, unsigned int __nocast gfp_mask, pgprot_t prot);
37+extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot);
38+extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot);
3939 extern void vfree(void *addr);
4040
4141 extern void *vmap(struct page **pages, unsigned int count,
include/net/bluetooth/bluetooth.h+1−1
@@ -136,7 +136,7 @@ struct bt_skb_cb { · 135 unmodified lines
136136 };
137137 #define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb))
138138
139−static inline struct sk_buff *bt_skb_alloc(unsigned int len, unsigned int __nocast how)
139+static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
140140 {
141141 struct sk_buff *skb;
142142
include/net/bluetooth/rfcomm.h+1−1
@@ -230,7 +230,7 @@ int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci, · 229 unmodified lines
230230 u8 xon_char, u8 xoff_char, u16 param_mask);
231231
232232 /* ---- RFCOMM DLCs (channels) ---- */
233−struct rfcomm_dlc *rfcomm_dlc_alloc(unsigned int __nocast prio);
233+struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio);
234234 void rfcomm_dlc_free(struct rfcomm_dlc *d);
235235 int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel);
236236 int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason);
include/net/dn_nsp.h+4−4
@@ -19,9 +19,9 @@ extern void dn_nsp_send_data_ack(struct sock *sk); · 18 unmodified lines
1919 extern void dn_nsp_send_oth_ack(struct sock *sk);
2020 extern void dn_nsp_delayed_ack(struct sock *sk);
2121 extern void dn_send_conn_ack(struct sock *sk);
22−extern void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp);
22+extern void dn_send_conn_conf(struct sock *sk, gfp_t gfp);
2323 extern void dn_nsp_send_disc(struct sock *sk, unsigned char type,
24− unsigned short reason, unsigned int __nocast gfp);
24+ unsigned short reason, gfp_t gfp);
2525 extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type,
2626 unsigned short reason);
2727 extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval);
@@ -29,14 +29,14 @@ extern void dn_nsp_send_conninit(struct sock *sk, unsigned char flags); · 1 unmodified line
2929
3030 extern void dn_nsp_output(struct sock *sk);
3131 extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum);
32−extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, unsigned int __nocast gfp, int oob);
32+extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, gfp_t gfp, int oob);
3333 extern unsigned long dn_nsp_persist(struct sock *sk);
3434 extern int dn_nsp_xmit_timeout(struct sock *sk);
3535
3636 extern int dn_nsp_rx(struct sk_buff *);
3737 extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
3838
39−extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, unsigned int __nocast pri);
39+extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri);
4040 extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err);
4141
4242 #define NSP_REASON_OK 0 /* No error */
include/net/dn_route.h+1−1
@@ -15,7 +15,7 @@ · 14 unmodified lines
1515 GNU General Public License for more details.
1616 *******************************************************************************/
1717
18−extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, unsigned int __nocast pri);
18+extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri);
1919 extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags);
2020 extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb);
2121 extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
include/net/inet_connection_sock.h+1−1
@@ -94,7 +94,7 @@ static inline void *inet_csk_ca(const struct sock *sk) · 93 unmodified lines
9494
9595 extern struct sock *inet_csk_clone(struct sock *sk,
9696 const struct request_sock *req,
97− const unsigned int __nocast priority);
97+ const gfp_t priority);
9898
9999 enum inet_csk_ack_state_t {
100100 ICSK_ACK_SCHED = 1,
include/net/ip_vs.h+1−1
@@ -832,7 +832,7 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc); · 831 unmodified lines
832832
833833 extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb);
834834 extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb);
835−extern int ip_vs_skb_replace(struct sk_buff *skb, unsigned int __nocast pri,
835+extern int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri,
836836 char *o_buf, int o_len, char *n_buf, int n_len);
837837 extern int ip_vs_app_init(void);
838838 extern void ip_vs_app_cleanup(void);
include/net/llc_conn.h+1−1
@@ -93,7 +93,7 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb) · 92 unmodified lines
9393 return skb->cb[sizeof(skb->cb) - 1];
9494 }
9595
96−extern struct sock *llc_sk_alloc(int family, unsigned int __nocast priority,
96+extern struct sock *llc_sk_alloc(int family, gfp_t priority,
9797 struct proto *prot);
9898 extern void llc_sk_free(struct sock *sk);
9999
include/net/sctp/sctp.h+1−1
@@ -125,7 +125,7 @@ · 124 unmodified lines
125125 */
126126 extern struct sock *sctp_get_ctl_sock(void);
127127 extern int sctp_copy_local_addr_list(struct sctp_bind_addr *,
128− sctp_scope_t, unsigned int __nocast gfp,
128+ sctp_scope_t, gfp_t gfp,
129129 int flags);
130130 extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family);
131131 extern int sctp_register_pf(struct sctp_pf *, sa_family_t);
include/net/sctp/sm.h+5−5
@@ -181,17 +181,17 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t, · 180 unmodified lines
181181 int sctp_chunk_iif(const struct sctp_chunk *);
182182 struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *,
183183 struct sctp_chunk *,
184− unsigned int __nocast gfp);
184+ gfp_t gfp);
185185 __u32 sctp_generate_verification_tag(void);
186186 void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag);
187187
188188 /* Prototypes for chunk-building functions. */
189189 struct sctp_chunk *sctp_make_init(const struct sctp_association *,
190190 const struct sctp_bind_addr *,
191− unsigned int __nocast gfp, int vparam_len);
191+ gfp_t gfp, int vparam_len);
192192 struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *,
193193 const struct sctp_chunk *,
194− const unsigned int __nocast gfp,
194+ const gfp_t gfp,
195195 const int unkparam_len);
196196 struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *,
197197 const struct sctp_chunk *);
@@ -265,7 +265,7 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype, · 67 unmodified lines
265265 struct sctp_endpoint *,
266266 struct sctp_association *asoc,
267267 void *event_arg,
268− unsigned int __nocast gfp);
268+ gfp_t gfp);
269269
270270 /* 2nd level prototypes */
271271 void sctp_generate_t3_rtx_event(unsigned long peer);
@@ -276,7 +276,7 @@ void sctp_ootb_pkt_free(struct sctp_packet *); · 4 unmodified lines
276276 struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *,
277277 const struct sctp_association *,
278278 struct sctp_chunk *,
279− unsigned int __nocast gfp, int *err,
279+ gfp_t gfp, int *err,
280280 struct sctp_chunk **err_chk_p);
281281 int sctp_addip_addr_config(struct sctp_association *, sctp_param_t,
282282 struct sockaddr_storage*, int);
include/net/sctp/structs.h+12−12
@@ -446,7 +446,7 @@ struct sctp_ssnmap { · 445 unmodified lines
446446 };
447447
448448 struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
449− unsigned int __nocast gfp);
449+ gfp_t gfp);
450450 void sctp_ssnmap_free(struct sctp_ssnmap *map);
451451 void sctp_ssnmap_clear(struct sctp_ssnmap *map);
452452
@@ -947,7 +947,7 @@ struct sctp_transport { · 494 unmodified lines
947947 };
948948
949949 struct sctp_transport *sctp_transport_new(const union sctp_addr *,
950− unsigned int __nocast);
950+ gfp_t);
951951 void sctp_transport_set_owner(struct sctp_transport *,
952952 struct sctp_association *);
953953 void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
@@ -1095,10 +1095,10 @@ void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port); · 141 unmodified lines
10951095 void sctp_bind_addr_free(struct sctp_bind_addr *);
10961096 int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
10971097 const struct sctp_bind_addr *src,
1098− sctp_scope_t scope, unsigned int __nocast gfp,
1098+ sctp_scope_t scope, gfp_t gfp,
10991099 int flags);
11001100 int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
1101− unsigned int __nocast gfp);
1101+ gfp_t gfp);
11021102 int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
11031103 int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
11041104 struct sctp_sock *);
@@ -1108,9 +1108,9 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, · 3 unmodified lines
11081108 struct sctp_sock *opt);
11091109 union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp,
11101110 int *addrs_len,
1111− unsigned int __nocast gfp);
1111+ gfp_t gfp);
11121112 int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len,
1113− __u16 port, unsigned int __nocast gfp);
1113+ __u16 port, gfp_t gfp);
11141114
11151115 sctp_scope_t sctp_scope(const union sctp_addr *);
11161116 int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope);
@@ -1239,7 +1239,7 @@ static inline struct sctp_endpoint *sctp_ep(struct sctp_ep_common *base) · 122 unmodified lines
12391239 }
12401240
12411241 /* These are function signatures for manipulating endpoints. */
1242−struct sctp_endpoint *sctp_endpoint_new(struct sock *, unsigned int __nocast);
1242+struct sctp_endpoint *sctp_endpoint_new(struct sock *, gfp_t);
12431243 void sctp_endpoint_free(struct sctp_endpoint *);
12441244 void sctp_endpoint_put(struct sctp_endpoint *);
12451245 void sctp_endpoint_hold(struct sctp_endpoint *);
@@ -1260,7 +1260,7 @@ int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t, · 14 unmodified lines
12601260 struct sctp_chunk **err_chunk);
12611261 int sctp_process_init(struct sctp_association *, sctp_cid_t cid,
12621262 const union sctp_addr *peer,
1263− sctp_init_chunk_t *init, unsigned int __nocast gfp);
1263+ sctp_init_chunk_t *init, gfp_t gfp);
12641264 __u32 sctp_generate_tag(const struct sctp_endpoint *);
12651265 __u32 sctp_generate_tsn(const struct sctp_endpoint *);
12661266
@@ -1723,7 +1723,7 @@ static inline struct sctp_association *sctp_assoc(struct sctp_ep_common *base) · 456 unmodified lines
17231723
17241724 struct sctp_association *
17251725 sctp_association_new(const struct sctp_endpoint *, const struct sock *,
1726− sctp_scope_t scope, unsigned int __nocast gfp);
1726+ sctp_scope_t scope, gfp_t gfp);
17271727 void sctp_association_free(struct sctp_association *);
17281728 void sctp_association_put(struct sctp_association *);
17291729 void sctp_association_hold(struct sctp_association *);
@@ -1739,7 +1739,7 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc, · 9 unmodified lines
17391739 const union sctp_addr *laddr);
17401740 struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *,
17411741 const union sctp_addr *address,
1742− const unsigned int __nocast gfp,
1742+ const gfp_t gfp,
17431743 const int peer_state);
17441744 void sctp_assoc_del_peer(struct sctp_association *asoc,
17451745 const union sctp_addr *addr);
@@ -1764,10 +1764,10 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *, unsigned); · 18 unmodified lines
17641764 void sctp_assoc_set_primary(struct sctp_association *,
17651765 struct sctp_transport *);
17661766 int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *,
1767− unsigned int __nocast);
1767+ gfp_t);
17681768 int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
17691769 struct sctp_cookie*,
1770− unsigned int __nocast gfp);
1770+ gfp_t gfp);
17711771
17721772 int sctp_cmp_addr_exact(const union sctp_addr *ss1,
17731773 const union sctp_addr *ss2);
include/net/sctp/ulpevent.h+8−8
@@ -88,7 +88,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( · 87 unmodified lines
8888 __u16 error,
8989 __u16 outbound,
9090 __u16 inbound,
91− unsigned int __nocast gfp);
91+ gfp_t gfp);
9292
9393 struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change(
9494 const struct sctp_association *asoc,
@@ -96,35 +96,35 @@ struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( · 1 unmodified line
9696 int flags,
9797 int state,
9898 int error,
99− unsigned int __nocast gfp);
99+ gfp_t gfp);
100100
101101 struct sctp_ulpevent *sctp_ulpevent_make_remote_error(
102102 const struct sctp_association *asoc,
103103 struct sctp_chunk *chunk,
104104 __u16 flags,
105− unsigned int __nocast gfp);
105+ gfp_t gfp);
106106 struct sctp_ulpevent *sctp_ulpevent_make_send_failed(
107107 const struct sctp_association *asoc,
108108 struct sctp_chunk *chunk,
109109 __u16 flags,
110110 __u32 error,
111− unsigned int __nocast gfp);
111+ gfp_t gfp);
112112
113113 struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event(
114114 const struct sctp_association *asoc,
115115 __u16 flags,
116− unsigned int __nocast gfp);
116+ gfp_t gfp);
117117
118118 struct sctp_ulpevent *sctp_ulpevent_make_pdapi(
119119 const struct sctp_association *asoc,
120− __u32 indication, unsigned int __nocast gfp);
120+ __u32 indication, gfp_t gfp);
121121
122122 struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication(
123− const struct sctp_association *asoc, unsigned int __nocast gfp);
123+ const struct sctp_association *asoc, gfp_t gfp);
124124
125125 struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
126126 struct sctp_chunk *chunk,
127− unsigned int __nocast gfp);
127+ gfp_t gfp);
128128
129129 void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event,
130130 struct msghdr *);
include/net/sctp/ulpqueue.h+4−7
@@ -62,22 +62,19 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *, · 61 unmodified lines
6262 void sctp_ulpq_free(struct sctp_ulpq *);
6363
6464 /* Add a new DATA chunk for processing. */
65−int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *,
66− unsigned int __nocast);
65+int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
6766
6867 /* Add a new event for propagation to the ULP. */
6968 int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev);
7069
7170 /* Renege previously received chunks. */
72−void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *,
73− unsigned int __nocast);
71+void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
7472
7573 /* Perform partial delivery. */
76−void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *,
77− unsigned int __nocast);
74+void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
7875
7976 /* Abort the partial delivery. */
80−void sctp_ulpq_abort_pd(struct sctp_ulpq *, unsigned int __nocast);
77+void sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t);
8178
8279 /* Clear the partial data delivery condition on this socket. */
8380 int sctp_clear_pd(struct sock *sk);
include/net/sock.h+8−8
@@ -739,18 +739,18 @@ extern void FASTCALL(release_sock(struct sock *sk)); · 738 unmodified lines
739739 #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock))
740740
741741 extern struct sock *sk_alloc(int family,
742− unsigned int __nocast priority,
742+ gfp_t priority,
743743 struct proto *prot, int zero_it);
744744 extern void sk_free(struct sock *sk);
745745 extern struct sock *sk_clone(const struct sock *sk,
746− const unsigned int __nocast priority);
746+ const gfp_t priority);
747747
748748 extern struct sk_buff *sock_wmalloc(struct sock *sk,
749749 unsigned long size, int force,
750− unsigned int __nocast priority);
750+ gfp_t priority);
751751 extern struct sk_buff *sock_rmalloc(struct sock *sk,
752752 unsigned long size, int force,
753− unsigned int __nocast priority);
753+ gfp_t priority);
754754 extern void sock_wfree(struct sk_buff *skb);
755755 extern void sock_rfree(struct sk_buff *skb);
756756
@@ -766,7 +766,7 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk, · 9 unmodified lines
766766 int noblock,
767767 int *errcode);
768768 extern void *sock_kmalloc(struct sock *sk, int size,
769− unsigned int __nocast priority);
769+ gfp_t priority);
770770 extern void sock_kfree_s(struct sock *sk, void *mem, int size);
771771 extern void sk_send_sigurg(struct sock *sk);
772772
@@ -1201,7 +1201,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) · 428 unmodified lines
12011201
12021202 static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
12031203 int size, int mem,
1204− unsigned int __nocast gfp)
1204+ gfp_t gfp)
12051205 {
12061206 struct sk_buff *skb;
12071207 int hdr_len;
@@ -1224,7 +1224,7 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, · 16 unmodified lines
12241224
12251225 static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk,
12261226 int size,
1227− unsigned int __nocast gfp)
1227+ gfp_t gfp)
12281228 {
12291229 return sk_stream_alloc_pskb(sk, size, 0, gfp);
12301230 }
@@ -1255,7 +1255,7 @@ static inline int sock_writeable(const struct sock *sk) · 24 unmodified lines
12551255 return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2);
12561256 }
12571257
1258−static inline unsigned int __nocast gfp_any(void)
1258+static inline gfp_t gfp_any(void)
12591259 {
12601260 return in_softirq() ? GFP_ATOMIC : GFP_KERNEL;
12611261 }
include/net/tcp.h+1−2
@@ -460,8 +460,7 @@ extern void tcp_send_probe0(struct sock *); · 459 unmodified lines
460460 extern void tcp_send_partial(struct sock *);
461461 extern int tcp_write_wakeup(struct sock *);
462462 extern void tcp_send_fin(struct sock *sk);
463−extern void tcp_send_active_reset(struct sock *sk,
464− unsigned int __nocast priority);
463+extern void tcp_send_active_reset(struct sock *sk, gfp_t priority);
465464 extern int tcp_send_synack(struct sock *);
466465 extern void tcp_push_one(struct sock *, unsigned int mss_now);
467466 extern void tcp_send_ack(struct sock *sk);
include/net/xfrm.h+1−1
@@ -875,7 +875,7 @@ static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsig · 874 unmodified lines
875875 }
876876 #endif
877877
878−struct xfrm_policy *xfrm_policy_alloc(unsigned int __nocast gfp);
878+struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp);
879879 extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *);
880880 int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl);
881881 struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel,
include/rdma/ib_mad.h+1−1
@@ -596,7 +596,7 @@ struct ib_mad_send_buf * ib_create_send_mad(struct ib_mad_agent *mad_agent, · 595 unmodified lines
596596 u32 remote_qpn, u16 pkey_index,
597597 struct ib_ah *ah, int rmpp_active,
598598 int hdr_len, int data_len,
599− unsigned int __nocast gfp_mask);
599+ gfp_t gfp_mask);
600600
601601 /**
602602 * ib_free_send_mad - Returns data buffers used to send a MAD.
include/rdma/ib_sa.h+5−5
@@ -285,7 +285,7 @@ void ib_sa_cancel_query(int id, struct ib_sa_query *query); · 284 unmodified lines
285285 int ib_sa_path_rec_get(struct ib_device *device, u8 port_num,
286286 struct ib_sa_path_rec *rec,
287287 ib_sa_comp_mask comp_mask,
288− int timeout_ms, unsigned int __nocast gfp_mask,
288+ int timeout_ms, gfp_t gfp_mask,
289289 void (*callback)(int status,
290290 struct ib_sa_path_rec *resp,
291291 void *context),
@@ -296,7 +296,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num, · 4 unmodified lines
296296 u8 method,
297297 struct ib_sa_mcmember_rec *rec,
298298 ib_sa_comp_mask comp_mask,
299− int timeout_ms, unsigned int __nocast gfp_mask,
299+ int timeout_ms, gfp_t gfp_mask,
300300 void (*callback)(int status,
301301 struct ib_sa_mcmember_rec *resp,
302302 void *context),
@@ -307,7 +307,7 @@ int ib_sa_service_rec_query(struct ib_device *device, u8 port_num, · 4 unmodified lines
307307 u8 method,
308308 struct ib_sa_service_rec *rec,
309309 ib_sa_comp_mask comp_mask,
310− int timeout_ms, unsigned int __nocast gfp_mask,
310+ int timeout_ms, gfp_t gfp_mask,
311311 void (*callback)(int status,
312312 struct ib_sa_service_rec *resp,
313313 void *context),
@@ -342,7 +342,7 @@ static inline int · 28 unmodified lines
342342 ib_sa_mcmember_rec_set(struct ib_device *device, u8 port_num,
343343 struct ib_sa_mcmember_rec *rec,
344344 ib_sa_comp_mask comp_mask,
345− int timeout_ms, unsigned int __nocast gfp_mask,
345+ int timeout_ms, gfp_t gfp_mask,
346346 void (*callback)(int status,
347347 struct ib_sa_mcmember_rec *resp,
348348 void *context),
@@ -384,7 +384,7 @@ static inline int · 35 unmodified lines
384384 ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num,
385385 struct ib_sa_mcmember_rec *rec,
386386 ib_sa_comp_mask comp_mask,
387− int timeout_ms, unsigned int __nocast gfp_mask,
387+ int timeout_ms, gfp_t gfp_mask,
388388 void (*callback)(int status,
389389 struct ib_sa_mcmember_rec *resp,
390390 void *context),
include/rxrpc/call.h+1−1
@@ -203,7 +203,7 @@ extern int rxrpc_call_write_data(struct rxrpc_call *call, · 202 unmodified lines
203203 size_t sioc,
204204 struct kvec *siov,
205205 uint8_t rxhdr_flags,
206− unsigned int __nocast alloc_flags,
206+ gfp_t alloc_flags,
207207 int dup_data,
208208 size_t *size_sent);
209209
include/rxrpc/message.h+1−1
@@ -63,7 +63,7 @@ extern int rxrpc_conn_newmsg(struct rxrpc_connection *conn, · 62 unmodified lines
6363 uint8_t type,
6464 int count,
6565 struct kvec *diov,
66− unsigned int __nocast alloc_flags,
66+ gfp_t alloc_flags,
6767 struct rxrpc_message **_msg);
6868
6969 extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg);
include/sound/core.h+4−4
@@ -290,13 +290,13 @@ void snd_memory_init(void); · 289 unmodified lines
290290 void snd_memory_done(void);
291291 int snd_memory_info_init(void);
292292 int snd_memory_info_done(void);
293−void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags);
294−void *snd_hidden_kzalloc(size_t size, unsigned int __nocast flags);
295−void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags);
293+void *snd_hidden_kmalloc(size_t size, gfp_t flags);
294+void *snd_hidden_kzalloc(size_t size, gfp_t flags);
295+void *snd_hidden_kcalloc(size_t n, size_t size, gfp_t flags);
296296 void snd_hidden_kfree(const void *obj);
297297 void *snd_hidden_vmalloc(unsigned long size);
298298 void snd_hidden_vfree(void *obj);
299−char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags);
299+char *snd_hidden_kstrdup(const char *s, gfp_t flags);
300300 #define kmalloc(size, flags) snd_hidden_kmalloc(size, flags)
301301 #define kzalloc(size, flags) snd_hidden_kzalloc(size, flags)
302302 #define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags)
include/sound/driver.h+1−1
@@ -51,7 +51,7 @@ · 50 unmodified lines
5151 #ifdef CONFIG_SND_DEBUG_MEMORY
5252 #include <linux/slab.h>
5353 #include <linux/vmalloc.h>
54−void *snd_wrapper_kmalloc(size_t, unsigned int __nocast);
54+void *snd_wrapper_kmalloc(size_t, gfp_t);
5555 #undef kmalloc
5656 void snd_wrapper_kfree(const void *);
5757 #undef kfree
kernel/audit.c+1−1
@@ -560,7 +560,7 @@ static void audit_buffer_free(struct audit_buffer *ab) · 559 unmodified lines
560560 }
561561
562562 static struct audit_buffer * audit_buffer_alloc(struct audit_context *ctx,
563− unsigned int __nocast gfp_mask, int type)
563+ gfp_t gfp_mask, int type)
564564 {
565565 unsigned long flags;
566566 struct audit_buffer *ab = NULL;
kernel/cpuset.c+1−1
@@ -1670,7 +1670,7 @@ static const struct cpuset *nearest_exclusive_ancestor(const struct cpuset *cs) · 1669 unmodified lines
16701670 * GFP_USER - only nodes in current tasks mems allowed ok.
16711671 **/
16721672
1673−int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask)
1673+int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
16741674 {
16751675 int node; /* node that zone z is on */
16761676 const struct cpuset *cs; /* current cpuset ancestors */
kernel/kfifo.c+2−2
@@ -36,7 +36,7 @@ · 35 unmodified lines
3636 * struct kfifo with kfree().
3737 */
3838 struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size,
39− unsigned int __nocast gfp_mask, spinlock_t *lock)
39+ gfp_t gfp_mask, spinlock_t *lock)
4040 {
4141 struct kfifo *fifo;
4242
@@ -64,7 +64,7 @@ EXPORT_SYMBOL(kfifo_init); · 21 unmodified lines
6464 *
6565 * The size will be rounded-up to a power of 2.
6666 */
67−struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask, spinlock_t *lock)
67+struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock)
6868 {
6969 unsigned char *buffer;
7070 struct kfifo *ret;
kernel/signal.c+1−1
@@ -262,7 +262,7 @@ next_signal(struct sigpending *pending, sigset_t *mask) · 261 unmodified lines
262262 return sig;
263263 }
264264
265−static struct sigqueue *__sigqueue_alloc(struct task_struct *t, unsigned int __nocast flags,
265+static struct sigqueue *__sigqueue_alloc(struct task_struct *t, gfp_t flags,
266266 int override_rlimit)
267267 {
268268 struct sigqueue *q = NULL;
lib/radix-tree.c+1−1
@@ -110,7 +110,7 @@ radix_tree_node_free(struct radix_tree_node *node) · 109 unmodified lines
110110 * success, return zero, with preemption disabled. On error, return -ENOMEM
111111 * with preemption not disabled.
112112 */
113−int radix_tree_preload(unsigned int __nocast gfp_mask)
113+int radix_tree_preload(gfp_t gfp_mask)
114114 {
115115 struct radix_tree_preload *rtp;
116116 struct radix_tree_node *node;
lib/ts_bm.c+1−1
@@ -127,7 +127,7 @@ static void compute_prefix_tbl(struct ts_bm *bm, const u8 *pattern, · 126 unmodified lines
127127 }
128128
129129 static struct ts_config *bm_init(const void *pattern, unsigned int len,
130− unsigned int __nocast gfp_mask)
130+ gfp_t gfp_mask)
131131 {
132132 struct ts_config *conf;
133133 struct ts_bm *bm;
lib/ts_fsm.c+1−1
@@ -258,7 +258,7 @@ found_match: · 257 unmodified lines
258258 }
259259
260260 static struct ts_config *fsm_init(const void *pattern, unsigned int len,
261− unsigned int __nocast gfp_mask)
261+ gfp_t gfp_mask)
262262 {
263263 int i, err = -EINVAL;
264264 struct ts_config *conf;
lib/ts_kmp.c+1−1
@@ -87,7 +87,7 @@ static inline void compute_prefix_tbl(const u8 *pattern, unsigned int len, · 86 unmodified lines
8787 }
8888
8989 static struct ts_config *kmp_init(const void *pattern, unsigned int len,
90− unsigned int __nocast gfp_mask)
90+ gfp_t gfp_mask)
9191 {
9292 struct ts_config *conf;
9393 struct ts_kmp *kmp;
mm/highmem.c+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030
3131 static mempool_t *page_pool, *isa_page_pool;
3232
33−static void *page_pool_alloc(unsigned int __nocast gfp_mask, void *data)
33+static void *page_pool_alloc(gfp_t gfp_mask, void *data)
3434 {
3535 unsigned int gfp = gfp_mask | (unsigned int) (long) data;
3636
mm/mempolicy.c+4−4
@@ -687,7 +687,7 @@ get_vma_policy(struct task_struct *task, struct vm_area_struct *vma, unsigned lo · 686 unmodified lines
687687 }
688688
689689 /* Return a zonelist representing a mempolicy */
690−static struct zonelist *zonelist_policy(unsigned int __nocast gfp, struct mempolicy *policy)
690+static struct zonelist *zonelist_policy(gfp_t gfp, struct mempolicy *policy)
691691 {
692692 int nd;
693693
@@ -751,7 +751,7 @@ static unsigned offset_il_node(struct mempolicy *pol, · 57 unmodified lines
751751
752752 /* Allocate a page in interleaved policy.
753753 Own path because it needs to do special accounting. */
754−static struct page *alloc_page_interleave(unsigned int __nocast gfp, unsigned order, unsigned nid)
754+static struct page *alloc_page_interleave(gfp_t gfp, unsigned order, unsigned nid)
755755 {
756756 struct zonelist *zl;
757757 struct page *page;
@@ -789,7 +789,7 @@ static struct page *alloc_page_interleave(unsigned int __nocast gfp, unsigned or · 31 unmodified lines
789789 * Should be called with the mm_sem of the vma hold.
790790 */
791791 struct page *
792−alloc_page_vma(unsigned int __nocast gfp, struct vm_area_struct *vma, unsigned long addr)
792+alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr)
793793 {
794794 struct mempolicy *pol = get_vma_policy(current, vma, addr);
795795
@@ -832,7 +832,7 @@ alloc_page_vma(unsigned int __nocast gfp, struct vm_area_struct *vma, unsigned l · 36 unmodified lines
832832 * 1) it's ok to take cpuset_sem (can WAIT), and
833833 * 2) allocating for current task (not interrupt).
834834 */
835−struct page *alloc_pages_current(unsigned int __nocast gfp, unsigned order)
835+struct page *alloc_pages_current(gfp_t gfp, unsigned order)
836836 {
837837 struct mempolicy *pol = current->mempolicy;
838838
mm/mempool.c+3−3
@@ -112,7 +112,7 @@ EXPORT_SYMBOL(mempool_create_node); · 111 unmodified lines
112112 * while this function is running. mempool_alloc() & mempool_free()
113113 * might be called (eg. from IRQ contexts) while this function executes.
114114 */
115−int mempool_resize(mempool_t *pool, int new_min_nr, unsigned int __nocast gfp_mask)
115+int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask)
116116 {
117117 void *element;
118118 void **new_elements;
@@ -200,7 +200,7 @@ EXPORT_SYMBOL(mempool_destroy); · 81 unmodified lines
200200 * *never* fails when called from process contexts. (it might
201201 * fail if called from an IRQ context.)
202202 */
203−void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask)
203+void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask)
204204 {
205205 void *element;
206206 unsigned long flags;
@@ -276,7 +276,7 @@ EXPORT_SYMBOL(mempool_free); · 69 unmodified lines
276276 /*
277277 * A commonly used alloc and free fn.
278278 */
279−void *mempool_alloc_slab(unsigned int __nocast gfp_mask, void *pool_data)
279+void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data)
280280 {
281281 kmem_cache_t *mem = (kmem_cache_t *) pool_data;
282282 return kmem_cache_alloc(mem, gfp_mask);
mm/nommu.c+1−2
@@ -157,8 +157,7 @@ void vfree(void *addr) · 156 unmodified lines
157157 kfree(addr);
158158 }
159159
160−void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask,
161− pgprot_t prot)
160+void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
162161 {
163162 /*
164163 * kmalloc doesn't like __GFP_HIGHMEM for some reason
mm/oom_kill.c+1−1
@@ -263,7 +263,7 @@ static struct mm_struct *oom_kill_process(struct task_struct *p) · 262 unmodified lines
263263 * OR try to be smart about which process to kill. Note that we
264264 * don't have to be perfect here, we just have to be good.
265265 */
266−void out_of_memory(unsigned int __nocast gfp_mask, int order)
266+void out_of_memory(gfp_t gfp_mask, int order)
267267 {
268268 struct mm_struct *mm = NULL;
269269 task_t * p;
mm/page_alloc.c+6−6
@@ -671,7 +671,7 @@ void fastcall free_cold_page(struct page *page) · 670 unmodified lines
671671 free_hot_cold_page(page, 1);
672672 }
673673
674−static inline void prep_zero_page(struct page *page, int order, unsigned int __nocast gfp_flags)
674+static inline void prep_zero_page(struct page *page, int order, gfp_t gfp_flags)
675675 {
676676 int i;
677677
@@ -686,7 +686,7 @@ static inline void prep_zero_page(struct page *page, int order, unsigned int __n · 8 unmodified lines
686686 * or two.
687687 */
688688 static struct page *
689−buffered_rmqueue(struct zone *zone, int order, unsigned int __nocast gfp_flags)
689+buffered_rmqueue(struct zone *zone, int order, gfp_t gfp_flags)
690690 {
691691 unsigned long flags;
692692 struct page *page = NULL;
@@ -761,7 +761,7 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark, · 68 unmodified lines
761761 }
762762
763763 static inline int
764−should_reclaim_zone(struct zone *z, unsigned int gfp_mask)
764+should_reclaim_zone(struct zone *z, gfp_t gfp_mask)
765765 {
766766 if (!z->reclaim_pages)
767767 return 0;
@@ -774,7 +774,7 @@ should_reclaim_zone(struct zone *z, unsigned int gfp_mask) · 6 unmodified lines
774774 * This is the 'heart' of the zoned buddy allocator.
775775 */
776776 struct page * fastcall
777−__alloc_pages(unsigned int __nocast gfp_mask, unsigned int order,
777+__alloc_pages(gfp_t gfp_mask, unsigned int order,
778778 struct zonelist *zonelist)
779779 {
780780 const int wait = gfp_mask & __GFP_WAIT;
@@ -977,7 +977,7 @@ EXPORT_SYMBOL(__alloc_pages); · 196 unmodified lines
977977 /*
978978 * Common helper functions.
979979 */
980−fastcall unsigned long __get_free_pages(unsigned int __nocast gfp_mask, unsigned int order)
980+fastcall unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order)
981981 {
982982 struct page * page;
983983 page = alloc_pages(gfp_mask, order);
@@ -988,7 +988,7 @@ fastcall unsigned long __get_free_pages(unsigned int __nocast gfp_mask, unsigned · 4 unmodified lines
988988
989989 EXPORT_SYMBOL(__get_free_pages);
990990
991−fastcall unsigned long get_zeroed_page(unsigned int __nocast gfp_mask)
991+fastcall unsigned long get_zeroed_page(gfp_t gfp_mask)
992992 {
993993 struct page * page;
994994
mm/page_io.c+1−1
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919 #include <linux/writeback.h>
2020 #include <asm/pgtable.h>
2121
22−static struct bio *get_swap_bio(unsigned int __nocast gfp_flags, pgoff_t index,
22+static struct bio *get_swap_bio(gfp_t gfp_flags, pgoff_t index,
2323 struct page *page, bio_end_io_t end_io)
2424 {
2525 struct bio *bio;
mm/shmem.c+1−2
@@ -921,8 +921,7 @@ shmem_swapin(struct shmem_inode_info *info,swp_entry_t entry,unsigned long idx) · 920 unmodified lines
921921 }
922922
923923 static inline struct page *
924−shmem_alloc_page(unsigned int __nocast gfp,struct shmem_inode_info *info,
925− unsigned long idx)
924+shmem_alloc_page(gfp_t gfp,struct shmem_inode_info *info, unsigned long idx)
926925 {
927926 return alloc_page(gfp | __GFP_ZERO);
928927 }
mm/slab.c+16−18
@@ -650,8 +650,7 @@ static inline struct array_cache *ac_data(kmem_cache_t *cachep) · 649 unmodified lines
650650 return cachep->array[smp_processor_id()];
651651 }
652652
653−static inline kmem_cache_t *__find_general_cachep(size_t size,
654− unsigned int __nocast gfpflags)
653+static inline kmem_cache_t *__find_general_cachep(size_t size, gfp_t gfpflags)
655654 {
656655 struct cache_sizes *csizep = malloc_sizes;
657656
@@ -675,8 +674,7 @@ static inline kmem_cache_t *__find_general_cachep(size_t size, · 17 unmodified lines
675674 return csizep->cs_cachep;
676675 }
677676
678−kmem_cache_t *kmem_find_general_cachep(size_t size,
679− unsigned int __nocast gfpflags)
677+kmem_cache_t *kmem_find_general_cachep(size_t size, gfp_t gfpflags)
680678 {
681679 return __find_general_cachep(size, gfpflags);
682680 }
@@ -1185,7 +1183,7 @@ __initcall(cpucache_init); · 502 unmodified lines
11851183 * did not request dmaable memory, we might get it, but that
11861184 * would be relatively rare and ignorable.
11871185 */
1188−static void *kmem_getpages(kmem_cache_t *cachep, unsigned int __nocast flags, int nodeid)
1186+static void *kmem_getpages(kmem_cache_t *cachep, gfp_t flags, int nodeid)
11891187 {
11901188 struct page *page;
11911189 void *addr;
@@ -2048,7 +2046,7 @@ EXPORT_SYMBOL(kmem_cache_destroy); · 856 unmodified lines
20482046
20492047 /* Get the memory for a slab management obj. */
20502048 static struct slab* alloc_slabmgmt(kmem_cache_t *cachep, void *objp,
2051− int colour_off, unsigned int __nocast local_flags)
2049+ int colour_off, gfp_t local_flags)
20522050 {
20532051 struct slab *slabp;
20542052
@@ -2149,7 +2147,7 @@ static void set_slab_attr(kmem_cache_t *cachep, struct slab *slabp, void *objp) · 94 unmodified lines
21492147 * Grow (by 1) the number of slabs within a cache. This is called by
21502148 * kmem_cache_alloc() when there are no active objs left in a cache.
21512149 */
2152−static int cache_grow(kmem_cache_t *cachep, unsigned int __nocast flags, int nodeid)
2150+static int cache_grow(kmem_cache_t *cachep, gfp_t flags, int nodeid)
21532151 {
21542152 struct slab *slabp;
21552153 void *objp;
@@ -2356,7 +2354,7 @@ bad: · 200 unmodified lines
23562354 #define check_slabp(x,y) do { } while(0)
23572355 #endif
23582356
2359−static void *cache_alloc_refill(kmem_cache_t *cachep, unsigned int __nocast flags)
2357+static void *cache_alloc_refill(kmem_cache_t *cachep, gfp_t flags)
23602358 {
23612359 int batchcount;
23622360 struct kmem_list3 *l3;
@@ -2456,7 +2454,7 @@ alloc_done: · 93 unmodified lines
24562454 }
24572455
24582456 static inline void
2459−cache_alloc_debugcheck_before(kmem_cache_t *cachep, unsigned int __nocast flags)
2457+cache_alloc_debugcheck_before(kmem_cache_t *cachep, gfp_t flags)
24602458 {
24612459 might_sleep_if(flags & __GFP_WAIT);
24622460 #if DEBUG
@@ -2467,7 +2465,7 @@ cache_alloc_debugcheck_before(kmem_cache_t *cachep, unsigned int __nocast flags) · 4 unmodified lines
24672465 #if DEBUG
24682466 static void *
24692467 cache_alloc_debugcheck_after(kmem_cache_t *cachep,
2470− unsigned int __nocast flags, void *objp, void *caller)
2468+ gfp_t flags, void *objp, void *caller)
24712469 {
24722470 if (!objp)
24732471 return objp;
@@ -2510,7 +2508,7 @@ cache_alloc_debugcheck_after(kmem_cache_t *cachep, · 36 unmodified lines
25102508 #define cache_alloc_debugcheck_after(a,b,objp,d) (objp)
25112509 #endif
25122510
2513−static inline void *____cache_alloc(kmem_cache_t *cachep, unsigned int __nocast flags)
2511+static inline void *____cache_alloc(kmem_cache_t *cachep, gfp_t flags)
25142512 {
25152513 void* objp;
25162514 struct array_cache *ac;
@@ -2528,7 +2526,7 @@ static inline void *____cache_alloc(kmem_cache_t *cachep, unsigned int __nocast · 11 unmodified lines
25282526 return objp;
25292527 }
25302528
2531−static inline void *__cache_alloc(kmem_cache_t *cachep, unsigned int __nocast flags)
2529+static inline void *__cache_alloc(kmem_cache_t *cachep, gfp_t flags)
25322530 {
25332531 unsigned long save_flags;
25342532 void* objp;
@@ -2787,7 +2785,7 @@ static inline void __cache_free(kmem_cache_t *cachep, void *objp) · 252 unmodified lines
27872785 * Allocate an object from this cache. The flags are only relevant
27882786 * if the cache has no available objects.
27892787 */
2790−void *kmem_cache_alloc(kmem_cache_t *cachep, unsigned int __nocast flags)
2788+void *kmem_cache_alloc(kmem_cache_t *cachep, gfp_t flags)
27912789 {
27922790 return __cache_alloc(cachep, flags);
27932791 }
@@ -2848,7 +2846,7 @@ out: · 54 unmodified lines
28482846 * New and improved: it will now make sure that the object gets
28492847 * put on the correct node list so that there is no false sharing.
28502848 */
2851−void *kmem_cache_alloc_node(kmem_cache_t *cachep, unsigned int __nocast flags, int nodeid)
2849+void *kmem_cache_alloc_node(kmem_cache_t *cachep, gfp_t flags, int nodeid)
28522850 {
28532851 unsigned long save_flags;
28542852 void *ptr;
@@ -2875,7 +2873,7 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, unsigned int __nocast flags, i · 20 unmodified lines
28752873 }
28762874 EXPORT_SYMBOL(kmem_cache_alloc_node);
28772875
2878−void *kmalloc_node(size_t size, unsigned int __nocast flags, int node)
2876+void *kmalloc_node(size_t size, gfp_t flags, int node)
28792877 {
28802878 kmem_cache_t *cachep;
28812879
@@ -2908,7 +2906,7 @@ EXPORT_SYMBOL(kmalloc_node); · 26 unmodified lines
29082906 * platforms. For example, on i386, it means that the memory must come
29092907 * from the first 16MB.
29102908 */
2911−void *__kmalloc(size_t size, unsigned int __nocast flags)
2909+void *__kmalloc(size_t size, gfp_t flags)
29122910 {
29132911 kmem_cache_t *cachep;
29142912
@@ -2997,7 +2995,7 @@ EXPORT_SYMBOL(kmem_cache_free); · 82 unmodified lines
29972995 * @size: how many bytes of memory are required.
29982996 * @flags: the type of memory to allocate.
29992997 */
3000−void *kzalloc(size_t size, unsigned int __nocast flags)
2998+void *kzalloc(size_t size, gfp_t flags)
30012999 {
30023000 void *ret = kmalloc(size, flags);
30033001 if (ret)
@@ -3603,7 +3601,7 @@ unsigned int ksize(const void *objp) · 599 unmodified lines
36033601 * @s: the string to duplicate
36043602 * @gfp: the GFP mask used in the kmalloc() call when allocating memory
36053603 */
3606−char *kstrdup(const char *s, unsigned int __nocast gfp)
3604+char *kstrdup(const char *s, gfp_t gfp)
36073605 {
36083606 size_t len;
36093607 char *buf;
mm/swap_state.c+1−1
@@ -68,7 +68,7 @@ void show_swap_cache_info(void) · 67 unmodified lines
6868 * but sets SwapCache flag and private instead of mapping and index.
6969 */
7070 static int __add_to_swap_cache(struct page *page, swp_entry_t entry,
71− unsigned int __nocast gfp_mask)
71+ gfp_t gfp_mask)
7272 {
7373 int error;
7474
mm/vmalloc.c+2−2
@@ -395,7 +395,7 @@ void *vmap(struct page **pages, unsigned int count, · 394 unmodified lines
395395
396396 EXPORT_SYMBOL(vmap);
397397
398−void *__vmalloc_area(struct vm_struct *area, unsigned int __nocast gfp_mask, pgprot_t prot)
398+void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot)
399399 {
400400 struct page **pages;
401401 unsigned int nr_pages, array_size, i;
@@ -446,7 +446,7 @@ fail: · 44 unmodified lines
446446 * allocator with @gfp_mask flags. Map them into contiguous
447447 * kernel virtual space, using a pagetable protection of @prot.
448448 */
449−void *__vmalloc(unsigned long size, unsigned int __nocast gfp_mask, pgprot_t prot)
449+void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
450450 {
451451 struct vm_struct *area;
452452
net/atm/atm_misc.c+1−1
@@ -25,7 +25,7 @@ int atm_charge(struct atm_vcc *vcc,int truesize) · 24 unmodified lines
2525
2626
2727 struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
28− unsigned int __nocast gfp_flags)
28+ gfp_t gfp_flags)
2929 {
3030 struct sock *sk = sk_atm(vcc);
3131 int guess = atm_guess_pdu2truesize(pdu_size);
net/bluetooth/l2cap.c+1−1
@@ -372,7 +372,7 @@ static struct proto l2cap_proto = { · 371 unmodified lines
372372 .obj_size = sizeof(struct l2cap_pinfo)
373373 };
374374
375−static struct sock *l2cap_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio)
375+static struct sock *l2cap_sock_alloc(struct socket *sock, int proto, gfp_t prio)
376376 {
377377 struct sock *sk;
378378
net/bluetooth/rfcomm/core.c+1−1
@@ -229,7 +229,7 @@ static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d) · 228 unmodified lines
229229 d->rx_credits = RFCOMM_DEFAULT_CREDITS;
230230 }
231231
232−struct rfcomm_dlc *rfcomm_dlc_alloc(unsigned int __nocast prio)
232+struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio)
233233 {
234234 struct rfcomm_dlc *d = kmalloc(sizeof(*d), prio);
235235 if (!d)
net/bluetooth/rfcomm/sock.c+1−1
@@ -284,7 +284,7 @@ static struct proto rfcomm_proto = { · 283 unmodified lines
284284 .obj_size = sizeof(struct rfcomm_pinfo)
285285 };
286286
287−static struct sock *rfcomm_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio)
287+static struct sock *rfcomm_sock_alloc(struct socket *sock, int proto, gfp_t prio)
288288 {
289289 struct rfcomm_dlc *d;
290290 struct sock *sk;
net/bluetooth/rfcomm/tty.c+1−1
@@ -286,7 +286,7 @@ static inline void rfcomm_set_owner_w(struct sk_buff *skb, struct rfcomm_dev *de · 285 unmodified lines
286286 skb->destructor = rfcomm_wfree;
287287 }
288288
289−static struct sk_buff *rfcomm_wmalloc(struct rfcomm_dev *dev, unsigned long size, unsigned int __nocast priority)
289+static struct sk_buff *rfcomm_wmalloc(struct rfcomm_dev *dev, unsigned long size, gfp_t priority)
290290 {
291291 if (atomic_read(&dev->wmem_alloc) < rfcomm_room(dev->dlc)) {
292292 struct sk_buff *skb = alloc_skb(size, priority);
net/bluetooth/sco.c+1−1
@@ -418,7 +418,7 @@ static struct proto sco_proto = { · 417 unmodified lines
418418 .obj_size = sizeof(struct sco_pinfo)
419419 };
420420
421−static struct sock *sco_sock_alloc(struct socket *sock, int proto, unsigned int __nocast prio)
421+static struct sock *sco_sock_alloc(struct socket *sock, int proto, gfp_t prio)
422422 {
423423 struct sock *sk;
424424
net/core/dev.c+1−1
@@ -1132,7 +1132,7 @@ static inline int illegal_highdma(struct net_device *dev, struct sk_buff *skb) · 1131 unmodified lines
11321132 #endif
11331133
11341134 /* Keep head the same: replace data */
1135−int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp_mask)
1135+int __skb_linearize(struct sk_buff *skb, gfp_t gfp_mask)
11361136 {
11371137 unsigned int size;
11381138 u8 *data;
net/core/skbuff.c+7−7
@@ -130,7 +130,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here) · 129 unmodified lines
130130 * Buffers may only be allocated from interrupts using a @gfp_mask of
131131 * %GFP_ATOMIC.
132132 */
133−struct sk_buff *__alloc_skb(unsigned int size, unsigned int __nocast gfp_mask,
133+struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
134134 int fclone)
135135 {
136136 struct sk_buff *skb;
@@ -198,7 +198,7 @@ nodata: · 61 unmodified lines
198198 */
199199 struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
200200 unsigned int size,
201− unsigned int __nocast gfp_mask)
201+ gfp_t gfp_mask)
202202 {
203203 struct sk_buff *skb;
204204 u8 *data;
@@ -361,7 +361,7 @@ void __kfree_skb(struct sk_buff *skb) · 156 unmodified lines
361361 * %GFP_ATOMIC.
362362 */
363363
364−struct sk_buff *skb_clone(struct sk_buff *skb, unsigned int __nocast gfp_mask)
364+struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
365365 {
366366 struct sk_buff *n;
367367
@@ -500,7 +500,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) · 132 unmodified lines
500500 * header is going to be modified. Use pskb_copy() instead.
501501 */
502502
503−struct sk_buff *skb_copy(const struct sk_buff *skb, unsigned int __nocast gfp_mask)
503+struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
504504 {
505505 int headerlen = skb->data - skb->head;
506506 /*
@@ -539,7 +539,7 @@ struct sk_buff *skb_copy(const struct sk_buff *skb, unsigned int __nocast gfp_ma · 32 unmodified lines
539539 * The returned buffer has a reference count of 1.
540540 */
541541
542−struct sk_buff *pskb_copy(struct sk_buff *skb, unsigned int __nocast gfp_mask)
542+struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
543543 {
544544 /*
545545 * Allocate the copy buffer
@@ -598,7 +598,7 @@ out: · 52 unmodified lines
598598 */
599599
600600 int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
601− unsigned int __nocast gfp_mask)
601+ gfp_t gfp_mask)
602602 {
603603 int i;
604604 u8 *data;
@@ -689,7 +689,7 @@ struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, unsigned int headroom) · 84 unmodified lines
689689 */
690690 struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
691691 int newheadroom, int newtailroom,
692− unsigned int __nocast gfp_mask)
692+ gfp_t gfp_mask)
693693 {
694694 /*
695695 * Allocate the copy buffer
net/core/sock.c+5−5
@@ -637,7 +637,7 @@ lenout: · 636 unmodified lines
637637 * @prot: struct proto associated with this new sock instance
638638 * @zero_it: if we should zero the newly allocated sock
639639 */
640−struct sock *sk_alloc(int family, unsigned int __nocast priority,
640+struct sock *sk_alloc(int family, gfp_t priority,
641641 struct proto *prot, int zero_it)
642642 {
643643 struct sock *sk = NULL;
@@ -704,7 +704,7 @@ void sk_free(struct sock *sk) · 60 unmodified lines
704704 module_put(owner);
705705 }
706706
707−struct sock *sk_clone(const struct sock *sk, const unsigned int __nocast priority)
707+struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
708708 {
709709 struct sock *newsk = sk_alloc(sk->sk_family, priority, sk->sk_prot, 0);
710710
@@ -845,7 +845,7 @@ unsigned long sock_i_ino(struct sock *sk) · 134 unmodified lines
845845 * Allocate a skb from the socket's send buffer.
846846 */
847847 struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,
848− unsigned int __nocast priority)
848+ gfp_t priority)
849849 {
850850 if (force || atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) {
851851 struct sk_buff * skb = alloc_skb(size, priority);
@@ -861,7 +861,7 @@ struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, · 9 unmodified lines
861861 * Allocate a skb from the socket's receive buffer.
862862 */
863863 struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force,
864− unsigned int __nocast priority)
864+ gfp_t priority)
865865 {
866866 if (force || atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf) {
867867 struct sk_buff *skb = alloc_skb(size, priority);
@@ -876,7 +876,7 @@ struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force, · 8 unmodified lines
876876 /*
877877 * Allocate a memory block from the socket's option memory buffer.
878878 */
879−void *sock_kmalloc(struct sock *sk, int size, unsigned int __nocast priority)
879+void *sock_kmalloc(struct sock *sk, int size, gfp_t priority)
880880 {
881881 if ((unsigned)size <= sysctl_optmem_max &&
882882 atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) {
net/dccp/ackvec.c+1−1
@@ -91,7 +91,7 @@ int dccp_insert_option_ackvec(struct sock *sk, struct sk_buff *skb) · 90 unmodified lines
9191 }
9292
9393 struct dccp_ackvec *dccp_ackvec_alloc(const unsigned int len,
94− const unsigned int __nocast priority)
94+ const gfp_t priority)
9595 {
9696 struct dccp_ackvec *av = kmalloc(sizeof(*av) + len, priority);
9797
net/dccp/ackvec.h+2−2
@@ -74,7 +74,7 @@ struct sk_buff; · 73 unmodified lines
7474
7575 #ifdef CONFIG_IP_DCCP_ACKVEC
7676 extern struct dccp_ackvec *dccp_ackvec_alloc(unsigned int len,
77− const unsigned int __nocast priority);
77+ const gfp_t priority);
7878 extern void dccp_ackvec_free(struct dccp_ackvec *av);
7979
8080 extern int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
@@ -93,7 +93,7 @@ static inline int dccp_ackvec_pending(const struct dccp_ackvec *av) · 12 unmodified lines
9393 }
9494 #else /* CONFIG_IP_DCCP_ACKVEC */
9595 static inline struct dccp_ackvec *dccp_ackvec_alloc(unsigned int len,
96− const unsigned int __nocast priority)
96+ const gfp_t priority)
9797 {
9898 return NULL;
9999 }
net/dccp/ccids/lib/loss_interval.h+1−1
@@ -36,7 +36,7 @@ struct dccp_li_hist_entry { · 35 unmodified lines
3636
3737 static inline struct dccp_li_hist_entry *
3838 dccp_li_hist_entry_new(struct dccp_li_hist *hist,
39− const unsigned int __nocast prio)
39+ const gfp_t prio)
4040 {
4141 return kmem_cache_alloc(hist->dccplih_slab, prio);
4242 }
net/dccp/ccids/lib/packet_history.h+2−2
@@ -86,7 +86,7 @@ extern struct dccp_rx_hist_entry * · 85 unmodified lines
8686
8787 static inline struct dccp_tx_hist_entry *
8888 dccp_tx_hist_entry_new(struct dccp_tx_hist *hist,
89− const unsigned int __nocast prio)
89+ const gfp_t prio)
9090 {
9191 struct dccp_tx_hist_entry *entry = kmem_cache_alloc(hist->dccptxh_slab,
9292 prio);
@@ -137,7 +137,7 @@ static inline struct dccp_rx_hist_entry * · 44 unmodified lines
137137 const struct sock *sk,
138138 const u32 ndp,
139139 const struct sk_buff *skb,
140− const unsigned int __nocast prio)
140+ const gfp_t prio)
141141 {
142142 struct dccp_rx_hist_entry *entry = kmem_cache_alloc(hist->dccprxh_slab,
143143 prio);
net/decnet/af_decnet.c+2−4
@@ -452,8 +452,7 @@ static struct proto dn_proto = { · 451 unmodified lines
452452 .obj_size = sizeof(struct dn_sock),
453453 };
454454
455−static struct sock *dn_alloc_sock(struct socket *sock,
456− unsigned int __nocast gfp)
455+static struct sock *dn_alloc_sock(struct socket *sock, gfp_t gfp)
457456 {
458457 struct dn_scp *scp;
459458 struct sock *sk = sk_alloc(PF_DECnet, gfp, &dn_proto, 1);
@@ -805,8 +804,7 @@ static int dn_auto_bind(struct socket *sock) · 345 unmodified lines
805804 return rv;
806805 }
807806
808−static int dn_confirm_accept(struct sock *sk, long *timeo,
809− unsigned int __nocast allocation)
807+static int dn_confirm_accept(struct sock *sk, long *timeo, gfp_t allocation)
810808 {
811809 struct dn_scp *scp = DN_SK(sk);
812810 DEFINE_WAIT(wait);
net/decnet/dn_nsp_out.c+9−11
@@ -117,8 +117,7 @@ try_again: · 116 unmodified lines
117117 * The eventual aim is for each socket to have a cached header size
118118 * for its outgoing packets, and to set hdr from this when sk != NULL.
119119 */
120−struct sk_buff *dn_alloc_skb(struct sock *sk, int size,
121− unsigned int __nocast pri)
120+struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri)
122121 {
123122 struct sk_buff *skb;
124123 int hdr = 64;
@@ -212,7 +211,7 @@ static void dn_nsp_rtt(struct sock *sk, long rtt) · 87 unmodified lines
212211 * Returns: The number of times the packet has been sent previously
213212 */
214213 static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb,
215− unsigned int __nocast gfp)
214+ gfp_t gfp)
216215 {
217216 struct dn_skb_cb *cb = DN_SKB_CB(skb);
218217 struct sk_buff *skb2;
@@ -353,7 +352,7 @@ static unsigned short *dn_nsp_mk_data_header(struct sock *sk, struct sk_buff *sk · 134 unmodified lines
353352 }
354353
355354 void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb,
356− unsigned int __nocast gfp, int oth)
355+ gfp_t gfp, int oth)
357356 {
358357 struct dn_scp *scp = DN_SK(sk);
359358 struct dn_skb_cb *cb = DN_SKB_CB(skb);
@@ -520,7 +519,7 @@ static int dn_nsp_retrans_conn_conf(struct sock *sk) · 160 unmodified lines
520519 return 0;
521520 }
522521
523−void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp)
522+void dn_send_conn_conf(struct sock *sk, gfp_t gfp)
524523 {
525524 struct dn_scp *scp = DN_SK(sk);
526525 struct sk_buff *skb = NULL;
@@ -552,7 +551,7 @@ void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp) · 25 unmodified lines
552551
553552
554553 static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg,
555− unsigned short reason, unsigned int __nocast gfp,
554+ unsigned short reason, gfp_t gfp,
556555 struct dst_entry *dst,
557556 int ddl, unsigned char *dd, __u16 rem, __u16 loc)
558557 {
@@ -595,7 +594,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, · 36 unmodified lines
595594
596595
597596 void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg,
598− unsigned short reason, unsigned int __nocast gfp)
597+ unsigned short reason, gfp_t gfp)
599598 {
600599 struct dn_scp *scp = DN_SK(sk);
601600 int ddl = 0;
@@ -616,7 +615,7 @@ void dn_nsp_return_disc(struct sk_buff *skb, unsigned char msgflg, · 14 unmodified lines
616615 {
617616 struct dn_skb_cb *cb = DN_SKB_CB(skb);
618617 int ddl = 0;
619− unsigned int __nocast gfp = GFP_ATOMIC;
618+ gfp_t gfp = GFP_ATOMIC;
620619
621620 dn_nsp_do_disc(NULL, msgflg, reason, gfp, skb->dst, ddl,
622621 NULL, cb->src_port, cb->dst_port);
@@ -628,7 +627,7 @@ void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval) · 5 unmodified lines
628627 struct dn_scp *scp = DN_SK(sk);
629628 struct sk_buff *skb;
630629 unsigned char *ptr;
631− unsigned int __nocast gfp = GFP_ATOMIC;
630+ gfp_t gfp = GFP_ATOMIC;
632631
633632 if ((skb = dn_alloc_skb(sk, DN_MAX_NSP_DATA_HEADER + 2, gfp)) == NULL)
634633 return;
@@ -663,8 +662,7 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg) · 28 unmodified lines
663662 unsigned char menuver;
664663 struct dn_skb_cb *cb;
665664 unsigned char type = 1;
666− unsigned int __nocast allocation =
667− (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC;
665+ gfp_t allocation = (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC;
668666 struct sk_buff *skb = dn_alloc_skb(sk, 200, allocation);
669667
670668 if (!skb)
net/ieee80211/ieee80211_tx.c+1−1
@@ -207,7 +207,7 @@ void ieee80211_txb_free(struct ieee80211_txb *txb) · 206 unmodified lines
207207 }
208208
209209 static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
210− unsigned int __nocast gfp_mask)
210+ gfp_t gfp_mask)
211211 {
212212 struct ieee80211_txb *txb;
213213 int i;
net/ipv4/inet_connection_sock.c+1−1
@@ -494,7 +494,7 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, · 493 unmodified lines
494494 EXPORT_SYMBOL_GPL(inet_csk_reqsk_queue_prune);
495495
496496 struct sock *inet_csk_clone(struct sock *sk, const struct request_sock *req,
497− const unsigned int __nocast priority)
497+ const gfp_t priority)
498498 {
499499 struct sock *newsk = sk_clone(sk, priority);
500500
net/ipv4/ipvs/ip_vs_app.c+1−1
@@ -604,7 +604,7 @@ static struct file_operations ip_vs_app_fops = { · 603 unmodified lines
604604 /*
605605 * Replace a segment of data with a new segment
606606 */
607−int ip_vs_skb_replace(struct sk_buff *skb, unsigned int __nocast pri,
607+int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri,
608608 char *o_buf, int o_len, char *n_buf, int n_len)
609609 {
610610 struct iphdr *iph;
net/ipv4/tcp_output.c+1−1
@@ -1610,7 +1610,7 @@ void tcp_send_fin(struct sock *sk) · 1609 unmodified lines
16101610 * was unread data in the receive queue. This behavior is recommended
16111611 * by draft-ietf-tcpimpl-prob-03.txt section 3.10. -DaveM
16121612 */
1613−void tcp_send_active_reset(struct sock *sk, unsigned int __nocast priority)
1613+void tcp_send_active_reset(struct sock *sk, gfp_t priority)
16141614 {
16151615 struct tcp_sock *tp = tcp_sk(sk);
16161616 struct sk_buff *skb;
net/key/af_key.c+3−3
@@ -185,7 +185,7 @@ static int pfkey_release(struct socket *sock) · 184 unmodified lines
185185 }
186186
187187 static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2,
188− unsigned int __nocast allocation, struct sock *sk)
188+ gfp_t allocation, struct sock *sk)
189189 {
190190 int err = -ENOBUFS;
191191
@@ -217,7 +217,7 @@ static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2, · 25 unmodified lines
217217 #define BROADCAST_ONE 1
218218 #define BROADCAST_REGISTERED 2
219219 #define BROADCAST_PROMISC_ONLY 4
220−static int pfkey_broadcast(struct sk_buff *skb, unsigned int __nocast allocation,
220+static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
221221 int broadcast_flags, struct sock *one_sk)
222222 {
223223 struct sock *sk;
@@ -1417,7 +1417,7 @@ static int pfkey_get(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, · 1193 unmodified lines
14171417 }
14181418
14191419 static struct sk_buff *compose_sadb_supported(struct sadb_msg *orig,
1420− unsigned int __nocast allocation)
1420+ gfp_t allocation)
14211421 {
14221422 struct sk_buff *skb;
14231423 struct sadb_msg *hdr;
net/llc/llc_conn.c+1−2
@@ -867,8 +867,7 @@ static void llc_sk_init(struct sock* sk) · 866 unmodified lines
867867 * Allocates a LLC sock and initializes it. Returns the new LLC sock
868868 * or %NULL if there's no memory available for one
869869 */
870−struct sock *llc_sk_alloc(int family, unsigned int __nocast priority,
871− struct proto *prot)
870+struct sock *llc_sk_alloc(int family, gfp_t priority, struct proto *prot)
872871 {
873872 struct sock *sk = sk_alloc(family, priority, prot, 1);
874873
net/netfilter/nfnetlink.c+1−2
@@ -195,8 +195,7 @@ nfnetlink_check_attributes(struct nfnetlink_subsystem *subsys, · 194 unmodified lines
195195
196196 int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo)
197197 {
198− unsigned int __nocast allocation =
199− in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
198+ gfp_t allocation = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
200199 int err = 0;
201200
202201 NETLINK_CB(skb).dst_group = group;
net/netlink/af_netlink.c+2−2
@@ -758,7 +758,7 @@ void netlink_detachskb(struct sock *sk, struct sk_buff *skb) · 757 unmodified lines
758758 }
759759
760760 static inline struct sk_buff *netlink_trim(struct sk_buff *skb,
761− unsigned int __nocast allocation)
761+ gfp_t allocation)
762762 {
763763 int delta;
764764
@@ -880,7 +880,7 @@ out: · 115 unmodified lines
880880 }
881881
882882 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid,
883− u32 group, unsigned int __nocast allocation)
883+ u32 group, gfp_t allocation)
884884 {
885885 struct netlink_broadcast_data info;
886886 struct hlist_node *node;
net/rxrpc/call.c+1−1
@@ -1923,7 +1923,7 @@ int rxrpc_call_write_data(struct rxrpc_call *call, · 1922 unmodified lines
19231923 size_t sioc,
19241924 struct kvec *siov,
19251925 u8 rxhdr_flags,
1926− unsigned int __nocast alloc_flags,
1926+ gfp_t alloc_flags,
19271927 int dup_data,
19281928 size_t *size_sent)
19291929 {
net/rxrpc/connection.c+1−1
@@ -522,7 +522,7 @@ int rxrpc_conn_newmsg(struct rxrpc_connection *conn, · 521 unmodified lines
522522 uint8_t type,
523523 int dcount,
524524 struct kvec diov[],
525− unsigned int __nocast alloc_flags,
525+ gfp_t alloc_flags,
526526 struct rxrpc_message **_msg)
527527 {
528528 struct rxrpc_message *msg;
net/sctp/associola.c+5−5
@@ -71,7 +71,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a · 70 unmodified lines
7171 const struct sctp_endpoint *ep,
7272 const struct sock *sk,
7373 sctp_scope_t scope,
74− unsigned int __nocast gfp)
74+ gfp_t gfp)
7575 {
7676 struct sctp_sock *sp;
7777 int i;
@@ -273,7 +273,7 @@ fail_init: · 195 unmodified lines
273273 struct sctp_association *sctp_association_new(const struct sctp_endpoint *ep,
274274 const struct sock *sk,
275275 sctp_scope_t scope,
276− unsigned int __nocast gfp)
276+ gfp_t gfp)
277277 {
278278 struct sctp_association *asoc;
279279
@@ -479,7 +479,7 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc, · 199 unmodified lines
479479 /* Add a transport address to an association. */
480480 struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
481481 const union sctp_addr *addr,
482− const unsigned int __nocast gfp,
482+ const gfp_t gfp,
483483 const int peer_state)
484484 {
485485 struct sctp_transport *peer;
@@ -1231,7 +1231,7 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned len) · 745 unmodified lines
12311231 * local endpoint and the remote peer.
12321232 */
12331233 int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc,
1234− unsigned int __nocast gfp)
1234+ gfp_t gfp)
12351235 {
12361236 sctp_scope_t scope;
12371237 int flags;
@@ -1254,7 +1254,7 @@ int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc, · 16 unmodified lines
12541254 /* Build the association's bind address list from the cookie. */
12551255 int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *asoc,
12561256 struct sctp_cookie *cookie,
1257− unsigned int __nocast gfp)
1257+ gfp_t gfp)
12581258 {
12591259 int var_size2 = ntohs(cookie->peer_init->chunk_hdr.length);
12601260 int var_size3 = cookie->raw_addr_list_len;
net/sctp/bind_addr.c+6−6
@@ -53,7 +53,7 @@ · 52 unmodified lines
5353
5454 /* Forward declarations for internal helpers. */
5555 static int sctp_copy_one_addr(struct sctp_bind_addr *, union sctp_addr *,
56− sctp_scope_t scope, unsigned int __nocast gfp,
56+ sctp_scope_t scope, gfp_t gfp,
5757 int flags);
5858 static void sctp_bind_addr_clean(struct sctp_bind_addr *);
5959
@@ -64,7 +64,7 @@ static void sctp_bind_addr_clean(struct sctp_bind_addr *); · 4 unmodified lines
6464 */
6565 int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
6666 const struct sctp_bind_addr *src,
67− sctp_scope_t scope, unsigned int __nocast gfp,
67+ sctp_scope_t scope, gfp_t gfp,
6868 int flags)
6969 {
7070 struct sctp_sockaddr_entry *addr;
@@ -146,7 +146,7 @@ void sctp_bind_addr_free(struct sctp_bind_addr *bp) · 75 unmodified lines
146146
147147 /* Add an address to the bind address list in the SCTP_bind_addr structure. */
148148 int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new,
149− unsigned int __nocast gfp)
149+ gfp_t gfp)
150150 {
151151 struct sctp_sockaddr_entry *addr;
152152
@@ -200,7 +200,7 @@ int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) · 47 unmodified lines
200200 */
201201 union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp,
202202 int *addrs_len,
203− unsigned int __nocast gfp)
203+ gfp_t gfp)
204204 {
205205 union sctp_params addrparms;
206206 union sctp_params retval;
@@ -252,7 +252,7 @@ end_raw: · 45 unmodified lines
252252 * address parameters).
253253 */
254254 int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw_addr_list,
255− int addrs_len, __u16 port, unsigned int __nocast gfp)
255+ int addrs_len, __u16 port, gfp_t gfp)
256256 {
257257 union sctp_addr_param *rawaddr;
258258 struct sctp_paramhdr *param;
@@ -350,7 +350,7 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, · 91 unmodified lines
350350 /* Copy out addresses from the global local address list. */
351351 static int sctp_copy_one_addr(struct sctp_bind_addr *dest,
352352 union sctp_addr *addr,
353− sctp_scope_t scope, unsigned int __nocast gfp,
353+ sctp_scope_t scope, gfp_t gfp,
354354 int flags)
355355 {
356356 int error = 0;
net/sctp/chunk.c+1−1
@@ -62,7 +62,7 @@ static void sctp_datamsg_init(struct sctp_datamsg *msg) · 61 unmodified lines
6262 }
6363
6464 /* Allocate and initialize datamsg. */
65−SCTP_STATIC struct sctp_datamsg *sctp_datamsg_new(unsigned int __nocast gfp)
65+SCTP_STATIC struct sctp_datamsg *sctp_datamsg_new(gfp_t gfp)
6666 {
6767 struct sctp_datamsg *msg;
6868 msg = kmalloc(sizeof(struct sctp_datamsg), gfp);
net/sctp/endpointola.c+2−3
@@ -68,7 +68,7 @@ static void sctp_endpoint_bh_rcv(struct sctp_endpoint *ep); · 67 unmodified lines
6868 */
6969 static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
7070 struct sock *sk,
71− unsigned int __nocast gfp)
71+ gfp_t gfp)
7272 {
7373 struct sctp_sock *sp = sctp_sk(sk);
7474 memset(ep, 0, sizeof(struct sctp_endpoint));
@@ -138,8 +138,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, · 63 unmodified lines
138138 /* Create a sctp_endpoint with all that boring stuff initialized.
139139 * Returns NULL if there isn't enough memory.
140140 */
141−struct sctp_endpoint *sctp_endpoint_new(struct sock *sk,
142− unsigned int __nocast gfp)
141+struct sctp_endpoint *sctp_endpoint_new(struct sock *sk, gfp_t gfp)
143142 {
144143 struct sctp_endpoint *ep;
145144
net/sctp/protocol.c+1−1
@@ -219,7 +219,7 @@ static void sctp_free_local_addr_list(void) · 218 unmodified lines
219219
220220 /* Copy the local addresses which are valid for 'scope' into 'bp'. */
221221 int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope,
222− unsigned int __nocast gfp, int copy_flags)
222+ gfp_t gfp, int copy_flags)
223223 {
224224 struct sctp_sockaddr_entry *addr;
225225 int error = 0;
net/sctp/sm_make_chunk.c+7−7
@@ -78,7 +78,7 @@ static sctp_cookie_param_t *sctp_pack_cookie(const struct sctp_endpoint *ep, · 77 unmodified lines
7878 static int sctp_process_param(struct sctp_association *asoc,
7979 union sctp_params param,
8080 const union sctp_addr *peer_addr,
81− unsigned int __nocast gfp);
81+ gfp_t gfp);
8282
8383 /* What was the inbound interface for this chunk? */
8484 int sctp_chunk_iif(const struct sctp_chunk *chunk)
@@ -174,7 +174,7 @@ void sctp_init_cause(struct sctp_chunk *chunk, __u16 cause_code, · 89 unmodified lines
174174 */
175175 struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
176176 const struct sctp_bind_addr *bp,
177− unsigned int __nocast gfp, int vparam_len)
177+ gfp_t gfp, int vparam_len)
178178 {
179179 sctp_inithdr_t init;
180180 union sctp_params addrs;
@@ -261,7 +261,7 @@ nodata: · 80 unmodified lines
261261
262262 struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc,
263263 const struct sctp_chunk *chunk,
264− unsigned int __nocast gfp, int unkparam_len)
264+ gfp_t gfp, int unkparam_len)
265265 {
266266 sctp_inithdr_t initack;
267267 struct sctp_chunk *retval;
@@ -1234,7 +1234,7 @@ void sctp_chunk_assign_tsn(struct sctp_chunk *chunk) · 966 unmodified lines
12341234 /* Create a CLOSED association to use with an incoming packet. */
12351235 struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep,
12361236 struct sctp_chunk *chunk,
1237− unsigned int __nocast gfp)
1237+ gfp_t gfp)
12381238 {
12391239 struct sctp_association *asoc;
12401240 struct sk_buff *skb;
@@ -1349,7 +1349,7 @@ nodata: · 108 unmodified lines
13491349 struct sctp_association *sctp_unpack_cookie(
13501350 const struct sctp_endpoint *ep,
13511351 const struct sctp_association *asoc,
1352− struct sctp_chunk *chunk, unsigned int __nocast gfp,
1352+ struct sctp_chunk *chunk, gfp_t gfp,
13531353 int *error, struct sctp_chunk **errp)
13541354 {
13551355 struct sctp_association *retval = NULL;
@@ -1814,7 +1814,7 @@ int sctp_verify_init(const struct sctp_association *asoc, · 458 unmodified lines
18141814 */
18151815 int sctp_process_init(struct sctp_association *asoc, sctp_cid_t cid,
18161816 const union sctp_addr *peer_addr,
1817− sctp_init_chunk_t *peer_init, unsigned int __nocast gfp)
1817+ sctp_init_chunk_t *peer_init, gfp_t gfp)
18181818 {
18191819 union sctp_params param;
18201820 struct sctp_transport *transport;
@@ -1985,7 +1985,7 @@ nomem: · 164 unmodified lines
19851985 static int sctp_process_param(struct sctp_association *asoc,
19861986 union sctp_params param,
19871987 const union sctp_addr *peer_addr,
1988− unsigned int __nocast gfp)
1988+ gfp_t gfp)
19891989 {
19901990 union sctp_addr addr;
19911991 int i;
net/sctp/sm_sideeffect.c+6−6
@@ -63,7 +63,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, · 62 unmodified lines
6363 void *event_arg,
6464 sctp_disposition_t status,
6565 sctp_cmd_seq_t *commands,
66− unsigned int __nocast gfp);
66+ gfp_t gfp);
6767 static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
6868 sctp_state_t state,
6969 struct sctp_endpoint *ep,
@@ -71,7 +71,7 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, · 1 unmodified line
7171 void *event_arg,
7272 sctp_disposition_t status,
7373 sctp_cmd_seq_t *commands,
74− unsigned int __nocast gfp);
74+ gfp_t gfp);
7575
7676 /********************************************************************
7777 * Helper functions
@@ -498,7 +498,7 @@ static int sctp_cmd_process_init(sctp_cmd_seq_t *commands, · 420 unmodified lines
498498 struct sctp_association *asoc,
499499 struct sctp_chunk *chunk,
500500 sctp_init_chunk_t *peer_init,
501− unsigned int __nocast gfp)
501+ gfp_t gfp)
502502 {
503503 int error;
504504
@@ -853,7 +853,7 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype, · 348 unmodified lines
853853 struct sctp_endpoint *ep,
854854 struct sctp_association *asoc,
855855 void *event_arg,
856− unsigned int __nocast gfp)
856+ gfp_t gfp)
857857 {
858858 sctp_cmd_seq_t commands;
859859 const sctp_sm_table_entry_t *state_fn;
@@ -898,7 +898,7 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, · 38 unmodified lines
898898 void *event_arg,
899899 sctp_disposition_t status,
900900 sctp_cmd_seq_t *commands,
901− unsigned int __nocast gfp)
901+ gfp_t gfp)
902902 {
903903 int error;
904904
@@ -986,7 +986,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, · 81 unmodified lines
986986 void *event_arg,
987987 sctp_disposition_t status,
988988 sctp_cmd_seq_t *commands,
989− unsigned int __nocast gfp)
989+ gfp_t gfp)
990990 {
991991 int error = 0;
992992 int force;
net/sctp/ssnmap.c+1−1
@@ -58,7 +58,7 @@ static inline size_t sctp_ssnmap_size(__u16 in, __u16 out) · 57 unmodified lines
5858 * Allocate room to store at least 'len' contiguous TSNs.
5959 */
6060 struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
61− unsigned int __nocast gfp)
61+ gfp_t gfp)
6262 {
6363 struct sctp_ssnmap *retval;
6464 int size;
net/sctp/transport.c+2−2
@@ -57,7 +57,7 @@ · 56 unmodified lines
5757 /* Initialize a new transport from provided memory. */
5858 static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
5959 const union sctp_addr *addr,
60− unsigned int __nocast gfp)
60+ gfp_t gfp)
6161 {
6262 /* Copy in the address. */
6363 peer->ipaddr = *addr;
@@ -122,7 +122,7 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, · 58 unmodified lines
122122
123123 /* Allocate and initialize a new transport. */
124124 struct sctp_transport *sctp_transport_new(const union sctp_addr *addr,
125− unsigned int __nocast gfp)
125+ gfp_t gfp)
126126 {
127127 struct sctp_transport *transport;
128128
net/sctp/ulpevent.c+9−9
@@ -74,7 +74,7 @@ SCTP_STATIC void sctp_ulpevent_init(struct sctp_ulpevent *event, int msg_flags) · 73 unmodified lines
7474
7575 /* Create a new sctp_ulpevent. */
7676 SCTP_STATIC struct sctp_ulpevent *sctp_ulpevent_new(int size, int msg_flags,
77− unsigned int __nocast gfp)
77+ gfp_t gfp)
7878 {
7979 struct sctp_ulpevent *event;
8080 struct sk_buff *skb;
@@ -136,7 +136,7 @@ static inline void sctp_ulpevent_release_owner(struct sctp_ulpevent *event) · 55 unmodified lines
136136 struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
137137 const struct sctp_association *asoc,
138138 __u16 flags, __u16 state, __u16 error, __u16 outbound,
139− __u16 inbound, unsigned int __nocast gfp)
139+ __u16 inbound, gfp_t gfp)
140140 {
141141 struct sctp_ulpevent *event;
142142 struct sctp_assoc_change *sac;
@@ -237,7 +237,7 @@ fail: · 94 unmodified lines
237237 struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change(
238238 const struct sctp_association *asoc,
239239 const struct sockaddr_storage *aaddr,
240− int flags, int state, int error, unsigned int __nocast gfp)
240+ int flags, int state, int error, gfp_t gfp)
241241 {
242242 struct sctp_ulpevent *event;
243243 struct sctp_paddr_change *spc;
@@ -350,7 +350,7 @@ fail: · 106 unmodified lines
350350 */
351351 struct sctp_ulpevent *sctp_ulpevent_make_remote_error(
352352 const struct sctp_association *asoc, struct sctp_chunk *chunk,
353− __u16 flags, unsigned int __nocast gfp)
353+ __u16 flags, gfp_t gfp)
354354 {
355355 struct sctp_ulpevent *event;
356356 struct sctp_remote_error *sre;
@@ -448,7 +448,7 @@ fail: · 91 unmodified lines
448448 */
449449 struct sctp_ulpevent *sctp_ulpevent_make_send_failed(
450450 const struct sctp_association *asoc, struct sctp_chunk *chunk,
451− __u16 flags, __u32 error, unsigned int __nocast gfp)
451+ __u16 flags, __u32 error, gfp_t gfp)
452452 {
453453 struct sctp_ulpevent *event;
454454 struct sctp_send_failed *ssf;
@@ -557,7 +557,7 @@ fail: · 102 unmodified lines
557557 */
558558 struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event(
559559 const struct sctp_association *asoc,
560− __u16 flags, unsigned int __nocast gfp)
560+ __u16 flags, gfp_t gfp)
561561 {
562562 struct sctp_ulpevent *event;
563563 struct sctp_shutdown_event *sse;
@@ -620,7 +620,7 @@ fail: · 56 unmodified lines
620620 * 5.3.1.6 SCTP_ADAPTION_INDICATION
621621 */
622622 struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication(
623− const struct sctp_association *asoc, unsigned int __nocast gfp)
623+ const struct sctp_association *asoc, gfp_t gfp)
624624 {
625625 struct sctp_ulpevent *event;
626626 struct sctp_adaption_event *sai;
@@ -657,7 +657,7 @@ fail: · 30 unmodified lines
657657 */
658658 struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
659659 struct sctp_chunk *chunk,
660− unsigned int __nocast gfp)
660+ gfp_t gfp)
661661 {
662662 struct sctp_ulpevent *event = NULL;
663663 struct sk_buff *skb;
@@ -719,7 +719,7 @@ fail: · 55 unmodified lines
719719 */
720720 struct sctp_ulpevent *sctp_ulpevent_make_pdapi(
721721 const struct sctp_association *asoc, __u32 indication,
722− unsigned int __nocast gfp)
722+ gfp_t gfp)
723723 {
724724 struct sctp_ulpevent *event;
725725 struct sctp_pdapi_event *pd;
net/sctp/ulpqueue.c+4−4
@@ -100,7 +100,7 @@ void sctp_ulpq_free(struct sctp_ulpq *ulpq) · 99 unmodified lines
100100
101101 /* Process an incoming DATA chunk. */
102102 int sctp_ulpq_tail_data(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
103− unsigned int __nocast gfp)
103+ gfp_t gfp)
104104 {
105105 struct sk_buff_head temp;
106106 sctp_data_chunk_t *hdr;
@@ -792,7 +792,7 @@ static __u16 sctp_ulpq_renege_frags(struct sctp_ulpq *ulpq, __u16 needed) · 685 unmodified lines
792792 /* Partial deliver the first message as there is pressure on rwnd. */
793793 void sctp_ulpq_partial_delivery(struct sctp_ulpq *ulpq,
794794 struct sctp_chunk *chunk,
795− unsigned int __nocast gfp)
795+ gfp_t gfp)
796796 {
797797 struct sctp_ulpevent *event;
798798 struct sctp_association *asoc;
@@ -816,7 +816,7 @@ void sctp_ulpq_partial_delivery(struct sctp_ulpq *ulpq, · 17 unmodified lines
816816
817817 /* Renege some packets to make room for an incoming chunk. */
818818 void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
819− unsigned int __nocast gfp)
819+ gfp_t gfp)
820820 {
821821 struct sctp_association *asoc;
822822 __u16 needed, freed;
@@ -855,7 +855,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk, · 32 unmodified lines
855855 /* Notify the application if an association is aborted and in
856856 * partial delivery mode. Send up any pending received messages.
857857 */
858−void sctp_ulpq_abort_pd(struct sctp_ulpq *ulpq, unsigned int __nocast gfp)
858+void sctp_ulpq_abort_pd(struct sctp_ulpq *ulpq, gfp_t gfp)
859859 {
860860 struct sctp_ulpevent *ev = NULL;
861861 struct sock *sk;
net/sunrpc/sched.c+1−1
@@ -719,7 +719,7 @@ static void rpc_async_schedule(void *arg) · 718 unmodified lines
719719 void *
720720 rpc_malloc(struct rpc_task *task, size_t size)
721721 {
722− unsigned int __nocast gfp;
722+ gfp_t gfp;
723723
724724 if (task->tk_flags & RPC_TASK_SWAPPER)
725725 gfp = GFP_ATOMIC;
net/xfrm/xfrm_policy.c+1−1
@@ -225,7 +225,7 @@ expired: · 224 unmodified lines
225225 * SPD calls.
226226 */
227227
228−struct xfrm_policy *xfrm_policy_alloc(unsigned int __nocast gfp)
228+struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp)
229229 {
230230 struct xfrm_policy *policy;
231231
sound/core/memalloc.c+1−1
@@ -106,7 +106,7 @@ struct snd_mem_list { · 105 unmodified lines
106106
107107 static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size,
108108 dma_addr_t *dma_handle,
109− unsigned int __nocast flags)
109+ gfp_t flags)
110110 {
111111 void *ret;
112112 u64 dma_mask, coherent_dma_mask;
sound/core/memory.c+5−5
@@ -89,7 +89,7 @@ void snd_memory_done(void) · 88 unmodified lines
8989 }
9090 }
9191
92−static void *__snd_kmalloc(size_t size, unsigned int __nocast flags, void *caller)
92+static void *__snd_kmalloc(size_t size, gfp_t flags, void *caller)
9393 {
9494 unsigned long cpu_flags;
9595 struct snd_alloc_track *t;
@@ -111,12 +111,12 @@ static void *__snd_kmalloc(size_t size, unsigned int __nocast flags, void *calle · 15 unmodified lines
111111 }
112112
113113 #define _snd_kmalloc(size, flags) __snd_kmalloc((size), (flags), __builtin_return_address(0));
114−void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags)
114+void *snd_hidden_kmalloc(size_t size, gfp_t flags)
115115 {
116116 return _snd_kmalloc(size, flags);
117117 }
118118
119−void *snd_hidden_kzalloc(size_t size, unsigned int __nocast flags)
119+void *snd_hidden_kzalloc(size_t size, gfp_t flags)
120120 {
121121 void *ret = _snd_kmalloc(size, flags);
122122 if (ret)
@@ -125,7 +125,7 @@ void *snd_hidden_kzalloc(size_t size, unsigned int __nocast flags) · 2 unmodified lines
125125 }
126126 EXPORT_SYMBOL(snd_hidden_kzalloc);
127127
128−void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags)
128+void *snd_hidden_kcalloc(size_t n, size_t size, gfp_t flags)
129129 {
130130 void *ret = NULL;
131131 if (n != 0 && size > INT_MAX / n)
@@ -190,7 +190,7 @@ void snd_hidden_vfree(void *obj) · 58 unmodified lines
190190 snd_wrapper_vfree(obj);
191191 }
192192
193−char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags)
193+char *snd_hidden_kstrdup(const char *s, gfp_t flags)
194194 {
195195 int len;
196196 char *buf;
sound/core/seq/instr/ainstr_iw.c+1−1
@@ -58,7 +58,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype, · 57 unmodified lines
5858 iwffff_xenv_t *ex,
5959 char __user **data,
6060 long *len,
61− unsigned int __nocast gfp_mask)
61+ gfp_t gfp_mask)
6262 {
6363 __u32 stype;
6464 iwffff_env_record_t *rp, *rp_last;
sound/core/wrappers.c+1−1
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 #include <linux/fs.h>
2828
2929 #ifdef CONFIG_SND_DEBUG_MEMORY
30−void *snd_wrapper_kmalloc(size_t size, unsigned int __nocast flags)
30+void *snd_wrapper_kmalloc(size_t size, gfp_t flags)
3131 {
3232 return kmalloc(size, flags);
3333 }