linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] powerpc/sparse: Make a bunch of things static
@ 2016-09-01 23:26 Daniel Axtens
  2016-09-01 23:26 ` [PATCH 2/3] powerpc/kvm: sparse: prototypes for functions called from assembler Daniel Axtens
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Axtens @ 2016-09-01 23:26 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Daniel Axtens

Squash a bunch of sparse warnings by making things static.

Signed-off-by: Daniel Axtens <dja@axtens.net>

---

This is an omnibus patch - I wrote a Python script to figure out if
sparse warnings could be automatically fixed. These are the fixes
that didn't cause issues.

I have compile tested against arch/powerpc/configs/*defconfig
I haven't recursed into subdirectories or boot tested.

The patch is based on linux-next.
---
 arch/powerpc/kernel/module.c                 | 2 +-
 arch/powerpc/kernel/nvram_64.c               | 2 +-
 arch/powerpc/kvm/book3s_64_mmu_hv.c          | 4 ++--
 arch/powerpc/oprofile/cell/spu_profiler.c    | 2 +-
 arch/powerpc/oprofile/cell/spu_task_sync.c   | 4 ++--
 arch/powerpc/perf/core-book3s.c              | 2 +-
 arch/powerpc/perf/hv-gpci.c                  | 2 +-
 arch/powerpc/perf/power7-pmu.c               | 2 +-
 arch/powerpc/perf/power8-pmu.c               | 2 +-
 arch/powerpc/perf/power9-pmu.c               | 2 +-
 arch/powerpc/platforms/cell/cbe_regs.c       | 2 +-
 arch/powerpc/platforms/cell/interrupt.c      | 2 +-
 arch/powerpc/platforms/cell/iommu.c          | 2 +-
 arch/powerpc/platforms/cell/ras.c            | 2 +-
 arch/powerpc/platforms/maple/setup.c         | 4 ++--
 arch/powerpc/platforms/pasemi/gpio_mdio.c    | 4 ++--
 arch/powerpc/platforms/pasemi/iommu.c        | 2 +-
 arch/powerpc/platforms/pasemi/setup.c        | 4 ++--
 arch/powerpc/platforms/powermac/pfunc_core.c | 2 +-
 arch/powerpc/platforms/powermac/smp.c        | 2 +-
 arch/powerpc/platforms/powernv/npu-dma.c     | 2 +-
 arch/powerpc/platforms/pseries/dlpar.c       | 4 ++--
 arch/powerpc/platforms/pseries/scanlog.c     | 2 +-
 arch/powerpc/sysdev/mmio_nvram.c             | 2 +-
 24 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
index d1f1b35bf0c7..30b89d5cbb03 100644
--- a/arch/powerpc/kernel/module.c
+++ b/arch/powerpc/kernel/module.c
@@ -27,7 +27,7 @@
 #include <linux/sort.h>
 #include <asm/setup.h>
 
-LIST_HEAD(module_bug_list);
+static LIST_HEAD(module_bug_list);
 
 static const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
 				    const Elf_Shdr *sechdrs,
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index 64174bf95611..46c3c76f171b 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -851,7 +851,7 @@ static long dev_nvram_ioctl(struct file *file, unsigned int cmd,
 	}
 }
 
-const struct file_operations nvram_fops = {
+static const struct file_operations nvram_fops = {
 	.owner		= THIS_MODULE,
 	.llseek		= dev_nvram_llseek,
 	.read		= dev_nvram_read,
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 05f09ae82587..95abca69b168 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -255,7 +255,7 @@ static void kvmppc_mmu_book3s_64_hv_reset_msr(struct kvm_vcpu *vcpu)
 	kvmppc_set_msr(vcpu, msr);
 }
 
-long kvmppc_virtmode_do_h_enter(struct kvm *kvm, unsigned long flags,
+static long kvmppc_virtmode_do_h_enter(struct kvm *kvm, unsigned long flags,
 				long pte_index, unsigned long pteh,
 				unsigned long ptel, unsigned long *pte_idx_ret)
 {
@@ -1608,7 +1608,7 @@ static ssize_t debugfs_htab_read(struct file *file, char __user *buf,
 	return ret;
 }
 
-ssize_t debugfs_htab_write(struct file *file, const char __user *buf,
+static ssize_t debugfs_htab_write(struct file *file, const char __user *buf,
 			   size_t len, loff_t *ppos)
 {
 	return -EACCES;
diff --git a/arch/powerpc/oprofile/cell/spu_profiler.c b/arch/powerpc/oprofile/cell/spu_profiler.c
index b129d007e7fe..b19265de9178 100644
--- a/arch/powerpc/oprofile/cell/spu_profiler.c
+++ b/arch/powerpc/oprofile/cell/spu_profiler.c
@@ -43,7 +43,7 @@ static unsigned int profiling_interval;
 #define SPU_PC_MASK	     0xFFFF
 
 DEFINE_SPINLOCK(oprof_spu_smpl_arry_lck);
-unsigned long oprof_spu_smpl_arry_lck_flags;
+static unsigned long oprof_spu_smpl_arry_lck_flags;
 
 void set_spu_profiling_frequency(unsigned int freq_khz, unsigned int cycles_reset)
 {
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c
index ef2142ff7dbd..83d2b4ef7f0d 100644
--- a/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ b/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -36,7 +36,7 @@
 static DEFINE_SPINLOCK(buffer_lock);
 static DEFINE_SPINLOCK(cache_lock);
 static int num_spu_nodes;
-int spu_prof_num_nodes;
+static int spu_prof_num_nodes;
 
 struct spu_buffer spu_buff[MAX_NUMNODES * SPUS_PER_NODE];
 struct delayed_work spu_work;
@@ -88,7 +88,7 @@ static void spu_buff_add(unsigned long int value, int spu)
 /* This function copies the per SPU buffers to the
  * OProfile kernel buffer.
  */
-void sync_spu_buff(void)
+static void sync_spu_buff(void)
 {
 	int spu;
 	unsigned long flags;
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 4ed377f0f7b2..72c27b8d2cf3 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -2158,7 +2158,7 @@ static void perf_event_interrupt(struct pt_regs *regs)
 		irq_exit();
 }
 
-int power_pmu_prepare_cpu(unsigned int cpu)
+static int power_pmu_prepare_cpu(unsigned int cpu)
 {
 	struct cpu_hw_events *cpuhw = &per_cpu(cpu_hw_events, cpu);
 
diff --git a/arch/powerpc/perf/hv-gpci.c b/arch/powerpc/perf/hv-gpci.c
index 7aa37236bb70..43fabb3cae0f 100644
--- a/arch/powerpc/perf/hv-gpci.c
+++ b/arch/powerpc/perf/hv-gpci.c
@@ -131,7 +131,7 @@ static const struct attribute_group *attr_groups[] = {
 #define HGPCI_MAX_DATA_BYTES \
 	(HGPCI_REQ_BUFFER_SIZE - sizeof(struct hv_get_perf_counter_info_params))
 
-DEFINE_PER_CPU(char, hv_gpci_reqb[HGPCI_REQ_BUFFER_SIZE]) __aligned(sizeof(uint64_t));
+static DEFINE_PER_CPU(char, hv_gpci_reqb[HGPCI_REQ_BUFFER_SIZE]) __aligned(sizeof(uint64_t));
 
 struct hv_gpci_request_buffer {
 	struct hv_get_perf_counter_info_params params;
diff --git a/arch/powerpc/perf/power7-pmu.c b/arch/powerpc/perf/power7-pmu.c
index a383c23a9070..7963658dbc22 100644
--- a/arch/powerpc/perf/power7-pmu.c
+++ b/arch/powerpc/perf/power7-pmu.c
@@ -416,7 +416,7 @@ static struct attribute *power7_pmu_format_attr[] = {
 	NULL,
 };
 
-struct attribute_group power7_pmu_format_group = {
+static struct attribute_group power7_pmu_format_group = {
 	.name = "format",
 	.attrs = power7_pmu_format_attr,
 };
diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c
index 5fde2b192fec..ab830d106ec5 100644
--- a/arch/powerpc/perf/power8-pmu.c
+++ b/arch/powerpc/perf/power8-pmu.c
@@ -204,7 +204,7 @@ static struct attribute *power8_pmu_format_attr[] = {
 	NULL,
 };
 
-struct attribute_group power8_pmu_format_group = {
+static struct attribute_group power8_pmu_format_group = {
 	.name = "format",
 	.attrs = power8_pmu_format_attr,
 };
diff --git a/arch/powerpc/perf/power9-pmu.c b/arch/powerpc/perf/power9-pmu.c
index 788346303852..8e9a81967ff8 100644
--- a/arch/powerpc/perf/power9-pmu.c
+++ b/arch/powerpc/perf/power9-pmu.c
@@ -119,7 +119,7 @@ static struct attribute *power9_pmu_format_attr[] = {
 	NULL,
 };
 
-struct attribute_group power9_pmu_format_group = {
+static struct attribute_group power9_pmu_format_group = {
 	.name = "format",
 	.attrs = power9_pmu_format_attr,
 };
diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c
index 1428d583c238..b926438d73af 100644
--- a/arch/powerpc/platforms/cell/cbe_regs.c
+++ b/arch/powerpc/platforms/cell/cbe_regs.c
@@ -189,7 +189,7 @@ static struct device_node *cbe_get_be_node(int cpu_id)
 	return NULL;
 }
 
-void __init cbe_fill_regs_map(struct cbe_regs_map *map)
+static void __init cbe_fill_regs_map(struct cbe_regs_map *map)
 {
 	if(map->be_node) {
 		struct device_node *be, *np;
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 9f609fc8d331..2d7b07c4519e 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -187,7 +187,7 @@ void iic_message_pass(int cpu, int msg)
 	out_be64(&per_cpu(cpu_iic, cpu).regs->generate, (0xf - msg) << 4);
 }
 
-struct irq_domain *iic_get_irq_host(int node)
+static struct irq_domain *iic_get_irq_host(int node)
 {
 	return iic_host;
 }
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index f7d1a4953ea0..640772af9bcb 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -651,7 +651,7 @@ static int dma_fixed_dma_supported(struct device *dev, u64 mask)
 
 static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
 
-struct dma_map_ops dma_iommu_fixed_ops = {
+static struct dma_map_ops dma_iommu_fixed_ops = {
 	.alloc          = dma_fixed_alloc_coherent,
 	.free           = dma_fixed_free_coherent,
 	.map_sg         = dma_fixed_map_sg,
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c
index 2d4f60c0119a..460ab392f0e7 100644
--- a/arch/powerpc/platforms/cell/ras.c
+++ b/arch/powerpc/platforms/cell/ras.c
@@ -298,7 +298,7 @@ int cbe_sysreset_hack(void)
 }
 #endif /* CONFIG_PPC_IBM_CELL_RESETBUTTON */
 
-int __init cbe_ptcal_init(void)
+static int __init cbe_ptcal_init(void)
 {
 	int ret;
 	ptcal_start_tok = rtas_token("ibm,cbe-start-ptcal");
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 3c30c7a4534d..b7f937563827 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -156,7 +156,7 @@ static void __noreturn maple_halt(void)
 }
 
 #ifdef CONFIG_SMP
-struct smp_ops_t maple_smp_ops = {
+static struct smp_ops_t maple_smp_ops = {
 	.probe		= smp_mpic_probe,
 	.message_pass	= smp_mpic_message_pass,
 	.kick_cpu	= smp_generic_kick_cpu,
@@ -176,7 +176,7 @@ static void __init maple_use_rtas_reboot_and_halt_if_present(void)
 	}
 }
 
-void __init maple_setup_arch(void)
+static void __init maple_setup_arch(void)
 {
 	/* init to some ~sane value until calibrate_delay() runs */
 	loops_per_jiffy = 50000000;
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index ddf635000c6b..c23e60959aa8 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -306,7 +306,7 @@ static struct platform_driver gpio_mdio_driver =
 	},
 };
 
-int gpio_mdio_init(void)
+static int gpio_mdio_init(void)
 {
 	struct device_node *np;
 
@@ -326,7 +326,7 @@ int gpio_mdio_init(void)
 }
 module_init(gpio_mdio_init);
 
-void gpio_mdio_exit(void)
+static void gpio_mdio_exit(void)
 {
 	platform_driver_unregister(&gpio_mdio_driver);
 	if (gpio_regs)
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index c61667e8bb06..e74adc4e7fd8 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -199,7 +199,7 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
 	set_iommu_table_base(&dev->dev, &iommu_table_iobmap);
 }
 
-int __init iob_init(struct device_node *dn)
+static int __init iob_init(struct device_node *dn)
 {
 	unsigned long tmp;
 	u32 regword;
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index e86c1bd08f1f..1d0c3a621a38 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -105,7 +105,7 @@ static void pas_take_timebase(void)
 	arch_spin_unlock(&timebase_lock);
 }
 
-struct smp_ops_t pas_smp_ops = {
+static struct smp_ops_t pas_smp_ops = {
 	.probe		= smp_mpic_probe,
 	.message_pass	= smp_mpic_message_pass,
 	.kick_cpu	= smp_generic_kick_cpu,
@@ -115,7 +115,7 @@ struct smp_ops_t pas_smp_ops = {
 };
 #endif /* CONFIG_SMP */
 
-void __init pas_setup_arch(void)
+static void __init pas_setup_arch(void)
 {
 #ifdef CONFIG_SMP
 	/* Setup SMP callback */
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 43075081721f..695e8c4d4224 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -804,7 +804,7 @@ void pmf_unregister_driver(struct device_node *np)
 }
 EXPORT_SYMBOL_GPL(pmf_unregister_driver);
 
-struct pmf_function *__pmf_find_function(struct device_node *target,
+static struct pmf_function *__pmf_find_function(struct device_node *target,
 					 const char *name, u32 flags)
 {
 	struct device_node *actor = of_node_get(target);
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 834868b9fdc9..5a8564c2092a 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -979,7 +979,7 @@ static void pmac_cpu_die(void)
 #endif /* CONFIG_HOTPLUG_CPU */
 
 /* Core99 Macs (dual G4s and G5s) */
-struct smp_ops_t core99_smp_ops = {
+static struct smp_ops_t core99_smp_ops = {
 	.message_pass	= smp_mpic_message_pass,
 	.probe		= smp_core99_probe,
 #ifdef CONFIG_PPC64
diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c
index 00e1a0195c78..aec85e778028 100644
--- a/arch/powerpc/platforms/powernv/npu-dma.c
+++ b/arch/powerpc/platforms/powernv/npu-dma.c
@@ -115,7 +115,7 @@ static u64 dma_npu_get_required_mask(struct device *dev)
 	return 0;
 }
 
-struct dma_map_ops dma_npu_ops = {
+static struct dma_map_ops dma_npu_ops = {
 	.map_page		= dma_npu_map_page,
 	.map_sg			= dma_npu_map_sg,
 	.alloc			= dma_npu_alloc,
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index 4748124faa10..2511ccf186af 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -27,7 +27,7 @@
 #include <asm/uaccess.h>
 #include <asm/rtas.h>
 
-struct workqueue_struct *pseries_hp_wq;
+static struct workqueue_struct *pseries_hp_wq;
 
 struct pseries_hp_work {
 	struct work_struct work;
@@ -377,7 +377,7 @@ static int handle_dlpar_errorlog(struct pseries_hp_errorlog *hp_elog)
 	return rc;
 }
 
-void pseries_hp_work_fn(struct work_struct *work)
+static void pseries_hp_work_fn(struct work_struct *work)
 {
 	struct pseries_hp_work *hp_work =
 			container_of(work, struct pseries_hp_work, work);
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index b502ab61aafa..7d28cabf1206 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -156,7 +156,7 @@ static int scanlog_release(struct inode * inode, struct file * file)
 	return 0;
 }
 
-const struct file_operations scanlog_fops = {
+static const struct file_operations scanlog_fops = {
 	.owner		= THIS_MODULE,
 	.read		= scanlog_read,
 	.write		= scanlog_write,
diff --git a/arch/powerpc/sysdev/mmio_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c
index 69f5814ae6d4..c31f634f1973 100644
--- a/arch/powerpc/sysdev/mmio_nvram.c
+++ b/arch/powerpc/sysdev/mmio_nvram.c
@@ -89,7 +89,7 @@ static ssize_t mmio_nvram_write(char *buf, size_t count, loff_t *index)
 	return count;
 }
 
-void mmio_nvram_write_val(int addr, unsigned char val)
+static void mmio_nvram_write_val(int addr, unsigned char val)
 {
 	unsigned long flags;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] powerpc/kvm: sparse: prototypes for functions called from assembler
  2016-09-01 23:26 [PATCH 1/3] powerpc/sparse: Make a bunch of things static Daniel Axtens
@ 2016-09-01 23:26 ` Daniel Axtens
  2016-09-01 23:26 ` [PATCH 3/3] powerpc/sparse: Add more assembler prototypes Daniel Axtens
  2016-09-01 23:38 ` [PATCH 1/3] powerpc/sparse: Make a bunch of things static Andrew Donnellan
  2 siblings, 0 replies; 6+ messages in thread
From: Daniel Axtens @ 2016-09-01 23:26 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Daniel Axtens

A bunch of KVM functions are only called from assembler.
Give them prototypes in asm-prototypes.h

Signed-off-by: Daniel Axtens <dja@axtens.net>
---
 arch/powerpc/include/asm/asm-prototypes.h | 39 +++++++++++++++++++++++++++++++
 arch/powerpc/kvm/book3s_64_vio_hv.c       |  1 +
 arch/powerpc/kvm/book3s_hv_builtin.c      |  1 +
 arch/powerpc/kvm/book3s_hv_ras.c          |  1 +
 arch/powerpc/kvm/book3s_hv_rm_mmu.c       |  1 +
 arch/powerpc/kvm/book3s_hv_rm_xics.c      |  1 +
 6 files changed, 44 insertions(+)

diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
index e71b9097594c..600c7994e99e 100644
--- a/arch/powerpc/include/asm/asm-prototypes.h
+++ b/arch/powerpc/include/asm/asm-prototypes.h
@@ -72,4 +72,43 @@ void system_reset_exception(struct pt_regs *regs);
 void machine_check_exception(struct pt_regs *regs);
 void __kprobes emulation_assist_interrupt(struct pt_regs *regs);
 
+/* kvm */
+long kvmppc_rm_h_put_tce(struct kvm_vcpu *vcpu, unsigned long liobn,
+			 unsigned long ioba, unsigned long tce);
+long kvmppc_rm_h_put_tce_indirect(struct kvm_vcpu *vcpu,
+				  unsigned long liobn, unsigned long ioba,
+				  unsigned long tce_list, unsigned long npages);
+long kvmppc_rm_h_stuff_tce(struct kvm_vcpu *vcpu,
+			   unsigned long liobn, unsigned long ioba,
+			   unsigned long tce_value, unsigned long npages);
+long int kvmppc_rm_h_confer(struct kvm_vcpu *vcpu, int target,
+                            unsigned int yield_count);
+long kvmppc_h_random(struct kvm_vcpu *vcpu);
+void kvmhv_commence_exit(int trap);
+long kvmppc_realmode_machine_check(struct kvm_vcpu *vcpu);
+void kvmppc_subcore_enter_guest(void);
+void kvmppc_subcore_exit_guest(void);
+long kvmppc_realmode_hmi_handler(void);
+long kvmppc_h_enter(struct kvm_vcpu *vcpu, unsigned long flags,
+                    long pte_index, unsigned long pteh, unsigned long ptel);
+long kvmppc_h_remove(struct kvm_vcpu *vcpu, unsigned long flags,
+                     unsigned long pte_index, unsigned long avpn);
+long kvmppc_h_bulk_remove(struct kvm_vcpu *vcpu);
+long kvmppc_h_protect(struct kvm_vcpu *vcpu, unsigned long flags,
+                      unsigned long pte_index, unsigned long avpn,
+                      unsigned long va);
+long kvmppc_h_read(struct kvm_vcpu *vcpu, unsigned long flags,
+                   unsigned long pte_index);
+long kvmppc_h_clear_ref(struct kvm_vcpu *vcpu, unsigned long flags,
+                        unsigned long pte_index);
+long kvmppc_h_clear_mod(struct kvm_vcpu *vcpu, unsigned long flags,
+                        unsigned long pte_index);
+long kvmppc_hpte_hv_fault(struct kvm_vcpu *vcpu, unsigned long addr,
+                          unsigned long slb_v, unsigned int status, bool data);
+unsigned long kvmppc_rm_h_xirr(struct kvm_vcpu *vcpu);
+int kvmppc_rm_h_ipi(struct kvm_vcpu *vcpu, unsigned long server,
+                    unsigned long mfrr);
+int kvmppc_rm_h_cppr(struct kvm_vcpu *vcpu, unsigned long cppr);
+int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr);
+
 #endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */
diff --git a/arch/powerpc/kvm/book3s_64_vio_hv.c b/arch/powerpc/kvm/book3s_64_vio_hv.c
index d461c440889a..30f83cf1b98e 100644
--- a/arch/powerpc/kvm/book3s_64_vio_hv.c
+++ b/arch/powerpc/kvm/book3s_64_vio_hv.c
@@ -40,6 +40,7 @@
 #include <asm/iommu.h>
 #include <asm/tce.h>
 #include <asm/iommu.h>
+#include <asm/asm-prototypes.h>
 
 #define TCES_PER_PAGE	(PAGE_SIZE / sizeof(u64))
 
diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c
index 5f0380db3eab..b997000323a2 100644
--- a/arch/powerpc/kvm/book3s_hv_builtin.c
+++ b/arch/powerpc/kvm/book3s_hv_builtin.c
@@ -25,6 +25,7 @@
 #include <asm/xics.h>
 #include <asm/dbell.h>
 #include <asm/cputhreads.h>
+#include <asm/asm-prototypes.h>
 
 #define KVM_CMA_CHUNK_ORDER	18
 
diff --git a/arch/powerpc/kvm/book3s_hv_ras.c b/arch/powerpc/kvm/book3s_hv_ras.c
index 0fa70a9618d7..be1cee5dc032 100644
--- a/arch/powerpc/kvm/book3s_hv_ras.c
+++ b/arch/powerpc/kvm/book3s_hv_ras.c
@@ -16,6 +16,7 @@
 #include <asm/machdep.h>
 #include <asm/cputhreads.h>
 #include <asm/hmi.h>
+#include <asm/asm-prototypes.h>
 
 /* SRR1 bits for machine check on POWER7 */
 #define SRR1_MC_LDSTERR		(1ul << (63-42))
diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
index 99b4e9d5dd23..6b3d01b024d7 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
@@ -21,6 +21,7 @@
 #include <asm/hvcall.h>
 #include <asm/synch.h>
 #include <asm/ppc-opcode.h>
+#include <asm/asm-prototypes.h>
 
 /* Translate address of a vmalloc'd thing to a linear map address */
 static void *real_vmalloc_addr(void *x)
diff --git a/arch/powerpc/kvm/book3s_hv_rm_xics.c b/arch/powerpc/kvm/book3s_hv_rm_xics.c
index 980d8a6f7284..8524382981a8 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_xics.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c
@@ -19,6 +19,7 @@
 #include <asm/synch.h>
 #include <asm/cputhreads.h>
 #include <asm/ppc-opcode.h>
+#include <asm/asm-prototypes.h>
 
 #include "book3s_xics.h"
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] powerpc/sparse: Add more assembler prototypes.
  2016-09-01 23:26 [PATCH 1/3] powerpc/sparse: Make a bunch of things static Daniel Axtens
  2016-09-01 23:26 ` [PATCH 2/3] powerpc/kvm: sparse: prototypes for functions called from assembler Daniel Axtens
@ 2016-09-01 23:26 ` Daniel Axtens
  2016-09-02  0:36   ` kbuild test robot
  2016-09-02  1:10   ` kbuild test robot
  2016-09-01 23:38 ` [PATCH 1/3] powerpc/sparse: Make a bunch of things static Andrew Donnellan
  2 siblings, 2 replies; 6+ messages in thread
From: Daniel Axtens @ 2016-09-01 23:26 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Daniel Axtens

Another set of things that are only called from assembler and so need
prototypes to keep sparse happy.

Signed-off-by: Daniel Axtens <dja@axtens.net>

---

Again, created semi-programatically and compile-tested against
top-level defconfigs.
---
 arch/powerpc/include/asm/asm-prototypes.h | 32 +++++++++++++++++++++++++++++++
 arch/powerpc/kernel/irq.c                 |  1 +
 arch/powerpc/kernel/process.c             |  1 +
 arch/powerpc/kernel/prom_init.c           |  1 +
 arch/powerpc/kernel/ptrace.c              |  1 +
 arch/powerpc/kernel/signal_32.c           |  1 +
 arch/powerpc/kernel/signal_64.c           |  1 +
 arch/powerpc/kernel/syscalls.c            |  1 +
 arch/powerpc/kernel/time.c                |  1 +
 9 files changed, 40 insertions(+)

diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
index 600c7994e99e..a52e4aae1387 100644
--- a/arch/powerpc/include/asm/asm-prototypes.h
+++ b/arch/powerpc/include/asm/asm-prototypes.h
@@ -15,6 +15,8 @@
 #include <linux/threads.h>
 #include <linux/kprobes.h>
 
+#include <uapi/asm/ucontext.h>
+
 /* SMP */
 extern struct thread_info *current_set[NR_CPUS];
 extern struct thread_info *secondary_ti;
@@ -111,4 +113,34 @@ int kvmppc_rm_h_ipi(struct kvm_vcpu *vcpu, unsigned long server,
 int kvmppc_rm_h_cppr(struct kvm_vcpu *vcpu, unsigned long cppr);
 int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr);
 
+
+/* signals, syscalls and interrupts */
+int sys_swapcontext(struct ucontext __user *old_ctx,
+                    struct ucontext __user *new_ctx,
+                    long ctx_size, long r6, long r7, long r8, struct pt_regs *regs);
+long sys_switch_endian(void);
+notrace unsigned int __check_irq_replay(void);
+void notrace restore_interrupts(void);
+
+/* ptrace */
+long do_syscall_trace_enter(struct pt_regs *regs);
+void do_syscall_trace_leave(struct pt_regs *regs);
+
+/* process */
+void restore_math(struct pt_regs *regs);
+void restore_tm_state(struct pt_regs *regs);
+
+/* prom_init (OpenFirmware) */
+unsigned long __init prom_init(unsigned long r3, unsigned long r4,
+                               unsigned long pp,
+                               unsigned long r6, unsigned long r7,
+                               unsigned long kbase);
+
+/* setup */
+void __init early_setup(unsigned long dt_ptr);
+void early_setup_secondary(void);
+
+/* time */
+void accumulate_stolen_time(void);
+
 #endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 08887cf2b20e..9594ac8e7090 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -67,6 +67,7 @@
 #include <asm/smp.h>
 #include <asm/debug.h>
 #include <asm/livepatch.h>
+#include <asm/asm-prototypes.h>
 
 #ifdef CONFIG_PPC64
 #include <asm/paca.h>
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 9ee2623e0f67..ce8a26a0c947 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -59,6 +59,7 @@
 #include <asm/exec.h>
 #include <asm/livepatch.h>
 #include <asm/cpu_has_feature.h>
+#include <asm/asm-prototypes.h>
 
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 4e74fc588a3f..84b0d677f6ce 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -42,6 +42,7 @@
 #include <asm/sections.h>
 #include <asm/machdep.h>
 #include <asm/opal.h>
+#include <asm/asm-prototypes.h>
 
 #include <linux/linux_logo.h>
 
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index bf91658a8a40..2299bf60780d 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -39,6 +39,7 @@
 #include <asm/pgtable.h>
 #include <asm/switch_to.h>
 #include <asm/tm.h>
+#include <asm/asm-prototypes.h>
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/syscalls.h>
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index b6aa378aff63..c35186b46590 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -44,6 +44,7 @@
 #include <asm/vdso.h>
 #include <asm/switch_to.h>
 #include <asm/tm.h>
+#include <asm/asm-prototypes.h>
 #ifdef CONFIG_PPC64
 #include "ppc32.h"
 #include <asm/unistd.h>
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 7e49984d4331..3e8feb1824d8 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -35,6 +35,7 @@
 #include <asm/vdso.h>
 #include <asm/switch_to.h>
 #include <asm/tm.h>
+#include <asm/asm-prototypes.h>
 
 #include "signal.h"
 
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index 5fa92706444b..644cce3d8dce 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -40,6 +40,7 @@
 #include <asm/syscalls.h>
 #include <asm/time.h>
 #include <asm/unistd.h>
+#include <asm/asm-prototypes.h>
 
 static inline unsigned long do_mmap2(unsigned long addr, size_t len,
 			unsigned long prot, unsigned long flags,
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 3efbedefba6a..67859b7d1c97 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -73,6 +73,7 @@
 #include <asm/vdso_datapage.h>
 #include <asm/firmware.h>
 #include <asm/cputime.h>
+#include <asm/asm-prototypes.h>
 
 /* powerpc clocksource/clockevent code */
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] powerpc/sparse: Make a bunch of things static
  2016-09-01 23:26 [PATCH 1/3] powerpc/sparse: Make a bunch of things static Daniel Axtens
  2016-09-01 23:26 ` [PATCH 2/3] powerpc/kvm: sparse: prototypes for functions called from assembler Daniel Axtens
  2016-09-01 23:26 ` [PATCH 3/3] powerpc/sparse: Add more assembler prototypes Daniel Axtens
@ 2016-09-01 23:38 ` Andrew Donnellan
  2 siblings, 0 replies; 6+ messages in thread
From: Andrew Donnellan @ 2016-09-01 23:38 UTC (permalink / raw)
  To: Daniel Axtens, linuxppc-dev

On 02/09/16 09:26, Daniel Axtens wrote:
> Squash a bunch of sparse warnings by making things static.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

> -struct irq_domain *iic_get_irq_host(int node)
> +static struct irq_domain *iic_get_irq_host(int node)
>  {
>  	return iic_host;
>  }

Should probably get rid of the symbol export here too.

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] powerpc/sparse: Add more assembler prototypes.
  2016-09-01 23:26 ` [PATCH 3/3] powerpc/sparse: Add more assembler prototypes Daniel Axtens
@ 2016-09-02  0:36   ` kbuild test robot
  2016-09-02  1:10   ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2016-09-02  0:36 UTC (permalink / raw)
  To: Daniel Axtens; +Cc: kbuild-all, linuxppc-dev, Daniel Axtens

[-- Attachment #1: Type: text/plain, Size: 5551 bytes --]

Hi Daniel,

[auto build test WARNING on v4.8-rc4]
[also build test WARNING on next-20160825]
[cannot apply to powerpc/next kvm-ppc/kvm-ppc-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Daniel-Axtens/powerpc-sparse-Make-a-bunch-of-things-static/20160902-075213
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

   In file included from arch/powerpc/include/uapi/asm/sigcontext.h:13:0,
                    from arch/powerpc/include/uapi/asm/ucontext.h:5,
                    from arch/powerpc/include/asm/asm-prototypes.h:18,
                    from arch/powerpc/platforms/pseries/lpar.c:48:
>> arch/powerpc/include/asm/elf.h:33:0: warning: "ELF_CORE_EFLAGS" redefined
    #define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0)
    ^
   In file included from arch/powerpc/platforms/pseries/lpar.c:47:0:
   arch/powerpc/include/asm/fadump.h:49:0: note: this is the location of the previous definition
    #define ELF_CORE_EFLAGS 0
    ^
   In file included from arch/powerpc/include/uapi/asm/sigcontext.h:13:0,
                    from arch/powerpc/include/uapi/asm/ucontext.h:5,
                    from arch/powerpc/include/asm/asm-prototypes.h:18,
                    from arch/powerpc/platforms/pseries/lpar.c:48:
>> arch/powerpc/include/asm/elf.h:33:0: warning: "ELF_CORE_EFLAGS" redefined
    #define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0)
    ^
   In file included from arch/powerpc/platforms/pseries/lpar.c:47:0:
   arch/powerpc/include/asm/fadump.h:49:0: note: this is the location of the previous definition
    #define ELF_CORE_EFLAGS 0
    ^

vim +/ELF_CORE_EFLAGS +33 arch/powerpc/include/asm/elf.h

^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  17  /*
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  18   * This is used to ensure we don't load something for the wrong architecture.
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  19   */
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  20  #define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
01e31dba include/asm-powerpc/elf.h      Roland McGrath  2008-01-02  21  #define compat_elf_check_arch(x)	((x)->e_machine == EM_PPC)
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  22  
81970387 include/asm-powerpc/elf.h      Roland McGrath  2007-12-20  23  #define CORE_DUMP_USE_REGSET
637a6ff6 include/asm-ppc64/elf.h        Olof Johansson  2005-09-20  24  #define ELF_EXEC_PAGESIZE	PAGE_SIZE
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  25  
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  26  /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  27     use of this is to invoke "./ld.so someprog" to test out a new version of
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  28     the loader.  We need to make sure that it is out of the way of the program
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  29     that it will "exec", and that there is sufficient room for the brk.  */
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  30  
59994fb0 arch/powerpc/include/asm/elf.h Vineeth Vijayan 2014-11-14  31  #define ELF_ET_DYN_BASE	0x20000000
^1da177e include/asm-ppc64/elf.h        Linus Torvalds  2005-04-16  32  
918d0355 arch/powerpc/include/asm/elf.h Rusty Russell   2013-11-20 @33  #define ELF_CORE_EFLAGS (is_elf2_task() ? 2 : 0)
918d0355 arch/powerpc/include/asm/elf.h Rusty Russell   2013-11-20  34  
5f149cf0 include/asm-powerpc/elf.h      Roland McGrath  2007-10-16  35  /*
5f149cf0 include/asm-powerpc/elf.h      Roland McGrath  2007-10-16  36   * Our registers are always unsigned longs, whether we're a 32 bit
5f149cf0 include/asm-powerpc/elf.h      Roland McGrath  2007-10-16  37   * process or 64 bit, on either a 64 bit or 32 bit kernel.
5f149cf0 include/asm-powerpc/elf.h      Roland McGrath  2007-10-16  38   *
5f149cf0 include/asm-powerpc/elf.h      Roland McGrath  2007-10-16  39   * This macro relies on elf_regs[i] having the right type to truncate to,
5f149cf0 include/asm-powerpc/elf.h      Roland McGrath  2007-10-16  40   * either u32 or u64.  It defines the body of the elf_core_copy_regs
5f149cf0 include/asm-powerpc/elf.h      Roland McGrath  2007-10-16  41   * function, either the native one with elf_gregset_t elf_regs or

:::::: The code at line 33 was first introduced by commit
:::::: 918d03552e031dcbdaa2a22da3c2abff5952c38a powerpc: Set eflags correctly for ELF ABIv2 core dumps.

:::::: TO: Rusty Russell <rusty@rustcorp.com.au>
:::::: CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 49909 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] powerpc/sparse: Add more assembler prototypes.
  2016-09-01 23:26 ` [PATCH 3/3] powerpc/sparse: Add more assembler prototypes Daniel Axtens
  2016-09-02  0:36   ` kbuild test robot
@ 2016-09-02  1:10   ` kbuild test robot
  1 sibling, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2016-09-02  1:10 UTC (permalink / raw)
  To: Daniel Axtens; +Cc: kbuild-all, linuxppc-dev, Daniel Axtens

[-- Attachment #1: Type: text/plain, Size: 6841 bytes --]

Hi Daniel,

[auto build test ERROR on v4.8-rc4]
[also build test ERROR on next-20160825]
[cannot apply to powerpc/next kvm-ppc/kvm-ppc-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Daniel-Axtens/powerpc-sparse-Make-a-bunch-of-things-static/20160902-075213
config: powerpc-cm5200_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   In file included from arch/powerpc/kernel/signal_32.c:47:0:
   arch/powerpc/include/asm/asm-prototypes.h:79:5: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
        unsigned long ioba, unsigned long tce);
        ^
   arch/powerpc/include/asm/asm-prototypes.h:79:5: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
   arch/powerpc/include/asm/asm-prototypes.h:82:7: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
          unsigned long tce_list, unsigned long npages);
          ^
   arch/powerpc/include/asm/asm-prototypes.h:85:7: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
          unsigned long tce_value, unsigned long npages);
          ^
   arch/powerpc/include/asm/asm-prototypes.h:87:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                                unsigned int yield_count);
                                ^
   arch/powerpc/include/asm/asm-prototypes.h:88:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
    long kvmppc_h_random(struct kvm_vcpu *vcpu);
                                ^
   arch/powerpc/include/asm/asm-prototypes.h:90:43: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
    long kvmppc_realmode_machine_check(struct kvm_vcpu *vcpu);
                                              ^
   arch/powerpc/include/asm/asm-prototypes.h:95:21: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                        long pte_index, unsigned long pteh, unsigned long ptel);
                        ^
   arch/powerpc/include/asm/asm-prototypes.h:97:22: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                         unsigned long pte_index, unsigned long avpn);
                         ^
   arch/powerpc/include/asm/asm-prototypes.h:98:34: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
    long kvmppc_h_bulk_remove(struct kvm_vcpu *vcpu);
                                     ^
   arch/powerpc/include/asm/asm-prototypes.h:101:23: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                          unsigned long va);
                          ^
   arch/powerpc/include/asm/asm-prototypes.h:103:20: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                       unsigned long pte_index);
                       ^
   arch/powerpc/include/asm/asm-prototypes.h:105:25: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                            unsigned long pte_index);
                            ^
   arch/powerpc/include/asm/asm-prototypes.h:107:25: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                            unsigned long pte_index);
                            ^
   arch/powerpc/include/asm/asm-prototypes.h:109:27: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                              unsigned long slb_v, unsigned int status, bool data);
                              ^
   arch/powerpc/include/asm/asm-prototypes.h:110:39: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
    unsigned long kvmppc_rm_h_xirr(struct kvm_vcpu *vcpu);
                                          ^
   arch/powerpc/include/asm/asm-prototypes.h:112:21: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
                        unsigned long mfrr);
                        ^
   arch/powerpc/include/asm/asm-prototypes.h:113:29: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
    int kvmppc_rm_h_cppr(struct kvm_vcpu *vcpu, unsigned long cppr);
                                ^
   arch/powerpc/include/asm/asm-prototypes.h:114:28: error: 'struct kvm_vcpu' declared inside parameter list [-Werror]
    int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr);
                               ^
>> arch/powerpc/kernel/signal_32.c:1122:6: error: conflicting types for 'sys_swapcontext'
    long sys_swapcontext(struct ucontext __user *old_ctx,
         ^
   In file included from arch/powerpc/kernel/signal_32.c:47:0:
   arch/powerpc/include/asm/asm-prototypes.h:118:5: note: previous declaration of 'sys_swapcontext' was here
    int sys_swapcontext(struct ucontext __user *old_ctx,
        ^
   cc1: all warnings being treated as errors

vim +/sys_swapcontext +1122 arch/powerpc/kernel/signal_32.c

2b0a576d arch/powerpc/kernel/signal_32.c Michael Neuling  2013-02-13  1116  		return -EFAULT;
2b0a576d arch/powerpc/kernel/signal_32.c Michael Neuling  2013-02-13  1117  
2b0a576d arch/powerpc/kernel/signal_32.c Michael Neuling  2013-02-13  1118  	return 0;
2b0a576d arch/powerpc/kernel/signal_32.c Michael Neuling  2013-02-13  1119  }
2b0a576d arch/powerpc/kernel/signal_32.c Michael Neuling  2013-02-13  1120  #endif
2b0a576d arch/powerpc/kernel/signal_32.c Michael Neuling  2013-02-13  1121  
81e7009e arch/powerpc/kernel/signal_32.c Stephen Rothwell 2005-10-18 @1122  long sys_swapcontext(struct ucontext __user *old_ctx,
81e7009e arch/powerpc/kernel/signal_32.c Stephen Rothwell 2005-10-18  1123  		     struct ucontext __user *new_ctx,
^1da177e arch/ppc64/kernel/signal32.c    Linus Torvalds   2005-04-16  1124  		     int ctx_size, int r6, int r7, int r8, struct pt_regs *regs)
^1da177e arch/ppc64/kernel/signal32.c    Linus Torvalds   2005-04-16  1125  {

:::::: The code at line 1122 was first introduced by commit
:::::: 81e7009ea46c951860b8716ee427ff4f54dd26fc powerpc: merge ppc signal.c and ppc64 signal32.c

:::::: TO: Stephen Rothwell <sfr@canb.auug.org.au>
:::::: CC: Stephen Rothwell <sfr@canb.auug.org.au>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 12445 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-02  1:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 23:26 [PATCH 1/3] powerpc/sparse: Make a bunch of things static Daniel Axtens
2016-09-01 23:26 ` [PATCH 2/3] powerpc/kvm: sparse: prototypes for functions called from assembler Daniel Axtens
2016-09-01 23:26 ` [PATCH 3/3] powerpc/sparse: Add more assembler prototypes Daniel Axtens
2016-09-02  0:36   ` kbuild test robot
2016-09-02  1:10   ` kbuild test robot
2016-09-01 23:38 ` [PATCH 1/3] powerpc/sparse: Make a bunch of things static Andrew Donnellan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).