]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
powerpc: Make a bunch of things static
authorAnton Blanchard <anton@samba.org>
Tue, 19 Aug 2014 22:55:18 +0000 (08:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 25 Sep 2014 13:14:41 +0000 (23:14 +1000)
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
21 files changed:
arch/powerpc/kernel/hw_breakpoint.c
arch/powerpc/kernel/nvram_64.c
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/pci_of_scan.c
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/ptrace.c
arch/powerpc/kernel/rtasd.c
arch/powerpc/kernel/time.c
arch/powerpc/lib/feature-fixups.c
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/pgtable.c
arch/powerpc/perf/core-book3s.c
arch/powerpc/platforms/powernv/eeh-ioda.c
arch/powerpc/platforms/powernv/pci-ioda.c
arch/powerpc/platforms/powernv/setup.c
arch/powerpc/platforms/powernv/smp.c
arch/powerpc/platforms/pseries/nvram.c
arch/powerpc/platforms/pseries/ras.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/sysdev/mpic.c
arch/powerpc/sysdev/msi_bitmap.c

index 0bb5918faaaf2c008f9e3ae25a7ae3d1c7ad4f21..1f7d84e2e8b219e42d5e40c00a90ff5544c02a3a 100644 (file)
@@ -293,7 +293,7 @@ out:
 /*
  * Handle single-step exceptions following a DABR hit.
  */
-int __kprobes single_step_dabr_instruction(struct die_args *args)
+static int __kprobes single_step_dabr_instruction(struct die_args *args)
 {
        struct pt_regs *regs = args->regs;
        struct perf_event *bp = NULL;
index 28b898e681850ab22996a2043d46c867e96232be..34f7c9b7cd96b78a7ddf338a61f2d20a5fd16611 100644 (file)
@@ -567,7 +567,7 @@ static int __init nvram_init(void)
        return rc;
 }
 
-void __exit nvram_cleanup(void)
+static void __exit nvram_cleanup(void)
 {
         misc_deregister( &nvram_dev );
 }
index b2814e23e1edceacba1d2c659a2c8b73be907b3b..bd84771f89fcb96afb5b1390abe90f1831a90cbc 100644 (file)
@@ -1140,7 +1140,7 @@ static int reparent_resources(struct resource *parent,
  *         as well.
  */
 
-void pcibios_allocate_bus_resources(struct pci_bus *bus)
+static void pcibios_allocate_bus_resources(struct pci_bus *bus)
 {
        struct pci_bus *b;
        int i;
index 44562aa97f1611f5bcf1a26b56a425efa0c7a33e..e6245e9c7d8d7d54022a408e66e64d74d795757a 100644 (file)
@@ -38,7 +38,7 @@ static u32 get_int_prop(struct device_node *np, const char *name, u32 def)
  * @addr0: value of 1st cell of a device tree PCI address.
  * @bridge: Set this flag if the address is from a bridge 'ranges' property
  */
-unsigned int pci_parse_of_flags(u32 addr0, int bridge)
+static unsigned int pci_parse_of_flags(u32 addr0, int bridge)
 {
        unsigned int flags = 0;
 
index 4e139f8a69effa0a403a2e6d75b0fe7d7e268e3d..cb35c5b3efca9094739c6ed3e468e40e0a81b3f6 100644 (file)
@@ -386,8 +386,9 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
        return 0;
 }
 
-int __init early_init_dt_scan_chosen_ppc(unsigned long node, const char *uname,
-                                        int depth, void *data)
+static int __init early_init_dt_scan_chosen_ppc(unsigned long node,
+                                               const char *uname,
+                                               int depth, void *data)
 {
        const unsigned long *lprop; /* All these set by kernel, so no need to convert endian */
 
index 2e3d2bf536c5662c00f02e07cf36cd1e4b111825..cdb404ea34688b581a788694ed1f8da43aed1f91 100644 (file)
@@ -932,7 +932,7 @@ void ptrace_triggered(struct perf_event *bp,
 }
 #endif /* CONFIG_HAVE_HW_BREAKPOINT */
 
-int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
+static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,
                               unsigned long data)
 {
 #ifdef CONFIG_HAVE_HW_BREAKPOINT
index e736387fee6af3ee5b92ed6407b4f2e7fb38024b..5a2c049c1c61461a50546a05082338158bdd7d08 100644 (file)
@@ -286,7 +286,7 @@ static void prrn_work_fn(struct work_struct *work)
 
 static DECLARE_WORK(prrn_work, prrn_work_fn);
 
-void prrn_schedule_update(u32 scope)
+static void prrn_schedule_update(u32 scope)
 {
        flush_work(&prrn_work);
        prrn_update_scope = scope;
index 055558b953e375a9b24638b91dc0379d924be2ed..7505599c2593cc63fd89709fad21e9e5af92c906 100644 (file)
@@ -479,7 +479,7 @@ void arch_irq_work_raise(void)
 
 #endif /* CONFIG_IRQ_WORK */
 
-void __timer_interrupt(void)
+static void __timer_interrupt(void)
 {
        struct pt_regs *regs = get_irq_regs();
        u64 *next_tb = &__get_cpu_var(decrementers_next_tb);
@@ -643,7 +643,7 @@ static int __init get_freq(char *name, int cells, unsigned long *val)
        return found;
 }
 
-void start_cpu_decrementer(void)
+static void start_cpu_decrementer(void)
 {
 #if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
        /* Clear any pending timer interrupts */
index 7a8a7487cee8dde9d06aa86fff3bd32bdd54433e..7ce3870d7ddd1054898421647c54819ead09e20e 100644 (file)
@@ -164,7 +164,7 @@ static long calc_offset(struct fixup_entry *entry, unsigned int *p)
        return (unsigned long)p - (unsigned long)entry;
 }
 
-void test_basic_patching(void)
+static void test_basic_patching(void)
 {
        extern unsigned int ftr_fixup_test1;
        extern unsigned int end_ftr_fixup_test1;
index bc6cc2ad037b7bba7ee01b9d6e5cf2d3c90559a3..5786f2a81efe54e7aac800dec3148cd2e128e77a 100644 (file)
@@ -868,7 +868,7 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap)
 }
 
 #ifdef CONFIG_PPC_MM_SLICES
-unsigned int get_paca_psize(unsigned long addr)
+static unsigned int get_paca_psize(unsigned long addr)
 {
        u64 lpsizes;
        unsigned char *hpsizes;
index c695943a513cc638621c830f537ea903ccfa3b86..c90e602677c94f38e084957a78ab386cba89b037 100644 (file)
@@ -48,7 +48,7 @@ static inline int pte_looks_normal(pte_t pte)
            (_PAGE_PRESENT | _PAGE_USER);
 }
 
-struct page * maybe_pte_to_page(pte_t pte)
+static struct page *maybe_pte_to_page(pte_t pte)
 {
        unsigned long pfn = pte_pfn(pte);
        struct page *page;
index b7cd00b0171ed9776603969e2af25d5abe3f66a9..a6995d4e93d43d29a34d3c4f833097530f13ebf8 100644 (file)
@@ -59,9 +59,9 @@ struct cpu_hw_events {
        struct  perf_branch_entry       bhrb_entries[BHRB_MAX_ENTRIES];
 };
 
-DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events);
+static DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events);
 
-struct power_pmu *ppmu;
+static struct power_pmu *ppmu;
 
 /*
  * Normally, to ignore kernel events we set the FCS (freeze counters
@@ -124,7 +124,7 @@ static unsigned long ebb_switch_in(bool ebb, struct cpu_hw_events *cpuhw)
 
 static inline void power_pmu_bhrb_enable(struct perf_event *event) {}
 static inline void power_pmu_bhrb_disable(struct perf_event *event) {}
-void power_pmu_flush_branch_stack(void) {}
+static void power_pmu_flush_branch_stack(void) {}
 static inline void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) {}
 static void pmao_restore_workaround(bool ebb) { }
 #endif /* CONFIG_PPC32 */
@@ -375,7 +375,7 @@ static void power_pmu_bhrb_disable(struct perf_event *event)
 /* Called from ctxsw to prevent one process's branch entries to
  * mingle with the other process's entries during context switch.
  */
-void power_pmu_flush_branch_stack(void)
+static void power_pmu_flush_branch_stack(void)
 {
        if (ppmu->bhrb_nr)
                power_pmu_bhrb_reset();
@@ -408,7 +408,7 @@ static __u64 power_pmu_bhrb_to(u64 addr)
 }
 
 /* Processing BHRB entries */
-void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw)
+static void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw)
 {
        u64 val;
        u64 addr;
@@ -1573,7 +1573,7 @@ static void power_pmu_stop(struct perf_event *event, int ef_flags)
  * Set the flag to make pmu::enable() not perform the
  * schedulability test, it will be performed at commit time
  */
-void power_pmu_start_txn(struct pmu *pmu)
+static void power_pmu_start_txn(struct pmu *pmu)
 {
        struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events);
 
@@ -1587,7 +1587,7 @@ void power_pmu_start_txn(struct pmu *pmu)
  * Clear the flag and pmu::enable() will perform the
  * schedulability test.
  */
-void power_pmu_cancel_txn(struct pmu *pmu)
+static void power_pmu_cancel_txn(struct pmu *pmu)
 {
        struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events);
 
@@ -1600,7 +1600,7 @@ void power_pmu_cancel_txn(struct pmu *pmu)
  * Perform the group schedulability test as a whole
  * Return 0 if success
  */
-int power_pmu_commit_txn(struct pmu *pmu)
+static int power_pmu_commit_txn(struct pmu *pmu)
 {
        struct cpu_hw_events *cpuhw;
        long i, n;
@@ -1888,7 +1888,7 @@ ssize_t power_events_sysfs_show(struct device *dev,
        return sprintf(page, "event=0x%02llx\n", pmu_attr->id);
 }
 
-struct pmu power_pmu = {
+static struct pmu power_pmu = {
        .pmu_enable     = power_pmu_enable,
        .pmu_disable    = power_pmu_disable,
        .event_init     = power_pmu_event_init,
index c945bed4dc9e7439c929350effb3b583d3f3a740..df5c2cc552850685119f9d68c9aab03d4323c97a 100644 (file)
@@ -628,8 +628,8 @@ static int ioda_eeh_reset(struct eeh_pe *pe, int option)
  * Retrieve error log, which contains log from device driver
  * and firmware.
  */
-int ioda_eeh_get_log(struct eeh_pe *pe, int severity,
-                    char *drv_log, unsigned long len)
+static int ioda_eeh_get_log(struct eeh_pe *pe, int severity,
+                           char *drv_log, unsigned long len)
 {
        pnv_pci_dump_phb_diag_data(pe->phb, pe->data);
 
index df241b11d4f7d346f4a85c0632668677a9f3e07a..4441bfa84c060133674df2e12c9c13d3a022be3b 100644 (file)
@@ -385,7 +385,7 @@ static void pnv_ioda_freeze_pe(struct pnv_phb *phb, int pe_no)
        }
 }
 
-int pnv_ioda_unfreeze_pe(struct pnv_phb *phb, int pe_no, int opt)
+static int pnv_ioda_unfreeze_pe(struct pnv_phb *phb, int pe_no, int opt)
 {
        struct pnv_ioda_pe *pe, *slave;
        s64 rc;
@@ -1631,8 +1631,8 @@ static void pnv_pci_ioda_shutdown(struct pnv_phb *phb)
                       OPAL_ASSERT_RESET);
 }
 
-void __init pnv_pci_init_ioda_phb(struct device_node *np,
-                                 u64 hub_id, int ioda_type)
+static void __init pnv_pci_init_ioda_phb(struct device_node *np,
+                                        u64 hub_id, int ioda_type)
 {
        struct pci_controller *hose;
        struct pnv_phb *phb;
index 5a0e2dc6de5f127abef1748090fb15e17dfb58fe..bb1fc9b8d55eb1b914f7446d50ed836208f6e416 100644 (file)
@@ -307,7 +307,7 @@ static int __init pnv_probe(void)
  * Returns the cpu frequency for 'cpu' in Hz. This is used by
  * /proc/cpuinfo
  */
-unsigned long pnv_get_proc_freq(unsigned int cpu)
+static unsigned long pnv_get_proc_freq(unsigned int cpu)
 {
        unsigned long ret_freq;
 
index 5fcfcf44e3a9b949e6536ebcf53038645286fde6..b73adc57303152e16f991fd2486c5128ee31fb4e 100644 (file)
@@ -54,7 +54,7 @@ static void pnv_smp_setup_cpu(int cpu)
 #endif
 }
 
-int pnv_smp_kick_cpu(int nr)
+static int pnv_smp_kick_cpu(int nr)
 {
        unsigned int pcpu = get_hard_smp_processor_id(nr);
        unsigned long start_here =
index 0cc240b7f694ef3b35c2930d5356a4e4cb39d863..11a3b617ef5dbd4b7d6cbed7d045d9bc3c4c7d95 100644 (file)
@@ -276,8 +276,10 @@ static ssize_t pSeries_nvram_get_size(void)
  * sequence #: The unique sequence # for each event. (until it wraps)
  * error log: The error log from event_scan
  */
-int nvram_write_os_partition(struct nvram_os_partition *part, char * buff,
-               int length, unsigned int err_type, unsigned int error_log_cnt)
+static int nvram_write_os_partition(struct nvram_os_partition *part,
+                                   char *buff, int length,
+                                   unsigned int err_type,
+                                   unsigned int error_log_cnt)
 {
        int rc;
        loff_t tmp_index;
@@ -330,9 +332,9 @@ int nvram_write_error_log(char * buff, int length,
  *
  * Reads nvram partition for at most 'length'
  */
-int nvram_read_partition(struct nvram_os_partition *part, char *buff,
-                       int length, unsigned int *err_type,
-                       unsigned int *error_log_cnt)
+static int nvram_read_partition(struct nvram_os_partition *part, char *buff,
+                               int length, unsigned int *err_type,
+                               unsigned int *error_log_cnt)
 {
        int rc;
        loff_t tmp_index;
index dff05b9eb94682267fed3a79c9ad72998ec7d053..5a4d0fc03b03f5666f9fe80e3e67d364cb46db9a 100644 (file)
@@ -126,7 +126,7 @@ struct epow_errorlog {
 #define EPOW_MAIN_ENCLOSURE            5
 #define EPOW_POWER_OFF                 7
 
-void rtas_parse_epow_errlog(struct rtas_error_log *log)
+static void rtas_parse_epow_errlog(struct rtas_error_log *log)
 {
        struct pseries_errorlog *pseries_log;
        struct epow_errorlog *epow_log;
index e724d3186e739999cc6daf726d073fe035d26739..125c589eeef52b9b8b2ee10bc8748f66c866ac12 100644 (file)
@@ -561,7 +561,7 @@ void pSeries_coalesce_init(void)
  * fw_cmo_feature_init - FW_FEATURE_CMO is not stored in ibm,hypertas-functions,
  * handle that here. (Stolen from parse_system_parameter_string)
  */
-void pSeries_cmo_feature_init(void)
+static void pSeries_cmo_feature_init(void)
 {
        char *ptr, *key, *value, *end;
        int call_status;
index be33c9768ea11b376669083eeb4eec605ae13e16..89cec0ed6a58acc9104ef2727d7313f5e9031451 100644 (file)
@@ -960,7 +960,7 @@ void mpic_set_vector(unsigned int virq, unsigned int vector)
        mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
 }
 
-void mpic_set_destination(unsigned int virq, unsigned int cpuid)
+static void mpic_set_destination(unsigned int virq, unsigned int cpuid)
 {
        struct mpic *mpic = mpic_from_irq(virq);
        unsigned int src = virq_to_hw(virq);
index 2ff630267e9efaef1eac6cf15634751e6de51b9e..a7c7a9fc7530e0161b3b929a8c84f2b9065b53de 100644 (file)
@@ -143,7 +143,7 @@ void msi_bitmap_free(struct msi_bitmap *bmp)
 #define check(x)       \
        if (!(x)) printk("msi_bitmap: test failed at line %d\n", __LINE__);
 
-void __init test_basics(void)
+static void __init test_basics(void)
 {
        struct msi_bitmap bmp;
        int i, size = 512;
@@ -188,7 +188,7 @@ void __init test_basics(void)
        kfree(bmp.bitmap);
 }
 
-void __init test_of_node(void)
+static void __init test_of_node(void)
 {
        u32 prop_data[] = { 10, 10, 25, 3, 40, 1, 100, 100, 200, 20 };
        const char *expected_str = "0-9,20-24,28-39,41-99,220-255";
@@ -236,7 +236,7 @@ void __init test_of_node(void)
        kfree(bmp.bitmap);
 }
 
-int __init msi_bitmap_selftest(void)
+static int __init msi_bitmap_selftest(void)
 {
        printk(KERN_DEBUG "Running MSI bitmap self-tests ...\n");