diff options
author | Fabian Frederick <fabf@skynet.be> | 2016-08-02 17:03:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 17:31:41 -0400 |
commit | bd721ea73e1f965569b40620538c942001f76294 (patch) | |
tree | 08fd008f4530e3bddcca019bd5ae6fb74d713fa5 | |
parent | ca945e71529c69f71b773b31f03a681876872117 (diff) |
treewide: replace obsolete _refok by __ref
There was only one use of __initdata_refok and __exit_refok
__init_refok was used 46 times against 82 for __ref.
Those definitions are obsolete since commit 312b1485fb50 ("Introduce new
section reference annotations tags: __ref, __refdata, __refconst")
This patch removes the following compatibility definitions and replaces
them treewide.
/* compatibility defines */
#define __init_refok __ref
#define __initdata_refok __refdata
#define __exit_refok __ref
I can also provide separate patches if necessary.
(One patch per tree and check in 1 month or 2 to remove old definitions)
[akpm@linux-foundation.org: coding-style fixes]
Link: http://lkml.kernel.org/r/1466796271-3043-1-git-send-email-fabf@skynet.be
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
36 files changed, 46 insertions, 53 deletions
diff --git a/arch/alpha/kernel/machvec_impl.h b/arch/alpha/kernel/machvec_impl.h index f54bdf658cd0..d3398f6ab74c 100644 --- a/arch/alpha/kernel/machvec_impl.h +++ b/arch/alpha/kernel/machvec_impl.h | |||
@@ -137,7 +137,7 @@ | |||
137 | #define __initmv __initdata | 137 | #define __initmv __initdata |
138 | #define ALIAS_MV(x) | 138 | #define ALIAS_MV(x) |
139 | #else | 139 | #else |
140 | #define __initmv __initdata_refok | 140 | #define __initmv __refdata |
141 | 141 | ||
142 | /* GCC actually has a syntax for defining aliases, but is under some | 142 | /* GCC actually has a syntax for defining aliases, but is under some |
143 | delusion that you shouldn't be able to declare it extern somewhere | 143 | delusion that you shouldn't be able to declare it extern somewhere |
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index 8be930394750..399e2f223d25 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c | |||
@@ -220,7 +220,7 @@ void __init mem_init(void) | |||
220 | /* | 220 | /* |
221 | * free_initmem: Free all the __init memory. | 221 | * free_initmem: Free all the __init memory. |
222 | */ | 222 | */ |
223 | void __init_refok free_initmem(void) | 223 | void __ref free_initmem(void) |
224 | { | 224 | { |
225 | free_initmem_default(-1); | 225 | free_initmem_default(-1); |
226 | } | 226 | } |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 38b0da300dd5..ed9a01484030 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -320,11 +320,11 @@ static struct impd1_device impd1_devs[] = { | |||
320 | #define IMPD1_VALID_IRQS 0x00000bffU | 320 | #define IMPD1_VALID_IRQS 0x00000bffU |
321 | 321 | ||
322 | /* | 322 | /* |
323 | * As this module is bool, it is OK to have this as __init_refok() - no | 323 | * As this module is bool, it is OK to have this as __ref() - no |
324 | * probe calls will be done after the initial system bootup, as devices | 324 | * probe calls will be done after the initial system bootup, as devices |
325 | * are discovered as part of the machine startup. | 325 | * are discovered as part of the machine startup. |
326 | */ | 326 | */ |
327 | static int __init_refok impd1_probe(struct lm_device *dev) | 327 | static int __ref impd1_probe(struct lm_device *dev) |
328 | { | 328 | { |
329 | struct impd1_module *impd1; | 329 | struct impd1_module *impd1; |
330 | int irq_base; | 330 | int irq_base; |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 45a05207b418..6af5430d0d97 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -343,7 +343,7 @@ void __init mv78xx0_init_early(void) | |||
343 | DDR_WINDOW_CPU1_BASE, DDR_WINDOW_CPU_SZ); | 343 | DDR_WINDOW_CPU1_BASE, DDR_WINDOW_CPU_SZ); |
344 | } | 344 | } |
345 | 345 | ||
346 | void __init_refok mv78xx0_timer_init(void) | 346 | void __ref mv78xx0_timer_init(void) |
347 | { | 347 | { |
348 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, | 348 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, |
349 | IRQ_MV78XX0_TIMER_1, get_tclk()); | 349 | IRQ_MV78XX0_TIMER_1, get_tclk()); |
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c index 166842de3dc7..b59cd7c3261a 100644 --- a/arch/blackfin/mm/init.c +++ b/arch/blackfin/mm/init.c | |||
@@ -112,7 +112,7 @@ void __init free_initrd_mem(unsigned long start, unsigned long end) | |||
112 | } | 112 | } |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | void __init_refok free_initmem(void) | 115 | void __ref free_initmem(void) |
116 | { | 116 | { |
117 | #if defined CONFIG_RAMKERNEL && !defined CONFIG_MPU | 117 | #if defined CONFIG_RAMKERNEL && !defined CONFIG_MPU |
118 | free_initmem_default(-1); | 118 | free_initmem_default(-1); |
diff --git a/arch/hexagon/mm/init.c b/arch/hexagon/mm/init.c index 88977e42af0a..192584d5ac2f 100644 --- a/arch/hexagon/mm/init.c +++ b/arch/hexagon/mm/init.c | |||
@@ -93,7 +93,7 @@ void __init mem_init(void) | |||
93 | * Todo: free pages between __init_begin and __init_end; possibly | 93 | * Todo: free pages between __init_begin and __init_end; possibly |
94 | * some devtree related stuff as well. | 94 | * some devtree related stuff as well. |
95 | */ | 95 | */ |
96 | void __init_refok free_initmem(void) | 96 | void __ref free_initmem(void) |
97 | { | 97 | { |
98 | } | 98 | } |
99 | 99 | ||
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 07a4e32ae96a..eb9220cde76c 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -1831,7 +1831,7 @@ format_mca_init_stack(void *mca_data, unsigned long offset, | |||
1831 | } | 1831 | } |
1832 | 1832 | ||
1833 | /* Caller prevents this from being called after init */ | 1833 | /* Caller prevents this from being called after init */ |
1834 | static void * __init_refok mca_bootmem(void) | 1834 | static void * __ref mca_bootmem(void) |
1835 | { | 1835 | { |
1836 | return __alloc_bootmem(sizeof(struct ia64_mca_cpu), | 1836 | return __alloc_bootmem(sizeof(struct ia64_mca_cpu), |
1837 | KERNEL_STACK_SIZE, 0); | 1837 | KERNEL_STACK_SIZE, 0); |
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 77bc7c7e6522..434639f9a3a6 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -414,7 +414,7 @@ void __init *early_get_page(void) | |||
414 | 414 | ||
415 | #endif /* CONFIG_MMU */ | 415 | #endif /* CONFIG_MMU */ |
416 | 416 | ||
417 | void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask) | 417 | void * __ref alloc_maybe_bootmem(size_t size, gfp_t mask) |
418 | { | 418 | { |
419 | if (mem_init_done) | 419 | if (mem_init_done) |
420 | return kmalloc(size, mask); | 420 | return kmalloc(size, mask); |
@@ -422,7 +422,7 @@ void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask) | |||
422 | return alloc_bootmem(size); | 422 | return alloc_bootmem(size); |
423 | } | 423 | } |
424 | 424 | ||
425 | void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask) | 425 | void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask) |
426 | { | 426 | { |
427 | void *p; | 427 | void *p; |
428 | 428 | ||
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c index eb99fcc76088..cc732fe357ad 100644 --- a/arch/microblaze/mm/pgtable.c +++ b/arch/microblaze/mm/pgtable.c | |||
@@ -234,7 +234,7 @@ unsigned long iopa(unsigned long addr) | |||
234 | return pa; | 234 | return pa; |
235 | } | 235 | } |
236 | 236 | ||
237 | __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 237 | __ref pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
238 | unsigned long address) | 238 | unsigned long address) |
239 | { | 239 | { |
240 | pte_t *pte; | 240 | pte_t *pte; |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 9b58eb5fd0d5..a5509e7dcad2 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -504,7 +504,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
504 | 504 | ||
505 | void (*free_init_pages_eva)(void *begin, void *end) = NULL; | 505 | void (*free_init_pages_eva)(void *begin, void *end) = NULL; |
506 | 506 | ||
507 | void __init_refok free_initmem(void) | 507 | void __ref free_initmem(void) |
508 | { | 508 | { |
509 | prom_free_prom_memory(); | 509 | prom_free_prom_memory(); |
510 | /* | 510 | /* |
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c index a77698ff2b6f..1f6bc9a3036c 100644 --- a/arch/mips/txx9/generic/pci.c +++ b/arch/mips/txx9/generic/pci.c | |||
@@ -268,7 +268,7 @@ static int txx9_i8259_irq_setup(int irq) | |||
268 | return err; | 268 | return err; |
269 | } | 269 | } |
270 | 270 | ||
271 | static void __init_refok quirk_slc90e66_bridge(struct pci_dev *dev) | 271 | static void __ref quirk_slc90e66_bridge(struct pci_dev *dev) |
272 | { | 272 | { |
273 | int irq; /* PCI/ISA Bridge interrupt */ | 273 | int irq; /* PCI/ISA Bridge interrupt */ |
274 | u8 reg_64; | 274 | u8 reg_64; |
diff --git a/arch/nios2/mm/init.c b/arch/nios2/mm/init.c index e75c75d249d6..c92fe4234009 100644 --- a/arch/nios2/mm/init.c +++ b/arch/nios2/mm/init.c | |||
@@ -89,7 +89,7 @@ void __init free_initrd_mem(unsigned long start, unsigned long end) | |||
89 | } | 89 | } |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | void __init_refok free_initmem(void) | 92 | void __ref free_initmem(void) |
93 | { | 93 | { |
94 | free_initmem_default(-1); | 94 | free_initmem_default(-1); |
95 | } | 95 | } |
diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c index 5b2a95116e8f..fa60b81aee3e 100644 --- a/arch/openrisc/mm/ioremap.c +++ b/arch/openrisc/mm/ioremap.c | |||
@@ -38,7 +38,7 @@ static unsigned int fixmaps_used __initdata; | |||
38 | * have to convert them into an offset in a page-aligned mapping, but the | 38 | * have to convert them into an offset in a page-aligned mapping, but the |
39 | * caller shouldn't need to know that small detail. | 39 | * caller shouldn't need to know that small detail. |
40 | */ | 40 | */ |
41 | void __iomem *__init_refok | 41 | void __iomem *__ref |
42 | __ioremap(phys_addr_t addr, unsigned long size, pgprot_t prot) | 42 | __ioremap(phys_addr_t addr, unsigned long size, pgprot_t prot) |
43 | { | 43 | { |
44 | phys_addr_t p; | 44 | phys_addr_t p; |
@@ -116,7 +116,7 @@ void iounmap(void *addr) | |||
116 | * the memblock infrastructure. | 116 | * the memblock infrastructure. |
117 | */ | 117 | */ |
118 | 118 | ||
119 | pte_t __init_refok *pte_alloc_one_kernel(struct mm_struct *mm, | 119 | pte_t __ref *pte_alloc_one_kernel(struct mm_struct *mm, |
120 | unsigned long address) | 120 | unsigned long address) |
121 | { | 121 | { |
122 | pte_t *pte; | 122 | pte_t *pte; |
diff --git a/arch/powerpc/lib/alloc.c b/arch/powerpc/lib/alloc.c index 60b0b3fc8fc1..a58abe4afbd1 100644 --- a/arch/powerpc/lib/alloc.c +++ b/arch/powerpc/lib/alloc.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <asm/setup.h> | 6 | #include <asm/setup.h> |
7 | 7 | ||
8 | 8 | ||
9 | void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask) | 9 | void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask) |
10 | { | 10 | { |
11 | void *p; | 11 | void *p; |
12 | 12 | ||
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 7f922f557936..0ae0572bc239 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -79,7 +79,7 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd) | |||
79 | #endif | 79 | #endif |
80 | } | 80 | } |
81 | 81 | ||
82 | __init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 82 | __ref pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
83 | { | 83 | { |
84 | pte_t *pte; | 84 | pte_t *pte; |
85 | 85 | ||
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 3de4a7c85140..6b4e9d181126 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -353,12 +353,12 @@ static int pmac_late_init(void) | |||
353 | machine_late_initcall(powermac, pmac_late_init); | 353 | machine_late_initcall(powermac, pmac_late_init); |
354 | 354 | ||
355 | /* | 355 | /* |
356 | * This is __init_refok because we check for "initializing" before | 356 | * This is __ref because we check for "initializing" before |
357 | * touching any of the __init sensitive things and "initializing" | 357 | * touching any of the __init sensitive things and "initializing" |
358 | * will be false after __init time. This can't be __init because it | 358 | * will be false after __init time. This can't be __init because it |
359 | * can be called whenever a disk is first accessed. | 359 | * can be called whenever a disk is first accessed. |
360 | */ | 360 | */ |
361 | void __init_refok note_bootable_part(dev_t dev, int part, int goodness) | 361 | void __ref note_bootable_part(dev_t dev, int part, int goodness) |
362 | { | 362 | { |
363 | char *p; | 363 | char *p; |
364 | 364 | ||
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index 3f175e8aedb4..57caaf11a83f 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -189,7 +189,7 @@ fail_malloc: | |||
189 | return result; | 189 | return result; |
190 | } | 190 | } |
191 | 191 | ||
192 | static int __init_refok ps3_setup_uhc_device( | 192 | static int __ref ps3_setup_uhc_device( |
193 | const struct ps3_repository_device *repo, enum ps3_match_id match_id, | 193 | const struct ps3_repository_device *repo, enum ps3_match_id match_id, |
194 | enum ps3_interrupt_type interrupt_type, enum ps3_reg_type reg_type) | 194 | enum ps3_interrupt_type interrupt_type, enum ps3_reg_type reg_type) |
195 | { | 195 | { |
diff --git a/arch/powerpc/sysdev/msi_bitmap.c b/arch/powerpc/sysdev/msi_bitmap.c index ed5234ed8d3f..5ebd3f018295 100644 --- a/arch/powerpc/sysdev/msi_bitmap.c +++ b/arch/powerpc/sysdev/msi_bitmap.c | |||
@@ -112,7 +112,7 @@ int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp) | |||
112 | return 0; | 112 | return 0; |
113 | } | 113 | } |
114 | 114 | ||
115 | int __init_refok msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count, | 115 | int __ref msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count, |
116 | struct device_node *of_node) | 116 | struct device_node *of_node) |
117 | { | 117 | { |
118 | int size; | 118 | int size; |
diff --git a/arch/score/mm/init.c b/arch/score/mm/init.c index 9fbce49ad3bd..444c26c0f750 100644 --- a/arch/score/mm/init.c +++ b/arch/score/mm/init.c | |||
@@ -91,7 +91,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
91 | } | 91 | } |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | void __init_refok free_initmem(void) | 94 | void __ref free_initmem(void) |
95 | { | 95 | { |
96 | free_initmem_default(POISON_FREE_INITMEM); | 96 | free_initmem_default(POISON_FREE_INITMEM); |
97 | } | 97 | } |
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index d5462b7bc514..84563e39a5b8 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
@@ -221,7 +221,7 @@ pcibios_bus_report_status_early(struct pci_channel *hose, | |||
221 | * We can't use pci_find_device() here since we are | 221 | * We can't use pci_find_device() here since we are |
222 | * called from interrupt context. | 222 | * called from interrupt context. |
223 | */ | 223 | */ |
224 | static void __init_refok | 224 | static void __ref |
225 | pcibios_bus_report_status(struct pci_bus *bus, unsigned int status_mask, | 225 | pcibios_bus_report_status(struct pci_bus *bus, unsigned int status_mask, |
226 | int warn) | 226 | int warn) |
227 | { | 227 | { |
@@ -256,7 +256,7 @@ pcibios_bus_report_status(struct pci_bus *bus, unsigned int status_mask, | |||
256 | pcibios_bus_report_status(dev->subordinate, status_mask, warn); | 256 | pcibios_bus_report_status(dev->subordinate, status_mask, warn); |
257 | } | 257 | } |
258 | 258 | ||
259 | void __init_refok pcibios_report_status(unsigned int status_mask, int warn) | 259 | void __ref pcibios_report_status(unsigned int status_mask, int warn) |
260 | { | 260 | { |
261 | struct pci_channel *hose; | 261 | struct pci_channel *hose; |
262 | 262 | ||
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index 0c99ec2e7ed8..d09ddfe58fd8 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c | |||
@@ -34,7 +34,7 @@ | |||
34 | * have to convert them into an offset in a page-aligned mapping, but the | 34 | * have to convert them into an offset in a page-aligned mapping, but the |
35 | * caller shouldn't need to know that small detail. | 35 | * caller shouldn't need to know that small detail. |
36 | */ | 36 | */ |
37 | void __iomem * __init_refok | 37 | void __iomem * __ref |
38 | __ioremap_caller(phys_addr_t phys_addr, unsigned long size, | 38 | __ioremap_caller(phys_addr_t phys_addr, unsigned long size, |
39 | pgprot_t pgprot, void *caller) | 39 | pgprot_t pgprot, void *caller) |
40 | { | 40 | { |
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index fb4c1b42fc7e..620928903be3 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -208,7 +208,7 @@ static int __meminit save_mr(struct map_range *mr, int nr_range, | |||
208 | * adjust the page_size_mask for small range to go with | 208 | * adjust the page_size_mask for small range to go with |
209 | * big page size instead small one if nearby are ram too. | 209 | * big page size instead small one if nearby are ram too. |
210 | */ | 210 | */ |
211 | static void __init_refok adjust_range_page_size_mask(struct map_range *mr, | 211 | static void __ref adjust_range_page_size_mask(struct map_range *mr, |
212 | int nr_range) | 212 | int nr_range) |
213 | { | 213 | { |
214 | int i; | 214 | int i; |
@@ -396,7 +396,7 @@ bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn) | |||
396 | * This runs before bootmem is initialized and gets pages directly from | 396 | * This runs before bootmem is initialized and gets pages directly from |
397 | * the physical memory. To access them they are temporarily mapped. | 397 | * the physical memory. To access them they are temporarily mapped. |
398 | */ | 398 | */ |
399 | unsigned long __init_refok init_memory_mapping(unsigned long start, | 399 | unsigned long __ref init_memory_mapping(unsigned long start, |
400 | unsigned long end) | 400 | unsigned long end) |
401 | { | 401 | { |
402 | struct map_range mr[NR_RANGE_MR]; | 402 | struct map_range mr[NR_RANGE_MR]; |
diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c index 524142117296..5fdacb322ceb 100644 --- a/arch/x86/platform/efi/early_printk.c +++ b/arch/x86/platform/efi/early_printk.c | |||
@@ -44,7 +44,7 @@ early_initcall(early_efi_map_fb); | |||
44 | * In case earlyprintk=efi,keep we have the whole framebuffer mapped already | 44 | * In case earlyprintk=efi,keep we have the whole framebuffer mapped already |
45 | * so just return the offset efi_fb + start. | 45 | * so just return the offset efi_fb + start. |
46 | */ | 46 | */ |
47 | static __init_refok void *early_efi_map(unsigned long start, unsigned long len) | 47 | static __ref void *early_efi_map(unsigned long start, unsigned long len) |
48 | { | 48 | { |
49 | unsigned long base; | 49 | unsigned long base; |
50 | 50 | ||
@@ -56,7 +56,7 @@ static __init_refok void *early_efi_map(unsigned long start, unsigned long len) | |||
56 | return early_ioremap(base + start, len); | 56 | return early_ioremap(base + start, len); |
57 | } | 57 | } |
58 | 58 | ||
59 | static __init_refok void early_efi_unmap(void *addr, unsigned long len) | 59 | static __ref void early_efi_unmap(void *addr, unsigned long len) |
60 | { | 60 | { |
61 | if (!efi_fb) | 61 | if (!efi_fb) |
62 | early_iounmap(addr, len); | 62 | early_iounmap(addr, len); |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index b108f1358a32..4305ee9db4b2 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -309,7 +309,7 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr) | |||
309 | * During early init (when acpi_gbl_permanent_mmap has not been set yet) this | 309 | * During early init (when acpi_gbl_permanent_mmap has not been set yet) this |
310 | * routine simply calls __acpi_map_table() to get the job done. | 310 | * routine simply calls __acpi_map_table() to get the job done. |
311 | */ | 311 | */ |
312 | void __iomem *__init_refok | 312 | void __iomem *__ref |
313 | acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) | 313 | acpi_os_map_iomem(acpi_physical_address phys, acpi_size size) |
314 | { | 314 | { |
315 | struct acpi_ioremap *map; | 315 | struct acpi_ioremap *map; |
@@ -362,8 +362,7 @@ out: | |||
362 | } | 362 | } |
363 | EXPORT_SYMBOL_GPL(acpi_os_map_iomem); | 363 | EXPORT_SYMBOL_GPL(acpi_os_map_iomem); |
364 | 364 | ||
365 | void *__init_refok | 365 | void *__ref acpi_os_map_memory(acpi_physical_address phys, acpi_size size) |
366 | acpi_os_map_memory(acpi_physical_address phys, acpi_size size) | ||
367 | { | 366 | { |
368 | return (void *)acpi_os_map_iomem(phys, size); | 367 | return (void *)acpi_os_map_iomem(phys, size); |
369 | } | 368 | } |
diff --git a/drivers/base/node.c b/drivers/base/node.c index 29cd96661b30..5548f9686016 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -370,7 +370,7 @@ int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) | |||
370 | #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE | 370 | #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE |
371 | #define page_initialized(page) (page->lru.next) | 371 | #define page_initialized(page) (page->lru.next) |
372 | 372 | ||
373 | static int __init_refok get_nid_for_pfn(unsigned long pfn) | 373 | static int __ref get_nid_for_pfn(unsigned long pfn) |
374 | { | 374 | { |
375 | struct page *page; | 375 | struct page *page; |
376 | 376 | ||
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 89cc700fbc37..97ae60fa1584 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c | |||
@@ -250,7 +250,7 @@ struct clk_lookup_alloc { | |||
250 | char con_id[MAX_CON_ID]; | 250 | char con_id[MAX_CON_ID]; |
251 | }; | 251 | }; |
252 | 252 | ||
253 | static struct clk_lookup * __init_refok | 253 | static struct clk_lookup * __ref |
254 | vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt, | 254 | vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt, |
255 | va_list ap) | 255 | va_list ap) |
256 | { | 256 | { |
@@ -287,7 +287,7 @@ vclkdev_create(struct clk_hw *hw, const char *con_id, const char *dev_fmt, | |||
287 | return cl; | 287 | return cl; |
288 | } | 288 | } |
289 | 289 | ||
290 | struct clk_lookup * __init_refok | 290 | struct clk_lookup * __ref |
291 | clkdev_alloc(struct clk *clk, const char *con_id, const char *dev_fmt, ...) | 291 | clkdev_alloc(struct clk *clk, const char *con_id, const char *dev_fmt, ...) |
292 | { | 292 | { |
293 | struct clk_lookup *cl; | 293 | struct clk_lookup *cl; |
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 5f70fee59a94..d6ff5e82377d 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -1086,7 +1086,7 @@ out: | |||
1086 | return err; | 1086 | return err; |
1087 | } | 1087 | } |
1088 | 1088 | ||
1089 | static void __init_refok pcifront_backend_changed(struct xenbus_device *xdev, | 1089 | static void __ref pcifront_backend_changed(struct xenbus_device *xdev, |
1090 | enum xenbus_state be_state) | 1090 | enum xenbus_state be_state) |
1091 | { | 1091 | { |
1092 | struct pcifront_device *pdev = dev_get_drvdata(&xdev->dev); | 1092 | struct pcifront_device *pdev = dev_get_drvdata(&xdev->dev); |
diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c index 10fbfd8ab963..b6bc4a0bda2a 100644 --- a/drivers/video/logo/logo.c +++ b/drivers/video/logo/logo.c | |||
@@ -36,11 +36,11 @@ static int __init fb_logo_late_init(void) | |||
36 | 36 | ||
37 | late_initcall(fb_logo_late_init); | 37 | late_initcall(fb_logo_late_init); |
38 | 38 | ||
39 | /* logo's are marked __initdata. Use __init_refok to tell | 39 | /* logo's are marked __initdata. Use __ref to tell |
40 | * modpost that it is intended that this function uses data | 40 | * modpost that it is intended that this function uses data |
41 | * marked __initdata. | 41 | * marked __initdata. |
42 | */ | 42 | */ |
43 | const struct linux_logo * __init_refok fb_find_logo(int depth) | 43 | const struct linux_logo * __ref fb_find_logo(int depth) |
44 | { | 44 | { |
45 | const struct linux_logo *logo = NULL; | 45 | const struct linux_logo *logo = NULL; |
46 | 46 | ||
diff --git a/include/acpi/acpi_io.h b/include/acpi/acpi_io.h index dd86c5fc102d..d7d0f495a34e 100644 --- a/include/acpi/acpi_io.h +++ b/include/acpi/acpi_io.h | |||
@@ -13,7 +13,7 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, | |||
13 | } | 13 | } |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | void __iomem *__init_refok | 16 | void __iomem *__ref |
17 | acpi_os_map_iomem(acpi_physical_address phys, acpi_size size); | 17 | acpi_os_map_iomem(acpi_physical_address phys, acpi_size size); |
18 | void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size); | 18 | void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size); |
19 | void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size); | 19 | void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size); |
diff --git a/include/linux/init.h b/include/linux/init.h index aedb254abc37..6935d02474aa 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -77,12 +77,6 @@ | |||
77 | #define __refdata __section(.ref.data) | 77 | #define __refdata __section(.ref.data) |
78 | #define __refconst __constsection(.ref.rodata) | 78 | #define __refconst __constsection(.ref.rodata) |
79 | 79 | ||
80 | /* compatibility defines */ | ||
81 | #define __init_refok __ref | ||
82 | #define __initdata_refok __refdata | ||
83 | #define __exit_refok __ref | ||
84 | |||
85 | |||
86 | #ifdef MODULE | 80 | #ifdef MODULE |
87 | #define __exitused | 81 | #define __exitused |
88 | #else | 82 | #else |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 4089abc6e9c0..0933c7455a30 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -275,7 +275,7 @@ static inline struct net *read_pnet(const possible_net_t *pnet) | |||
275 | #define __net_initconst | 275 | #define __net_initconst |
276 | #else | 276 | #else |
277 | #define __net_init __init | 277 | #define __net_init __init |
278 | #define __net_exit __exit_refok | 278 | #define __net_exit __ref |
279 | #define __net_initdata __initdata | 279 | #define __net_initdata __initdata |
280 | #define __net_initconst __initconst | 280 | #define __net_initconst __initconst |
281 | #endif | 281 | #endif |
diff --git a/init/main.c b/init/main.c index eae02aa03c9e..e7345dcaaf05 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -380,7 +380,7 @@ static void __init setup_command_line(char *command_line) | |||
380 | 380 | ||
381 | static __initdata DECLARE_COMPLETION(kthreadd_done); | 381 | static __initdata DECLARE_COMPLETION(kthreadd_done); |
382 | 382 | ||
383 | static noinline void __init_refok rest_init(void) | 383 | static noinline void __ref rest_init(void) |
384 | { | 384 | { |
385 | int pid; | 385 | int pid; |
386 | 386 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ea759b935360..39a372a2a1d6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -5276,7 +5276,7 @@ void __init setup_per_cpu_pageset(void) | |||
5276 | setup_zone_pageset(zone); | 5276 | setup_zone_pageset(zone); |
5277 | } | 5277 | } |
5278 | 5278 | ||
5279 | static noinline __init_refok | 5279 | static noinline __ref |
5280 | int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) | 5280 | int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) |
5281 | { | 5281 | { |
5282 | int i; | 5282 | int i; |
@@ -5903,7 +5903,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat) | |||
5903 | } | 5903 | } |
5904 | } | 5904 | } |
5905 | 5905 | ||
5906 | static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat) | 5906 | static void __ref alloc_node_mem_map(struct pglist_data *pgdat) |
5907 | { | 5907 | { |
5908 | unsigned long __maybe_unused start = 0; | 5908 | unsigned long __maybe_unused start = 0; |
5909 | unsigned long __maybe_unused offset = 0; | 5909 | unsigned long __maybe_unused offset = 0; |
@@ -1877,7 +1877,7 @@ static struct array_cache __percpu *alloc_kmem_cache_cpus( | |||
1877 | return cpu_cache; | 1877 | return cpu_cache; |
1878 | } | 1878 | } |
1879 | 1879 | ||
1880 | static int __init_refok setup_cpu_cache(struct kmem_cache *cachep, gfp_t gfp) | 1880 | static int __ref setup_cpu_cache(struct kmem_cache *cachep, gfp_t gfp) |
1881 | { | 1881 | { |
1882 | if (slab_state >= FULL) | 1882 | if (slab_state >= FULL) |
1883 | return enable_cpucache(cachep, gfp); | 1883 | return enable_cpucache(cachep, gfp); |
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index 68885dcbaf40..574c67b663fe 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c | |||
@@ -36,7 +36,7 @@ | |||
36 | * Uses the main allocators if they are available, else bootmem. | 36 | * Uses the main allocators if they are available, else bootmem. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | static void * __init_refok __earlyonly_bootmem_alloc(int node, | 39 | static void * __ref __earlyonly_bootmem_alloc(int node, |
40 | unsigned long size, | 40 | unsigned long size, |
41 | unsigned long align, | 41 | unsigned long align, |
42 | unsigned long goal) | 42 | unsigned long goal) |
diff --git a/mm/sparse.c b/mm/sparse.c index 36d7bbb80e49..1e168bf2779a 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -59,7 +59,7 @@ static inline void set_section_nid(unsigned long section_nr, int nid) | |||
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | #ifdef CONFIG_SPARSEMEM_EXTREME | 61 | #ifdef CONFIG_SPARSEMEM_EXTREME |
62 | static struct mem_section noinline __init_refok *sparse_index_alloc(int nid) | 62 | static noinline struct mem_section __ref *sparse_index_alloc(int nid) |
63 | { | 63 | { |
64 | struct mem_section *section = NULL; | 64 | struct mem_section *section = NULL; |
65 | unsigned long array_size = SECTIONS_PER_ROOT * | 65 | unsigned long array_size = SECTIONS_PER_ROOT * |