does this patch look remotely sane?
Subsystems (10)
RFC PATCH 1/1 does this patch look remotely sane?
followup to my previous question, if that equivalence holds, does
this patch look like it would make sense?
arch/frv/mm/pgalloc.c | 4 ++-- arch/i386/mm/pageattr.c | 2 +- arch/i386/mm/pgtable.c | 4 ++-- arch/powerpc/mm/pgtable_32.c | 2 +- arch/ppc/mm/pgtable.c | 2 +- arch/sparc64/mm/init.c | 2 +- arch/x86_64/mm/pageattr.c | 2 +- arch/xtensa/mm/init.c | 2 +- include/asm-arm/pgalloc.h | 2 +- include/asm-avr32/pgalloc.h | 2 +- include/asm-cris/pgalloc.h | 2 +- include/asm-m68k/motorola_pgalloc.h | 2 +- include/asm-m68k/sun3_pgalloc.h | 2 +- include/asm-sh64/pgalloc.h | 2 +- include/linux/pagemap.h | 2 +- include/net/sock.h | 2 +- kernel/kexec.c | 2 +- mm/filemap.c | 2 +- mm/page_alloc.c | 2 +- net/core/pktgen.c | 4 ++-- net/core/skbuff.c | 2 +- net/core/sock.c | 2 +- net/ipv4/ip_output.c | 2 +- net/ipv6/ip6_output.c | 2 +- 24 files changed, 27 insertions(+), 27 deletions(-)
arch/frv/mm/pgalloc.c +2 -2
@@ -33,9 +33,9 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)struct page *page;#ifdef CONFIG_HIGHPTE - page =alloc_pages (GFP_KERNEL |__GFP_HIGHMEM|__GFP_REPEAT,0 ); + page =alloc_page (GFP_KERNEL |__GFP_HIGHMEM|__GFP_REPEAT);#else - page =alloc_pages (GFP_KERNEL |__GFP_REPEAT,0 ); + page =alloc_page (GFP_KERNEL |__GFP_REPEAT);#endif if (page)clear_highpage (page);
arch/i386/mm/pageattr.c +1 -1
@@ -45,7 +45,7 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot,pte_t *pbase;spin_unlock_irq (&cpa_lock); - base =alloc_pages (GFP_KERNEL ,0 ); + base =alloc_page (GFP_KERNEL );spin_lock_irq (&cpa_lock);if (!base)return NULL ;
arch/i386/mm/pgtable.c +2 -2
@@ -189,9 +189,9 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)struct page *pte;#ifdef CONFIG_HIGHPTE - pte =alloc_pages (GFP_KERNEL |__GFP_HIGHMEM|__GFP_REPEAT|__GFP_ZERO,0 ); + pte =alloc_page (GFP_KERNEL |__GFP_HIGHMEM|__GFP_REPEAT|__GFP_ZERO);#else - pte =alloc_pages (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO,0 ); + pte =alloc_page (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO);#endif return pte; }
arch/powerpc/mm/pgtable_32.c +1 -1
@@ -119,7 +119,7 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)gfp_t flags =GFP_KERNEL | __GFP_REPEAT;#endif - ptepage =alloc_pages (flags,0 ); + ptepage =alloc_page (flags);if (ptepage)clear_highpage (ptepage);return ptepage;
arch/ppc/mm/pgtable.c +1 -1
@@ -118,7 +118,7 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)gfp_t flags =GFP_KERNEL | __GFP_REPEAT;#endif - ptepage =alloc_pages (flags,0 ); + ptepage =alloc_page (flags);if (ptepage)clear_highpage (ptepage);return ptepage;
arch/sparc64/mm/init.c +1 -1
@@ -1478,7 +1478,7 @@ void __init mem_init(void)* Set up the zero page, mark it reserved, so that page count * is not manipulated when freeing the page from user ptes. */ - mem_map_zero =alloc_pages (GFP_KERNEL |__GFP_ZERO,0 ); + mem_map_zero =alloc_page (GFP_KERNEL |__GFP_ZERO);if (mem_map_zero =NULL ) {prom_printf ("paging_init: Cannot alloc zero page.\n" );prom_halt ();
arch/x86_64/mm/pageattr.c +1 -1
@@ -40,7 +40,7 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot, {int i;unsigned long addr; -struct page *base =alloc_pages (GFP_KERNEL ,0 ); +struct page *base =alloc_page (GFP_KERNEL );pte_t *pbase;if (!base)return NULL ;
arch/xtensa/mm/init.c +1 -1
@@ -491,7 +491,7 @@ struct page* pte_alloc_one(struct mm_struct *mm, unsigned long addr) {struct page *page; - page =alloc_pages (GFP_KERNEL | __GFP_REPEAT,0 ); + page =alloc_page (GFP_KERNEL | __GFP_REPEAT);if (likely (page)) {pte_t * ptep =kmap_atomic (page,KM_USER0 );
include/asm-arm/pgalloc.h +1 -1
@@ -71,7 +71,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr) {struct page *pte; - pte =alloc_pages (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO,0 ); + pte =alloc_page (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO);if (pte) {void *page =page_address (pte);clean_dcache_area (page,sizeof (pte_t) *PTRS_PER_PTE );
include/asm-avr32/pgalloc.h +1 -1
@@ -67,7 +67,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm,struct page *pte; do { - pte = alloc_pages(GFP_KERNEL, 0); + pte = alloc_page(GFP_KERNEL); if (pte) clear_page(page_address(pte)); else {
include/asm-cris/pgalloc.h +1 -1
@@ -30,7 +30,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long adstatic inline struct page *pte_alloc_one (struct mm_struct *mm,unsigned long address) {struct page *pte; - pte =alloc_pages (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO,0 ); + pte =alloc_page (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO);return pte; }
include/asm-m68k/motorola_pgalloc.h +1 -1
@@ -30,7 +30,7 @@ static inline void pte_free_kernel(pte_t *pte)static inline struct page *pte_alloc_one (struct mm_struct *mm,unsigned long address) { -struct page *page =alloc_pages (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO,0 ); +struct page *page =alloc_page (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO);pte_t *pte;if (!page)
include/asm-m68k/sun3_pgalloc.h +1 -1
@@ -48,7 +48,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,static inline struct page *pte_alloc_one (struct mm_struct *mm,unsigned long address) { -struct page *page =alloc_pages (GFP_KERNEL |__GFP_REPEAT,0 ); +struct page *page =alloc_page (GFP_KERNEL |__GFP_REPEAT);if (page =NULL )return NULL ;
include/asm-sh64/pgalloc.h +1 -1
@@ -120,7 +120,7 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long add {struct page *pte; - pte =alloc_pages (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO,0 ); + pte =alloc_page (GFP_KERNEL |__GFP_REPEAT|__GFP_ZERO);return pte; }
include/linux/pagemap.h +1 -1
@@ -56,7 +56,7 @@ extern struct page *__page_cache_alloc(gfp_t gfp);#else static inline struct page *__page_cache_alloc (gfp_t gfp) { -return alloc_pages (gfp,0 ); +return alloc_page (gfp); }#endif
include/net/sock.h +1 -1
@@ -1248,7 +1248,7 @@ static inline struct page *sk_stream_alloc_page(struct sock *sk) {struct page *page =NULL ; - page =alloc_pages (sk->sk_allocation,0 ); + page =alloc_page (sk->sk_allocation);if (!page) { sk->sk_prot->enter_memory_pressure ();sk_stream_moderate_sndbuf (sk);
kernel/kexec.c +1 -1
@@ -698,7 +698,7 @@ static struct page *kimage_alloc_page(struct kimage *image,kimage_entry_t *old;/* Allocate a page, if we run out of memory give up */ - page =kimage_alloc_pages (gfp_mask,0 ); + page =kimage_alloc_page (gfp_mask);if (!page)return NULL ;/* If the page cannot be used file it away */
mm/filemap.c +1 -1
@@ -473,7 +473,7 @@ struct page *__page_cache_alloc(gfp_t gfp)int n =cpuset_mem_spread_node (); return alloc_pages_node(n, gfp, 0); } -return alloc_pages (gfp,0 ); +return alloc_page (gfp); }EXPORT_SYMBOL (__page_cache_alloc);#endif
mm/page_alloc.c +1 -1
@@ -1399,7 +1399,7 @@ fastcall unsigned long get_zeroed_page(gfp_t gfp_mask)*/ VM_BUG_ON ((gfp_mask & __GFP_HIGHMEM) !=0 ); - page =alloc_pages (gfp_mask | __GFP_ZERO,0 ); + page =alloc_page (gfp_mask | __GFP_ZERO);if (page)return (unsigned long )page_address (page);return 0 ;
net/core/pktgen.c +1 -1
@@ -2423,7 +2423,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, i =0 ;while (datalen >0 ) { -struct page *page =alloc_pages (GFP_KERNEL ,0 ); +struct page *page =alloc_page (GFP_KERNEL );skb_shinfo (skb)->frags[i].page = page;skb_shinfo (skb)->frags[i].page_offset =0 ; skb_shinfo(skb)->frags[i].size @@ -2768,7 +2768,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
i = 0;
while (datalen > 0) {
- struct page *page = alloc_pages(GFP_KERNEL, 0);
+ struct page *page = alloc_page(GFP_KERNEL);
skb_shinfo(skb)->frags[i].page = page; skb_shinfo(skb)->frags[i].page_offset = 0; skb_shinfo(skb)->frags[i].size diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index de7801d..26d70d0 100644
net/core/skbuff.c +1 -1
@@ -1854,7 +1854,7 @@ int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,return -EFAULT ;/* allocate a new page for next frag */ - page =alloc_pages (sk->sk_allocation,0 ); + page =alloc_page (sk->sk_allocation);/* If alloc_page fails just return failure and caller will * free previous allocated pages by doing kfree_skb()
net/core/sock.c +1 -1
@@ -1167,7 +1167,7 @@ static struct sk_buff *sock_alloc_send_pskb(struct sock *sk,struct page *page;skb_frag_t *frag; - page =alloc_pages (sk->sk_allocation,0 ); + page =alloc_page (sk->sk_allocation);if (!page) { err = -ENOBUFS ;skb_shinfo (skb)->nr_frags = i;
net/ipv4/ip_output.c +1 -1
@@ -998,7 +998,7 @@ alloc_new_skb: }else if (i <MAX_SKB_FRAGS ) {if (copy >PAGE_SIZE ) copy =PAGE_SIZE ; - page =alloc_pages (sk->sk_allocation,0 ); + page =alloc_page (sk->sk_allocation);if (page =NULL ) { err = -ENOMEM ; goto error;
net/ipv6/ip6_output.c +1 -1
@@ -1234,7 +1234,7 @@ alloc_new_skb: }else if (i <MAX_SKB_FRAGS ) {if (copy >PAGE_SIZE ) copy =PAGE_SIZE ; - page =alloc_pages (sk->sk_allocation,0 ); + page =alloc_page (sk->sk_allocation);if (page =NULL ) { err = -ENOMEM ; goto error;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 7 lines · Robert P. J. Day
followup to my previous question, if that equivalence holds, does
this patch look like it would make sense?
kernel/kexec.c static struct page *kimage_alloc_page(struct kimage *image, · line 704
Quoted 8 lines
kernel/kexec.c +1
-1@@ -698,7 +698,7 @@ static struct page *kimage_alloc_page(struct kimage *image,kimage_entry_t *old;/* Allocate a page, if we run out of memory give up */ - page =kimage_alloc_pages (gfp_mask,0 ); + page =kimage_alloc_page (gfp_mask);if (!page)return NULL ;/* If the page cannot be used file it away */
Equivalence is limited to alloc_page, though :).
Regards,
Frederik
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
Quoted 10 lines · Frederik Deweerdt
Quoted 9 lines · Robert P. J. Day
followup to my previous question, if that equivalence holds, does
this patch look like it would make sense?kernel/kexec.c +0
-0@@ -698,7 +698,7 @@ static struct page *kimage_alloc_page(struct kimage *image,kimage_entry_t *old;
Quoted 7 lines
kernel/kexec.c static struct page *kimage_alloc_page(struct kimage *image, · line 704
Quoted 6 lines
kernel/kexec.c +1
-1/* Allocate a page, if we run out of memory give up */ - page =kimage_alloc_pages (gfp_mask,0 ); + page =kimage_alloc_page (gfp_mask);if (!page)return NULL ;/* If the page cannot be used file it away */ Equivalence is limited to
alloc_page, though :).
ah, quite right, i missed that. better tighten up the regular expression. thanks.
rday
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors