[PATCH -next] sched/topology: Make some symbols static

2021-04-08 Thread Peng Wu
The sparse tool complains as follows:

kernel/sched/topology.c:211:1: warning:
 symbol 'sched_energy_mutex' was not declared. Should it be static?
kernel/sched/topology.c:212:6: warning:
 symbol 'sched_energy_update' was not declared. Should it be static?

This symbol is not used outside of topology.c, so this
commit marks it static.

Reported-by: Hulk Robot 
Signed-off-by: Peng Wu 
---
 kernel/sched/topology.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index d1aec244c027..25c3f88d43cd 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -208,8 +208,8 @@ sd_parent_degenerate(struct sched_domain *sd, struct 
sched_domain *parent)
 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
 DEFINE_STATIC_KEY_FALSE(sched_energy_present);
 unsigned int sysctl_sched_energy_aware = 1;
-DEFINE_MUTEX(sched_energy_mutex);
-bool sched_energy_update;
+static DEFINE_MUTEX(sched_energy_mutex);
+static bool sched_energy_update;
 
 void rebuild_sched_domains_energy(void)
 {



[PATCH -next] sched/topology: Make some symbols static

2021-04-08 Thread Peng Wu
The sparse tool complains as follows:

kernel/sched/topology.c:211:1: warning:
 symbol 'sched_energy_mutex' was not declared. Should it be static?
kernel/sched/topology.c:212:6: warning:
 symbol 'sched_energy_update' was not declared. Should it be static?

This symbol is not used outside of topology.c, so this
commit marks it static.

Reported-by: Hulk Robot 
Signed-off-by: Peng Wu 
---
 kernel/sched/topology.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index d1aec244c027..25c3f88d43cd 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -208,8 +208,8 @@ sd_parent_degenerate(struct sched_domain *sd, struct 
sched_domain *parent)
 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
 DEFINE_STATIC_KEY_FALSE(sched_energy_present);
 unsigned int sysctl_sched_energy_aware = 1;
-DEFINE_MUTEX(sched_energy_mutex);
-bool sched_energy_update;
+static DEFINE_MUTEX(sched_energy_mutex);
+static bool sched_energy_update;
 
 void rebuild_sched_domains_energy(void)
 {



[PATCH -next] emulate:Fix build error

2020-07-31 Thread Peng Wu
The declaration of function kvm_mips_complete_mmio_load
has only one formal parameter,but two parameters are passed
when called. So, the following error is seen while building
emulate.c

arch/mips/kvm/emulate.c: In function ‘kvm_mips_emulate_load’:
arch/mips/kvm/emulate.c:2130:3: error: too many arguments
to function ‘kvm_mips_complete_mmio_load’
   kvm_mips_complete_mmio_load(vcpu, run);
   ^~~
In file included from linux/include/linux/kvm_host.h:36,
 from linux/arch/mips/kvm/emulate.c:15:
arch/mips/include/asm/kvm_host.h:1072:30: note: declared here
extern enum emulation_result
kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu);

Signed-off-by: Peng Wu 
---
 arch/mips/kvm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
index 1d41965..7037823 100644
--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -2127,7 +2127,7 @@ enum emulation_result kvm_mips_emulate_load(union 
mips_instruction inst,
run->mmio.phys_addr, run->mmio.len, run->mmio.data);
 
if (!r) {
-   kvm_mips_complete_mmio_load(vcpu, run);
+   kvm_mips_complete_mmio_load(vcpu);
vcpu->mmio_needed = 0;
return EMULATE_DONE;
}
-- 
2.7.4



[PATCH -next] crc:Fix build errors

2020-07-26 Thread Peng Wu
If CONFIG_DRM_NOUVEAU=y,the following errors
are seen while building crc.h.

In file included from 
/scratch/linux/drivers/gpu/drm/nouveau/nouveau_display.c:47:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function 
‘nv50_head_crc_late_register’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:109:47: error: parameter 
name omitted
 static inline int nv50_head_crc_late_register(struct nv50_head *) {}
   ^~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:109:54: warning: no 
return statement in function returning non-void [-Wreturn-type]
 static inline int nv50_head_crc_late_register(struct nv50_head *) {}
  ^
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function 
‘nv50_crc_handle_vblank’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:111:57: warning: ‘return’ 
with a value, in function returning void
 nv50_crc_handle_vblank(struct nv50_head *head) { return 0; }
 ^
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:111:1: note: declared here
 nv50_crc_handle_vblank(struct nv50_head *head) { return 0; }
 ^~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function 
‘nv50_crc_atomic_check_head’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:114:28: error: parameter 
name omitted
 nv50_crc_atomic_check_head(struct nv50_head *, struct nv50_head_atom *,
^~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:114:48: error: parameter 
name omitted
 nv50_crc_atomic_check_head(struct nv50_head *, struct nv50_head_atom *,
^~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:115:7: error: parameter 
name omitted
   struct nv50_head_atom *) {}
   ^~~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:115:14: warning: no 
return statement in function returning non-void [-Wreturn-type]
   struct nv50_head_atom *) {}
  ^~
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function 
‘nv50_crc_atomic_stop_reporting’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:118:32: error: parameter 
name omitted
 nv50_crc_atomic_stop_reporting(struct drm_atomic_state *) {}
^
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function 
‘nv50_crc_atomic_init_notifier_contexts’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:120:40: error: parameter 
name omitted
 nv50_crc_atomic_init_notifier_contexts(struct drm_atomic_state *) {}
^
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h: In function 
‘nv50_crc_atomic_release_notifier_contexts’:
/scratch/linux/drivers/gpu/drm/nouveau/dispnv50/crc.h:122:43: error: parameter 
name omitted

Signed-off-by: Peng Wu 
---
 drivers/gpu/drm/nouveau/dispnv50/crc.h | 44 +-
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc.h 
b/drivers/gpu/drm/nouveau/dispnv50/crc.h
index 4bc59e7..3da16cd 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/crc.h
+++ b/drivers/gpu/drm/nouveau/dispnv50/crc.h
@@ -76,22 +76,22 @@ struct nv50_crc {
 };
 
 void nv50_crc_init(struct drm_device *dev);
-int nv50_head_crc_late_register(struct nv50_head *);
+int nv50_head_crc_late_register(struct nv50_head *head);
 void nv50_crc_handle_vblank(struct nv50_head *head);
 
-int nv50_crc_verify_source(struct drm_crtc *, const char *, size_t *);
-const char *const *nv50_crc_get_sources(struct drm_crtc *, size_t *);
-int nv50_crc_set_source(struct drm_crtc *, const char *);
+int nv50_crc_verify_source(struct drm_crtc *crtc, const char *source_name, 
size_t *values_cnt);
+const char *const *nv50_crc_get_sources(struct drm_crtc *crtc, size_t *count);
+int nv50_crc_set_source(struct drm_crtc *crtc, const char *source_str);
 
-int nv50_crc_atomic_check_head(struct nv50_head *, struct nv50_head_atom *,
-  struct nv50_head_atom *);
+int nv50_crc_atomic_check_head(struct nv50_head *head, struct nv50_head_atom 
*asyh,
+  struct nv50_head_atom *armh);
 void nv50_crc_atomic_check_outp(struct nv50_atom *atom);
-void nv50_crc_atomic_stop_reporting(struct drm_atomic_state *);
-void nv50_crc_atomic_init_notifier_contexts(struct drm_atomic_state *);
-void nv50_crc_atomic_release_notifier_contexts(struct drm_atomic_state *);
-void nv50_crc_atomic_start_reporting(struct drm_atomic_state *);
-void nv50_crc_atomic_set(struct nv50_head *, struct nv50_head_atom *);
-void nv50_crc_atomic_clr(struct nv50_head *);
+void nv50_crc_atomic_stop_reporting(struct drm_atomic_state *state);
+void nv50_crc_atomic_init_notifier_contexts(struct