Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6

* 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6:
SFI: remove __init from sfi_verify_table
SFI: fix section mismatch warnings in sfi_core.c

+13 -4
+13 -4
drivers/sfi/sfi_core.c
··· 90 90 */ 91 91 static u32 sfi_use_ioremap __read_mostly; 92 92 93 - static void __iomem *sfi_map_memory(u64 phys, u32 size) 93 + /* 94 + * sfi_un/map_memory calls early_ioremap/iounmap which is a __init function 95 + * and introduces section mismatch. So use __ref to make it calm. 96 + */ 97 + static void __iomem * __ref sfi_map_memory(u64 phys, u32 size) 94 98 { 95 99 if (!phys || !size) 96 100 return NULL; ··· 105 101 return early_ioremap(phys, size); 106 102 } 107 103 108 - static void sfi_unmap_memory(void __iomem *virt, u32 size) 104 + static void __ref sfi_unmap_memory(void __iomem *virt, u32 size) 109 105 { 110 106 if (!virt || !size) 111 107 return; ··· 129 125 * sfi_verify_table() 130 126 * Sanity check table lengh, calculate checksum 131 127 */ 132 - static __init int sfi_verify_table(struct sfi_table_header *table) 128 + static int sfi_verify_table(struct sfi_table_header *table) 133 129 { 134 130 135 131 u8 checksum = 0; ··· 217 213 * the mapped virt address will be returned, and the virt space 218 214 * will be released by call sfi_put_table() later 219 215 * 216 + * This two cases are from two different functions with two different 217 + * sections and causes section mismatch warning. So use __ref to tell 218 + * modpost not to make any noise. 219 + * 220 220 * Return value: 221 221 * NULL: when can't find a table matching the key 222 222 * ERR_PTR(error): error value 223 223 * virt table address: when a matched table is found 224 224 */ 225 - struct sfi_table_header *sfi_check_table(u64 pa, struct sfi_table_key *key) 225 + struct sfi_table_header * 226 + __ref sfi_check_table(u64 pa, struct sfi_table_key *key) 226 227 { 227 228 struct sfi_table_header *th; 228 229 void *ret = NULL;