Skip to content

Commit 7c98bd7

Browse files
daxtensmpe
authored andcommitted
powerpc/sparse: Make a bunch of things static
Squash a bunch of sparse warnings by making things static. Reviewed-by: Andrew Donnellan <[email protected]> Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent bc42f1d commit 7c98bd7

File tree

22 files changed

+27
-27
lines changed

22 files changed

+27
-27
lines changed

arch/powerpc/kernel/module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <linux/sort.h>
2828
#include <asm/setup.h>
2929

30-
LIST_HEAD(module_bug_list);
30+
static LIST_HEAD(module_bug_list);
3131

3232
static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
3333
const Elf_Shdr *sechdrs,

arch/powerpc/kernel/nvram_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ static long dev_nvram_ioctl(struct file *file, unsigned int cmd,
851851
}
852852
}
853853

854-
const struct file_operations nvram_fops = {
854+
static const struct file_operations nvram_fops = {
855855
.owner = THIS_MODULE,
856856
.llseek = dev_nvram_llseek,
857857
.read = dev_nvram_read,

arch/powerpc/oprofile/cell/spu_profiler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static unsigned int profiling_interval;
4343
#define SPU_PC_MASK 0xFFFF
4444

4545
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;
4747

4848
void set_spu_profiling_frequency(unsigned int freq_khz, unsigned int cycles_reset)
4949
{

arch/powerpc/oprofile/cell/spu_task_sync.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
static DEFINE_SPINLOCK(buffer_lock);
3737
static DEFINE_SPINLOCK(cache_lock);
3838
static int num_spu_nodes;
39-
int spu_prof_num_nodes;
39+
static int spu_prof_num_nodes;
4040

4141
struct spu_buffer spu_buff[MAX_NUMNODES * SPUS_PER_NODE];
4242
struct delayed_work spu_work;
@@ -88,7 +88,7 @@ static void spu_buff_add(unsigned long int value, int spu)
8888
/* This function copies the per SPU buffers to the
8989
* OProfile kernel buffer.
9090
*/
91-
void sync_spu_buff(void)
91+
static void sync_spu_buff(void)
9292
{
9393
int spu;
9494
unsigned long flags;

arch/powerpc/perf/core-book3s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,7 @@ static void perf_event_interrupt(struct pt_regs *regs)
21582158
irq_exit();
21592159
}
21602160

2161-
int power_pmu_prepare_cpu(unsigned int cpu)
2161+
static int power_pmu_prepare_cpu(unsigned int cpu)
21622162
{
21632163
struct cpu_hw_events *cpuhw = &per_cpu(cpu_hw_events, cpu);
21642164

arch/powerpc/perf/hv-gpci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static const struct attribute_group *attr_groups[] = {
131131
#define HGPCI_MAX_DATA_BYTES \
132132
(HGPCI_REQ_BUFFER_SIZE - sizeof(struct hv_get_perf_counter_info_params))
133133

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));
135135

136136
struct hv_gpci_request_buffer {
137137
struct hv_get_perf_counter_info_params params;

arch/powerpc/perf/power7-pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static struct attribute *power7_pmu_format_attr[] = {
416416
NULL,
417417
};
418418

419-
struct attribute_group power7_pmu_format_group = {
419+
static struct attribute_group power7_pmu_format_group = {
420420
.name = "format",
421421
.attrs = power7_pmu_format_attr,
422422
};

arch/powerpc/perf/power8-pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static struct attribute *power8_pmu_format_attr[] = {
204204
NULL,
205205
};
206206

207-
struct attribute_group power8_pmu_format_group = {
207+
static struct attribute_group power8_pmu_format_group = {
208208
.name = "format",
209209
.attrs = power8_pmu_format_attr,
210210
};

arch/powerpc/perf/power9-pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static struct attribute *power9_pmu_format_attr[] = {
119119
NULL,
120120
};
121121

122-
struct attribute_group power9_pmu_format_group = {
122+
static struct attribute_group power9_pmu_format_group = {
123123
.name = "format",
124124
.attrs = power9_pmu_format_attr,
125125
};

arch/powerpc/platforms/cell/cbe_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static struct device_node *cbe_get_be_node(int cpu_id)
189189
return NULL;
190190
}
191191

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)
193193
{
194194
if(map->be_node) {
195195
struct device_node *be, *np;

arch/powerpc/platforms/cell/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static int dma_fixed_dma_supported(struct device *dev, u64 mask)
651651

652652
static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
653653

654-
struct dma_map_ops dma_iommu_fixed_ops = {
654+
static struct dma_map_ops dma_iommu_fixed_ops = {
655655
.alloc = dma_fixed_alloc_coherent,
656656
.free = dma_fixed_free_coherent,
657657
.map_sg = dma_fixed_map_sg,

arch/powerpc/platforms/cell/ras.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ int cbe_sysreset_hack(void)
298298
}
299299
#endif /* CONFIG_PPC_IBM_CELL_RESETBUTTON */
300300

301-
int __init cbe_ptcal_init(void)
301+
static int __init cbe_ptcal_init(void)
302302
{
303303
int ret;
304304
ptcal_start_tok = rtas_token("ibm,cbe-start-ptcal");

arch/powerpc/platforms/maple/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static void __noreturn maple_halt(void)
156156
}
157157

158158
#ifdef CONFIG_SMP
159-
struct smp_ops_t maple_smp_ops = {
159+
static struct smp_ops_t maple_smp_ops = {
160160
.probe = smp_mpic_probe,
161161
.message_pass = smp_mpic_message_pass,
162162
.kick_cpu = smp_generic_kick_cpu,
@@ -176,7 +176,7 @@ static void __init maple_use_rtas_reboot_and_halt_if_present(void)
176176
}
177177
}
178178

179-
void __init maple_setup_arch(void)
179+
static void __init maple_setup_arch(void)
180180
{
181181
/* init to some ~sane value until calibrate_delay() runs */
182182
loops_per_jiffy = 50000000;

arch/powerpc/platforms/pasemi/gpio_mdio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static struct platform_driver gpio_mdio_driver =
306306
},
307307
};
308308

309-
int gpio_mdio_init(void)
309+
static int gpio_mdio_init(void)
310310
{
311311
struct device_node *np;
312312

@@ -326,7 +326,7 @@ int gpio_mdio_init(void)
326326
}
327327
module_init(gpio_mdio_init);
328328

329-
void gpio_mdio_exit(void)
329+
static void gpio_mdio_exit(void)
330330
{
331331
platform_driver_unregister(&gpio_mdio_driver);
332332
if (gpio_regs)

arch/powerpc/platforms/pasemi/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
199199
set_iommu_table_base(&dev->dev, &iommu_table_iobmap);
200200
}
201201

202-
int __init iob_init(struct device_node *dn)
202+
static int __init iob_init(struct device_node *dn)
203203
{
204204
unsigned long tmp;
205205
u32 regword;

arch/powerpc/platforms/pasemi/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void pas_take_timebase(void)
105105
arch_spin_unlock(&timebase_lock);
106106
}
107107

108-
struct smp_ops_t pas_smp_ops = {
108+
static struct smp_ops_t pas_smp_ops = {
109109
.probe = smp_mpic_probe,
110110
.message_pass = smp_mpic_message_pass,
111111
.kick_cpu = smp_generic_kick_cpu,
@@ -115,7 +115,7 @@ struct smp_ops_t pas_smp_ops = {
115115
};
116116
#endif /* CONFIG_SMP */
117117

118-
void __init pas_setup_arch(void)
118+
static void __init pas_setup_arch(void)
119119
{
120120
#ifdef CONFIG_SMP
121121
/* Setup SMP callback */

arch/powerpc/platforms/powermac/pfunc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ void pmf_unregister_driver(struct device_node *np)
804804
}
805805
EXPORT_SYMBOL_GPL(pmf_unregister_driver);
806806

807-
struct pmf_function *__pmf_find_function(struct device_node *target,
807+
static struct pmf_function *__pmf_find_function(struct device_node *target,
808808
const char *name, u32 flags)
809809
{
810810
struct device_node *actor = of_node_get(target);

arch/powerpc/platforms/powermac/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ static void pmac_cpu_die(void)
979979
#endif /* CONFIG_HOTPLUG_CPU */
980980

981981
/* Core99 Macs (dual G4s and G5s) */
982-
struct smp_ops_t core99_smp_ops = {
982+
static struct smp_ops_t core99_smp_ops = {
983983
.message_pass = smp_mpic_message_pass,
984984
.probe = smp_core99_probe,
985985
#ifdef CONFIG_PPC64

arch/powerpc/platforms/powernv/npu-dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static u64 dma_npu_get_required_mask(struct device *dev)
115115
return 0;
116116
}
117117

118-
struct dma_map_ops dma_npu_ops = {
118+
static struct dma_map_ops dma_npu_ops = {
119119
.map_page = dma_npu_map_page,
120120
.map_sg = dma_npu_map_sg,
121121
.alloc = dma_npu_alloc,

arch/powerpc/platforms/pseries/dlpar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <asm/uaccess.h>
2828
#include <asm/rtas.h>
2929

30-
struct workqueue_struct *pseries_hp_wq;
30+
static struct workqueue_struct *pseries_hp_wq;
3131

3232
struct pseries_hp_work {
3333
struct work_struct work;
@@ -377,7 +377,7 @@ static int handle_dlpar_errorlog(struct pseries_hp_errorlog *hp_elog)
377377
return rc;
378378
}
379379

380-
void pseries_hp_work_fn(struct work_struct *work)
380+
static void pseries_hp_work_fn(struct work_struct *work)
381381
{
382382
struct pseries_hp_work *hp_work =
383383
container_of(work, struct pseries_hp_work, work);

arch/powerpc/platforms/pseries/scanlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static int scanlog_release(struct inode * inode, struct file * file)
156156
return 0;
157157
}
158158

159-
const struct file_operations scanlog_fops = {
159+
static const struct file_operations scanlog_fops = {
160160
.owner = THIS_MODULE,
161161
.read = scanlog_read,
162162
.write = scanlog_write,

arch/powerpc/sysdev/mmio_nvram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index)
8989
return count;
9090
}
9191

92-
void mmio_nvram_write_val(int addr, unsigned char val)
92+
static void mmio_nvram_write_val(int addr, unsigned char val)
9393
{
9494
unsigned long flags;
9595

0 commit comments

Comments
 (0)