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 tag 'remove-weak-declarations' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull weak function declaration removal from Bjorn Helgaas:
"The "weak" attribute is commonly used for the default version of a
function, where an architecture can override it by providing a strong
version.

Some header file declarations included the "weak" attribute. That's
error-prone because it causes every implementation to be weak, with no
strong version at all, and the linker chooses one based on link order.

What we want is the "weak" attribute only on the *definition* of the
default implementation. These changes remove "weak" from the
declarations, leaving it on the default definitions"

* tag 'remove-weak-declarations' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
uprobes: Remove "weak" from function declarations
memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration
kgdb: Remove "weak" from kgdb_arch_pc() declaration
ARC: kgdb: generic kgdb_arch_pc() suffices
vmcore: Remove "weak" from function declarations
clocksource: Remove "weak" from clocksource_default_clock() declaration
x86, intel-mid: Remove "weak" from function declarations
audit: Remove "weak" from audit_classify_compat_syscall() declaration

+21 -28
-5
arch/arc/kernel/kgdb.c
··· 158 158 return -1; 159 159 } 160 160 161 - unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs) 162 - { 163 - return instruction_pointer(regs); 164 - } 165 - 166 161 int kgdb_arch_init(void) 167 162 { 168 163 single_step_data.armed = 0;
+3 -4
arch/x86/platform/intel-mid/intel_mid_weak_decls.h
··· 10 10 */ 11 11 12 12 13 - /* __attribute__((weak)) makes these declarations overridable */ 14 13 /* For every CPU addition a new get_<cpuname>_ops interface needs 15 14 * to be added. 16 15 */ 17 - extern void *get_penwell_ops(void) __attribute__((weak)); 18 - extern void *get_cloverview_ops(void) __attribute__((weak)); 19 - extern void *get_tangier_ops(void) __attribute__((weak)); 16 + extern void *get_penwell_ops(void); 17 + extern void *get_cloverview_ops(void); 18 + extern void *get_tangier_ops(void);
+1 -1
include/linux/audit.h
··· 90 90 extern unsigned compat_chattr_class[]; 91 91 extern unsigned compat_signal_class[]; 92 92 93 - extern int __weak audit_classify_compat_syscall(int abi, unsigned syscall); 93 + extern int audit_classify_compat_syscall(int abi, unsigned syscall); 94 94 95 95 /* audit_names->type values */ 96 96 #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */
+1 -1
include/linux/clocksource.h
··· 287 287 extern void clocksource_change_rating(struct clocksource *cs, int rating); 288 288 extern void clocksource_suspend(void); 289 289 extern void clocksource_resume(void); 290 - extern struct clocksource * __init __weak clocksource_default_clock(void); 290 + extern struct clocksource * __init clocksource_default_clock(void); 291 291 extern void clocksource_mark_unstable(struct clocksource *cs); 292 292 293 293 extern u64
+7 -8
include/linux/crash_dump.h
··· 14 14 extern unsigned long long elfcorehdr_addr; 15 15 extern unsigned long long elfcorehdr_size; 16 16 17 - extern int __weak elfcorehdr_alloc(unsigned long long *addr, 18 - unsigned long long *size); 19 - extern void __weak elfcorehdr_free(unsigned long long addr); 20 - extern ssize_t __weak elfcorehdr_read(char *buf, size_t count, u64 *ppos); 21 - extern ssize_t __weak elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); 22 - extern int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma, 23 - unsigned long from, unsigned long pfn, 24 - unsigned long size, pgprot_t prot); 17 + extern int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size); 18 + extern void elfcorehdr_free(unsigned long long addr); 19 + extern ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos); 20 + extern ssize_t elfcorehdr_read_notes(char *buf, size_t count, u64 *ppos); 21 + extern int remap_oldmem_pfn_range(struct vm_area_struct *vma, 22 + unsigned long from, unsigned long pfn, 23 + unsigned long size, pgprot_t prot); 25 24 26 25 extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, 27 26 unsigned long, int);
+1 -1
include/linux/kgdb.h
··· 283 283 284 284 extern struct kgdb_arch arch_kgdb_ops; 285 285 286 - extern unsigned long __weak kgdb_arch_pc(int exception, struct pt_regs *regs); 286 + extern unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs); 287 287 288 288 #ifdef CONFIG_SERIAL_KGDB_NMI 289 289 extern int kgdb_register_nmi_console(void);
+1 -1
include/linux/memory.h
··· 35 35 }; 36 36 37 37 int arch_get_memory_phys_device(unsigned long start_pfn); 38 - unsigned long __weak memory_block_size_bytes(void); 38 + unsigned long memory_block_size_bytes(void); 39 39 40 40 /* These states are exposed to userspace as text strings in sysfs */ 41 41 #define MEM_ONLINE (1<<0) /* exposed to userspace */
+7 -7
include/linux/uprobes.h
··· 98 98 struct xol_area *xol_area; 99 99 }; 100 100 101 - extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 102 - extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 103 - extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); 104 - extern bool __weak is_trap_insn(uprobe_opcode_t *insn); 105 - extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); 101 + extern int set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 102 + extern int set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 103 + extern bool is_swbp_insn(uprobe_opcode_t *insn); 104 + extern bool is_trap_insn(uprobe_opcode_t *insn); 105 + extern unsigned long uprobe_get_swbp_addr(struct pt_regs *regs); 106 106 extern unsigned long uprobe_get_trap_addr(struct pt_regs *regs); 107 107 extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t); 108 108 extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); ··· 128 128 extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data); 129 129 extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs); 130 130 extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs); 131 - extern bool __weak arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs); 132 - extern void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, 131 + extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs); 132 + extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, 133 133 void *src, unsigned long len); 134 134 #else /* !CONFIG_UPROBES */ 135 135 struct uprobes_state {