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

powerpc: Make a bunch of things static

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Anton Blanchard and committed by
Michael Ellerman
e51df2c1 5144b6bf

+43 -40
+1 -1
arch/powerpc/kernel/hw_breakpoint.c
··· 293 293 /* 294 294 * Handle single-step exceptions following a DABR hit. 295 295 */ 296 - int __kprobes single_step_dabr_instruction(struct die_args *args) 296 + static int __kprobes single_step_dabr_instruction(struct die_args *args) 297 297 { 298 298 struct pt_regs *regs = args->regs; 299 299 struct perf_event *bp = NULL;
+1 -1
arch/powerpc/kernel/nvram_64.c
··· 567 567 return rc; 568 568 } 569 569 570 - void __exit nvram_cleanup(void) 570 + static void __exit nvram_cleanup(void) 571 571 { 572 572 misc_deregister( &nvram_dev ); 573 573 }
+1 -1
arch/powerpc/kernel/pci-common.c
··· 1140 1140 * as well. 1141 1141 */ 1142 1142 1143 - void pcibios_allocate_bus_resources(struct pci_bus *bus) 1143 + static void pcibios_allocate_bus_resources(struct pci_bus *bus) 1144 1144 { 1145 1145 struct pci_bus *b; 1146 1146 int i;
+1 -1
arch/powerpc/kernel/pci_of_scan.c
··· 38 38 * @addr0: value of 1st cell of a device tree PCI address. 39 39 * @bridge: Set this flag if the address is from a bridge 'ranges' property 40 40 */ 41 - unsigned int pci_parse_of_flags(u32 addr0, int bridge) 41 + static unsigned int pci_parse_of_flags(u32 addr0, int bridge) 42 42 { 43 43 unsigned int flags = 0; 44 44
+3 -2
arch/powerpc/kernel/prom.c
··· 386 386 return 0; 387 387 } 388 388 389 - int __init early_init_dt_scan_chosen_ppc(unsigned long node, const char *uname, 390 - int depth, void *data) 389 + static int __init early_init_dt_scan_chosen_ppc(unsigned long node, 390 + const char *uname, 391 + int depth, void *data) 391 392 { 392 393 const unsigned long *lprop; /* All these set by kernel, so no need to convert endian */ 393 394
+1 -1
arch/powerpc/kernel/ptrace.c
··· 932 932 } 933 933 #endif /* CONFIG_HAVE_HW_BREAKPOINT */ 934 934 935 - int ptrace_set_debugreg(struct task_struct *task, unsigned long addr, 935 + static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr, 936 936 unsigned long data) 937 937 { 938 938 #ifdef CONFIG_HAVE_HW_BREAKPOINT
+1 -1
arch/powerpc/kernel/rtasd.c
··· 286 286 287 287 static DECLARE_WORK(prrn_work, prrn_work_fn); 288 288 289 - void prrn_schedule_update(u32 scope) 289 + static void prrn_schedule_update(u32 scope) 290 290 { 291 291 flush_work(&prrn_work); 292 292 prrn_update_scope = scope;
+2 -2
arch/powerpc/kernel/time.c
··· 479 479 480 480 #endif /* CONFIG_IRQ_WORK */ 481 481 482 - void __timer_interrupt(void) 482 + static void __timer_interrupt(void) 483 483 { 484 484 struct pt_regs *regs = get_irq_regs(); 485 485 u64 *next_tb = &__get_cpu_var(decrementers_next_tb); ··· 643 643 return found; 644 644 } 645 645 646 - void start_cpu_decrementer(void) 646 + static void start_cpu_decrementer(void) 647 647 { 648 648 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x) 649 649 /* Clear any pending timer interrupts */
+1 -1
arch/powerpc/lib/feature-fixups.c
··· 164 164 return (unsigned long)p - (unsigned long)entry; 165 165 } 166 166 167 - void test_basic_patching(void) 167 + static void test_basic_patching(void) 168 168 { 169 169 extern unsigned int ftr_fixup_test1; 170 170 extern unsigned int end_ftr_fixup_test1;
+1 -1
arch/powerpc/mm/hash_utils_64.c
··· 868 868 } 869 869 870 870 #ifdef CONFIG_PPC_MM_SLICES 871 - unsigned int get_paca_psize(unsigned long addr) 871 + static unsigned int get_paca_psize(unsigned long addr) 872 872 { 873 873 u64 lpsizes; 874 874 unsigned char *hpsizes;
+1 -1
arch/powerpc/mm/pgtable.c
··· 48 48 (_PAGE_PRESENT | _PAGE_USER); 49 49 } 50 50 51 - struct page * maybe_pte_to_page(pte_t pte) 51 + static struct page *maybe_pte_to_page(pte_t pte) 52 52 { 53 53 unsigned long pfn = pte_pfn(pte); 54 54 struct page *page;
+9 -9
arch/powerpc/perf/core-book3s.c
··· 59 59 struct perf_branch_entry bhrb_entries[BHRB_MAX_ENTRIES]; 60 60 }; 61 61 62 - DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events); 62 + static DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events); 63 63 64 - struct power_pmu *ppmu; 64 + static struct power_pmu *ppmu; 65 65 66 66 /* 67 67 * Normally, to ignore kernel events we set the FCS (freeze counters ··· 124 124 125 125 static inline void power_pmu_bhrb_enable(struct perf_event *event) {} 126 126 static inline void power_pmu_bhrb_disable(struct perf_event *event) {} 127 - void power_pmu_flush_branch_stack(void) {} 127 + static void power_pmu_flush_branch_stack(void) {} 128 128 static inline void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) {} 129 129 static void pmao_restore_workaround(bool ebb) { } 130 130 #endif /* CONFIG_PPC32 */ ··· 375 375 /* Called from ctxsw to prevent one process's branch entries to 376 376 * mingle with the other process's entries during context switch. 377 377 */ 378 - void power_pmu_flush_branch_stack(void) 378 + static void power_pmu_flush_branch_stack(void) 379 379 { 380 380 if (ppmu->bhrb_nr) 381 381 power_pmu_bhrb_reset(); ··· 408 408 } 409 409 410 410 /* Processing BHRB entries */ 411 - void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) 411 + static void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) 412 412 { 413 413 u64 val; 414 414 u64 addr; ··· 1573 1573 * Set the flag to make pmu::enable() not perform the 1574 1574 * schedulability test, it will be performed at commit time 1575 1575 */ 1576 - void power_pmu_start_txn(struct pmu *pmu) 1576 + static void power_pmu_start_txn(struct pmu *pmu) 1577 1577 { 1578 1578 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); 1579 1579 ··· 1587 1587 * Clear the flag and pmu::enable() will perform the 1588 1588 * schedulability test. 1589 1589 */ 1590 - void power_pmu_cancel_txn(struct pmu *pmu) 1590 + static void power_pmu_cancel_txn(struct pmu *pmu) 1591 1591 { 1592 1592 struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); 1593 1593 ··· 1600 1600 * Perform the group schedulability test as a whole 1601 1601 * Return 0 if success 1602 1602 */ 1603 - int power_pmu_commit_txn(struct pmu *pmu) 1603 + static int power_pmu_commit_txn(struct pmu *pmu) 1604 1604 { 1605 1605 struct cpu_hw_events *cpuhw; 1606 1606 long i, n; ··· 1888 1888 return sprintf(page, "event=0x%02llx\n", pmu_attr->id); 1889 1889 } 1890 1890 1891 - struct pmu power_pmu = { 1891 + static struct pmu power_pmu = { 1892 1892 .pmu_enable = power_pmu_enable, 1893 1893 .pmu_disable = power_pmu_disable, 1894 1894 .event_init = power_pmu_event_init,
+2 -2
arch/powerpc/platforms/powernv/eeh-ioda.c
··· 628 628 * Retrieve error log, which contains log from device driver 629 629 * and firmware. 630 630 */ 631 - int ioda_eeh_get_log(struct eeh_pe *pe, int severity, 632 - char *drv_log, unsigned long len) 631 + static int ioda_eeh_get_log(struct eeh_pe *pe, int severity, 632 + char *drv_log, unsigned long len) 633 633 { 634 634 pnv_pci_dump_phb_diag_data(pe->phb, pe->data); 635 635
+3 -3
arch/powerpc/platforms/powernv/pci-ioda.c
··· 385 385 } 386 386 } 387 387 388 - int pnv_ioda_unfreeze_pe(struct pnv_phb *phb, int pe_no, int opt) 388 + static int pnv_ioda_unfreeze_pe(struct pnv_phb *phb, int pe_no, int opt) 389 389 { 390 390 struct pnv_ioda_pe *pe, *slave; 391 391 s64 rc; ··· 1631 1631 OPAL_ASSERT_RESET); 1632 1632 } 1633 1633 1634 - void __init pnv_pci_init_ioda_phb(struct device_node *np, 1635 - u64 hub_id, int ioda_type) 1634 + static void __init pnv_pci_init_ioda_phb(struct device_node *np, 1635 + u64 hub_id, int ioda_type) 1636 1636 { 1637 1637 struct pci_controller *hose; 1638 1638 struct pnv_phb *phb;
+1 -1
arch/powerpc/platforms/powernv/setup.c
··· 307 307 * Returns the cpu frequency for 'cpu' in Hz. This is used by 308 308 * /proc/cpuinfo 309 309 */ 310 - unsigned long pnv_get_proc_freq(unsigned int cpu) 310 + static unsigned long pnv_get_proc_freq(unsigned int cpu) 311 311 { 312 312 unsigned long ret_freq; 313 313
+1 -1
arch/powerpc/platforms/powernv/smp.c
··· 54 54 #endif 55 55 } 56 56 57 - int pnv_smp_kick_cpu(int nr) 57 + static int pnv_smp_kick_cpu(int nr) 58 58 { 59 59 unsigned int pcpu = get_hard_smp_processor_id(nr); 60 60 unsigned long start_here =
+7 -5
arch/powerpc/platforms/pseries/nvram.c
··· 276 276 * sequence #: The unique sequence # for each event. (until it wraps) 277 277 * error log: The error log from event_scan 278 278 */ 279 - int nvram_write_os_partition(struct nvram_os_partition *part, char * buff, 280 - int length, unsigned int err_type, unsigned int error_log_cnt) 279 + static int nvram_write_os_partition(struct nvram_os_partition *part, 280 + char *buff, int length, 281 + unsigned int err_type, 282 + unsigned int error_log_cnt) 281 283 { 282 284 int rc; 283 285 loff_t tmp_index; ··· 332 330 * 333 331 * Reads nvram partition for at most 'length' 334 332 */ 335 - int nvram_read_partition(struct nvram_os_partition *part, char *buff, 336 - int length, unsigned int *err_type, 337 - unsigned int *error_log_cnt) 333 + static int nvram_read_partition(struct nvram_os_partition *part, char *buff, 334 + int length, unsigned int *err_type, 335 + unsigned int *error_log_cnt) 338 336 { 339 337 int rc; 340 338 loff_t tmp_index;
+1 -1
arch/powerpc/platforms/pseries/ras.c
··· 126 126 #define EPOW_MAIN_ENCLOSURE 5 127 127 #define EPOW_POWER_OFF 7 128 128 129 - void rtas_parse_epow_errlog(struct rtas_error_log *log) 129 + static void rtas_parse_epow_errlog(struct rtas_error_log *log) 130 130 { 131 131 struct pseries_errorlog *pseries_log; 132 132 struct epow_errorlog *epow_log;
+1 -1
arch/powerpc/platforms/pseries/setup.c
··· 561 561 * fw_cmo_feature_init - FW_FEATURE_CMO is not stored in ibm,hypertas-functions, 562 562 * handle that here. (Stolen from parse_system_parameter_string) 563 563 */ 564 - void pSeries_cmo_feature_init(void) 564 + static void pSeries_cmo_feature_init(void) 565 565 { 566 566 char *ptr, *key, *value, *end; 567 567 int call_status;
+1 -1
arch/powerpc/sysdev/mpic.c
··· 960 960 mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); 961 961 } 962 962 963 - void mpic_set_destination(unsigned int virq, unsigned int cpuid) 963 + static void mpic_set_destination(unsigned int virq, unsigned int cpuid) 964 964 { 965 965 struct mpic *mpic = mpic_from_irq(virq); 966 966 unsigned int src = virq_to_hw(virq);
+3 -3
arch/powerpc/sysdev/msi_bitmap.c
··· 143 143 #define check(x) \ 144 144 if (!(x)) printk("msi_bitmap: test failed at line %d\n", __LINE__); 145 145 146 - void __init test_basics(void) 146 + static void __init test_basics(void) 147 147 { 148 148 struct msi_bitmap bmp; 149 149 int i, size = 512; ··· 188 188 kfree(bmp.bitmap); 189 189 } 190 190 191 - void __init test_of_node(void) 191 + static void __init test_of_node(void) 192 192 { 193 193 u32 prop_data[] = { 10, 10, 25, 3, 40, 1, 100, 100, 200, 20 }; 194 194 const char *expected_str = "0-9,20-24,28-39,41-99,220-255"; ··· 236 236 kfree(bmp.bitmap); 237 237 } 238 238 239 - int __init msi_bitmap_selftest(void) 239 + static int __init msi_bitmap_selftest(void) 240 240 { 241 241 printk(KERN_DEBUG "Running MSI bitmap self-tests ...\n"); 242 242