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

powerpc/sparse: Make a bunch of things static

Squash a bunch of sparse warnings by making things static.

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Daniel Axtens and committed by
Michael Ellerman
7c98bd72 bc42f1d9

+27 -27
+1 -1
arch/powerpc/kernel/module.c
··· 27 27 #include <linux/sort.h> 28 28 #include <asm/setup.h> 29 29 30 - LIST_HEAD(module_bug_list); 30 + static LIST_HEAD(module_bug_list); 31 31 32 32 static const Elf_Shdr *find_section(const Elf_Ehdr *hdr, 33 33 const Elf_Shdr *sechdrs,
+1 -1
arch/powerpc/kernel/nvram_64.c
··· 851 851 } 852 852 } 853 853 854 - const struct file_operations nvram_fops = { 854 + static const struct file_operations nvram_fops = { 855 855 .owner = THIS_MODULE, 856 856 .llseek = dev_nvram_llseek, 857 857 .read = dev_nvram_read,
+1 -1
arch/powerpc/oprofile/cell/spu_profiler.c
··· 43 43 #define SPU_PC_MASK 0xFFFF 44 44 45 45 DEFINE_SPINLOCK(oprof_spu_smpl_arry_lck); 46 - unsigned long oprof_spu_smpl_arry_lck_flags; 46 + static unsigned long oprof_spu_smpl_arry_lck_flags; 47 47 48 48 void set_spu_profiling_frequency(unsigned int freq_khz, unsigned int cycles_reset) 49 49 {
+2 -2
arch/powerpc/oprofile/cell/spu_task_sync.c
··· 36 36 static DEFINE_SPINLOCK(buffer_lock); 37 37 static DEFINE_SPINLOCK(cache_lock); 38 38 static int num_spu_nodes; 39 - int spu_prof_num_nodes; 39 + static int spu_prof_num_nodes; 40 40 41 41 struct spu_buffer spu_buff[MAX_NUMNODES * SPUS_PER_NODE]; 42 42 struct delayed_work spu_work; ··· 88 88 /* This function copies the per SPU buffers to the 89 89 * OProfile kernel buffer. 90 90 */ 91 - void sync_spu_buff(void) 91 + static void sync_spu_buff(void) 92 92 { 93 93 int spu; 94 94 unsigned long flags;
+1 -1
arch/powerpc/perf/core-book3s.c
··· 2158 2158 irq_exit(); 2159 2159 } 2160 2160 2161 - int power_pmu_prepare_cpu(unsigned int cpu) 2161 + static int power_pmu_prepare_cpu(unsigned int cpu) 2162 2162 { 2163 2163 struct cpu_hw_events *cpuhw = &per_cpu(cpu_hw_events, cpu); 2164 2164
+1 -1
arch/powerpc/perf/hv-gpci.c
··· 131 131 #define HGPCI_MAX_DATA_BYTES \ 132 132 (HGPCI_REQ_BUFFER_SIZE - sizeof(struct hv_get_perf_counter_info_params)) 133 133 134 - DEFINE_PER_CPU(char, hv_gpci_reqb[HGPCI_REQ_BUFFER_SIZE]) __aligned(sizeof(uint64_t)); 134 + static DEFINE_PER_CPU(char, hv_gpci_reqb[HGPCI_REQ_BUFFER_SIZE]) __aligned(sizeof(uint64_t)); 135 135 136 136 struct hv_gpci_request_buffer { 137 137 struct hv_get_perf_counter_info_params params;
+1 -1
arch/powerpc/perf/power7-pmu.c
··· 416 416 NULL, 417 417 }; 418 418 419 - struct attribute_group power7_pmu_format_group = { 419 + static struct attribute_group power7_pmu_format_group = { 420 420 .name = "format", 421 421 .attrs = power7_pmu_format_attr, 422 422 };
+1 -1
arch/powerpc/perf/power8-pmu.c
··· 204 204 NULL, 205 205 }; 206 206 207 - struct attribute_group power8_pmu_format_group = { 207 + static struct attribute_group power8_pmu_format_group = { 208 208 .name = "format", 209 209 .attrs = power8_pmu_format_attr, 210 210 };
+1 -1
arch/powerpc/perf/power9-pmu.c
··· 119 119 NULL, 120 120 }; 121 121 122 - struct attribute_group power9_pmu_format_group = { 122 + static struct attribute_group power9_pmu_format_group = { 123 123 .name = "format", 124 124 .attrs = power9_pmu_format_attr, 125 125 };
+1 -1
arch/powerpc/platforms/cell/cbe_regs.c
··· 189 189 return NULL; 190 190 } 191 191 192 - void __init cbe_fill_regs_map(struct cbe_regs_map *map) 192 + static void __init cbe_fill_regs_map(struct cbe_regs_map *map) 193 193 { 194 194 if(map->be_node) { 195 195 struct device_node *be, *np;
+1 -1
arch/powerpc/platforms/cell/iommu.c
··· 651 651 652 652 static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); 653 653 654 - struct dma_map_ops dma_iommu_fixed_ops = { 654 + static struct dma_map_ops dma_iommu_fixed_ops = { 655 655 .alloc = dma_fixed_alloc_coherent, 656 656 .free = dma_fixed_free_coherent, 657 657 .map_sg = dma_fixed_map_sg,
+1 -1
arch/powerpc/platforms/cell/ras.c
··· 298 298 } 299 299 #endif /* CONFIG_PPC_IBM_CELL_RESETBUTTON */ 300 300 301 - int __init cbe_ptcal_init(void) 301 + static int __init cbe_ptcal_init(void) 302 302 { 303 303 int ret; 304 304 ptcal_start_tok = rtas_token("ibm,cbe-start-ptcal");
+2 -2
arch/powerpc/platforms/maple/setup.c
··· 156 156 } 157 157 158 158 #ifdef CONFIG_SMP 159 - struct smp_ops_t maple_smp_ops = { 159 + static struct smp_ops_t maple_smp_ops = { 160 160 .probe = smp_mpic_probe, 161 161 .message_pass = smp_mpic_message_pass, 162 162 .kick_cpu = smp_generic_kick_cpu, ··· 176 176 } 177 177 } 178 178 179 - void __init maple_setup_arch(void) 179 + static void __init maple_setup_arch(void) 180 180 { 181 181 /* init to some ~sane value until calibrate_delay() runs */ 182 182 loops_per_jiffy = 50000000;
+2 -2
arch/powerpc/platforms/pasemi/gpio_mdio.c
··· 306 306 }, 307 307 }; 308 308 309 - int gpio_mdio_init(void) 309 + static int gpio_mdio_init(void) 310 310 { 311 311 struct device_node *np; 312 312 ··· 326 326 } 327 327 module_init(gpio_mdio_init); 328 328 329 - void gpio_mdio_exit(void) 329 + static void gpio_mdio_exit(void) 330 330 { 331 331 platform_driver_unregister(&gpio_mdio_driver); 332 332 if (gpio_regs)
+1 -1
arch/powerpc/platforms/pasemi/iommu.c
··· 199 199 set_iommu_table_base(&dev->dev, &iommu_table_iobmap); 200 200 } 201 201 202 - int __init iob_init(struct device_node *dn) 202 + static int __init iob_init(struct device_node *dn) 203 203 { 204 204 unsigned long tmp; 205 205 u32 regword;
+2 -2
arch/powerpc/platforms/pasemi/setup.c
··· 105 105 arch_spin_unlock(&timebase_lock); 106 106 } 107 107 108 - struct smp_ops_t pas_smp_ops = { 108 + static struct smp_ops_t pas_smp_ops = { 109 109 .probe = smp_mpic_probe, 110 110 .message_pass = smp_mpic_message_pass, 111 111 .kick_cpu = smp_generic_kick_cpu, ··· 115 115 }; 116 116 #endif /* CONFIG_SMP */ 117 117 118 - void __init pas_setup_arch(void) 118 + static void __init pas_setup_arch(void) 119 119 { 120 120 #ifdef CONFIG_SMP 121 121 /* Setup SMP callback */
+1 -1
arch/powerpc/platforms/powermac/pfunc_core.c
··· 804 804 } 805 805 EXPORT_SYMBOL_GPL(pmf_unregister_driver); 806 806 807 - struct pmf_function *__pmf_find_function(struct device_node *target, 807 + static struct pmf_function *__pmf_find_function(struct device_node *target, 808 808 const char *name, u32 flags) 809 809 { 810 810 struct device_node *actor = of_node_get(target);
+1 -1
arch/powerpc/platforms/powermac/smp.c
··· 979 979 #endif /* CONFIG_HOTPLUG_CPU */ 980 980 981 981 /* Core99 Macs (dual G4s and G5s) */ 982 - struct smp_ops_t core99_smp_ops = { 982 + static struct smp_ops_t core99_smp_ops = { 983 983 .message_pass = smp_mpic_message_pass, 984 984 .probe = smp_core99_probe, 985 985 #ifdef CONFIG_PPC64
+1 -1
arch/powerpc/platforms/powernv/npu-dma.c
··· 115 115 return 0; 116 116 } 117 117 118 - struct dma_map_ops dma_npu_ops = { 118 + static struct dma_map_ops dma_npu_ops = { 119 119 .map_page = dma_npu_map_page, 120 120 .map_sg = dma_npu_map_sg, 121 121 .alloc = dma_npu_alloc,
+2 -2
arch/powerpc/platforms/pseries/dlpar.c
··· 27 27 #include <asm/uaccess.h> 28 28 #include <asm/rtas.h> 29 29 30 - struct workqueue_struct *pseries_hp_wq; 30 + static struct workqueue_struct *pseries_hp_wq; 31 31 32 32 struct pseries_hp_work { 33 33 struct work_struct work; ··· 377 377 return rc; 378 378 } 379 379 380 - void pseries_hp_work_fn(struct work_struct *work) 380 + static void pseries_hp_work_fn(struct work_struct *work) 381 381 { 382 382 struct pseries_hp_work *hp_work = 383 383 container_of(work, struct pseries_hp_work, work);
+1 -1
arch/powerpc/platforms/pseries/scanlog.c
··· 156 156 return 0; 157 157 } 158 158 159 - const struct file_operations scanlog_fops = { 159 + static const struct file_operations scanlog_fops = { 160 160 .owner = THIS_MODULE, 161 161 .read = scanlog_read, 162 162 .write = scanlog_write,
+1 -1
arch/powerpc/sysdev/mmio_nvram.c
··· 89 89 return count; 90 90 } 91 91 92 - void mmio_nvram_write_val(int addr, unsigned char val) 92 + static void mmio_nvram_write_val(int addr, unsigned char val) 93 93 { 94 94 unsigned long flags; 95 95