[PATCH] regulator: mt6360: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-15 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: drivers/regulator/mt6360-regulator.c:386:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Guangqing Zhu --- drivers/regulator/mt6360-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH] drivers: ipa: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-15 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: drivers/net/ipa/ipa_smp2p.c:186:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Guangqing Zhu --- drivers/net/ipa/ipa_smp2p.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] Input: goodix - Fix missing IRQF_ONESHOT as only threaded handler

2021-04-15 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: drivers/input/touchscreen/goodix.c:497:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Guangqing Zhu --- drivers/input/touchscreen/goodix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH] Input: twl4030_keypad - Fix missing IRQF_ONESHOT as only threaded handler

2021-04-15 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: drivers/input/keyboard/twl4030_keypad.c:413:9-34: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Guangqing Zhu --- drivers/input/keyboard/twl4030_keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] rtc: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-15 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: 1. drivers/rtc/rtc-s5m.c:810:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT 2. drivers/rtc/rtc-rk808.c:441:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT 3.

[PATCH] extcon: maxim: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-15 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: 1. drivers/extcon/extcon-max14577.c:699:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT 2. drivers/extcon/extcon-max77693.c:1143:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT 3.

[PATCH] platform/x86: intel_chtdc_ti_pwrbtn: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-15 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: drivers/platform/x86/intel_chtdc_ti_pwrbtn.c:59:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Guangqing Zhu --- drivers/platform/x86/intel_chtdc_ti_pwrbtn.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] ASoC: codecs: wcd934x: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-15 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: sound/soc/codecs/wcd934x.c:5041:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Guangqing Zhu --- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] power: supply: cpcap-battery: fix invalid usage of list cursor

2021-04-14 Thread zhuguangqing83
From: Guangqing Zhu Fix invalid usage of a list_for_each_entry in cpcap_battery_irq_thread(). When list is empty or if the list is completely traversed (without breaking from the loop on one of the entries) then the list cursor does not point to a valid entry and therefore should not be used.

[PATCH] irq: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-13 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: kernel/irq/manage.c:2199:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT. Signed-off-by: Guangqing Zhu --- kernel/irq/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/manage.c

[PATCH] power: supply: Fix missing IRQF_ONESHOT as only threaded handler

2021-04-05 Thread zhuguangqing83
From: Guangqing Zhu Coccinelle noticed: 1. drivers/power/supply/pm2301_charger.c:1089:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT 2. drivers/power/supply/tps65090-charger.c:303:8-33: ERROR: Threaded IRQ with no primary handler requested without

[PATCH v2] thermal/drivers/tsens: fix missing put_device error

2021-04-04 Thread zhuguangqing83
From: Guangqing Zhu Fixes coccicheck error: drivers/thermal/qcom/tsens.c:759:4-10: ERROR: missing put_device; call of_find_device_by_node on line 715, but without a corresponding object release within this function. Fixes: a7ff82976122 ("drivers: thermal: tsens: Merge tsens-common.c into

[PATCH] thermal/drivers/tsens: fix missing put_device error

2021-04-03 Thread zhuguangqing83
From: Guangqing Zhu Fixes coccicheck error: drivers/thermal/qcom/tsens.c:759:4-10: ERROR: missing put_device; call of_find_device_by_node on line 715, but without a corresponding object release within this function. Fixes: a7ff82976122 ("drivers: thermal: tsens: Merge tsens-common.c into

[PATCH] thermal/drivers/cpuidle_cooling: Make sure that idle_duration is larger than residency

2021-04-01 Thread zhuguangqing83
From: Guangqing Zhu The injected idle duration should be greater than the idle state min residency, otherwise we end up consuming more energy and potentially invert the mitigation effect. In function __cpuidle_cooling_register(), if of_property_read_u32(np, "exit-latency-us", _us) is failed,

[PATCH v2] thermal/drivers/cpufreq_cooling: Update cpufreq_state only if state has changed

2020-11-06 Thread zhuguangqing83
From: Zhuguangqing If state has not changed successfully and we updated cpufreq_state, next time when the new state is equal to cpufreq_state (not changed successfully last time), we will return directly and miss a freq_qos_update_request() that should have been. Fixes: 5130802ddbb1 ("thermal:

[PATCH] thermal/drivers/cpufreq_cooling: Update cpufreq_state only if state has changed

2020-11-05 Thread zhuguangqing83
From: zhuguangqing If state has not changed successfully and we updated cpufreq_state, next time when the new state is equal to cpufreq_state (not changed successfully last time), we will return directly and miss a freq_qos_update_request() that should have been. Signed-off-by: zhuguangqing

Re: [PATCH] cpufreq: schedutil: set sg_policy->next_freq to the final cpufreq

2020-10-29 Thread zhuguangqing83
On 10/29/2020 15:19,Viresh Kumar wrote: > Your mail client is screwing the "In-reply-to" field of the message > and that prevents it to appear properly in the thread in mailboxes of > other people, please fix that. > I will try to fix that. > On 29-10-20, 09:43, zhuguan

Re: [PATCH] cpufreq: schedutil: set sg_policy->next_freq to the final cpufreq

2020-10-28 Thread zhuguangqing83
> On 28-10-20, 19:03, zhuguangqing83 wrote: > > Thanks for your comments. Maybe my description was not clear before. > > > > If I understand correctly, when policy->min/max get changed in the time > > Window between get_next_freq() and sugov_fast_switch(),

Re: [PATCH] cpufreq: schedutil: set sg_policy->next_freq to the final cpufreq

2020-10-28 Thread zhuguangqing83
> On 27-10-20, 19:54, zhuguangqin...@gmail.com wrote: > > From: zhuguangqing > > > > In the following code path, next_freq is clamped between policy->min > > and policy->max twice in functions cpufreq_driver_resolve_freq() and > > cpufreq_driver_fast_switch(). For there is no update_lock in the

[PATCH] cpufreq: schedutil: set sg_policy->next_freq to the final cpufreq

2020-10-27 Thread zhuguangqing83
From: zhuguangqing In the following code path, next_freq is clamped between policy->min and policy->max twice in functions cpufreq_driver_resolve_freq() and cpufreq_driver_fast_switch(). For there is no update_lock in the code path, policy->min and policy->max may be modified (one or more

[PATCH] sched: Replace zero-length array with flexible-array

2020-10-14 Thread zhuguangqing83
From: zhuguangqing In commit 04f5c362ec6, a zero-length array cpumask[0] has been replaced with cpumask[]. But there is still a cpumask[0] in struct sched_group_capacity{} which maybe missed. The current codebase makes use of the zero-length array language extension to the C90 standard, but the

Re: [PATCH] PM / EM: consult something about cpumask in em_dev_register_perf_domain

2020-10-12 Thread zhuguangqing83
> > Hi, > > On Monday 12 Oct 2020 at 20:41:36 (+0800), zhuguangqin...@gmail.com wrote: > > From: zhuguangqing > > > > Hi, Lukasz, Quentin > > I have three questions to consult about cpumask in energy_model.c. > > OK, let's see if we can help :) > Thanks for your help and review. > > 1,

[PATCH] PM / EM: consult something about cpumask in em_dev_register_perf_domain

2020-10-12 Thread zhuguangqing83
From: zhuguangqing Hi, Lukasz, Quentin I have three questions to consult about cpumask in energy_model.c. 1, The first one is about the meanings of the following two parameters, [1] and [2]. [1]: "cpumask_t *cpus" in function em_dev_register_perf_domain(): Pointer to cpumask_t, which in case

Re: [PATCH] cpuidle: change #ifdef for the declaration of cpuidle_enter_s2idle()

2020-09-25 Thread zhuguangqing83
> On Thu, Sep 24, 2020 at 10:01 AM wrote: > > > > From: zhuguangqing > > > > Currently, if CONFIG_SUSPEND=n and CONFIG_CPU_IDLE=y, the function > > cpuidle_enter_s2idle() is declared but not defined, it may cause error > > when cpuidle_enter_s2idle() is called. > > > > If CONFIG_SUSPEND=y and

[PATCH] cpuidle: change #ifdef for the declaration of cpuidle_enter_s2idle()

2020-09-24 Thread zhuguangqing83
From: zhuguangqing Currently, if CONFIG_SUSPEND=n and CONFIG_CPU_IDLE=y, the function cpuidle_enter_s2idle() is declared but not defined, it may cause error when cpuidle_enter_s2idle() is called. If CONFIG_SUSPEND=y and CONFIG_CPU_IDLE=n, the function cpuidle_enter_s2idle() is defined as

[PATCH] thermal/drivers/cpuidle_cooling: Change the latency limit

2020-09-18 Thread zhuguangqing83
From: zhuguangqing The injected idle duration must be greater than the wake up latency (entry + exit latency) or the idle state target residency (or min residency), otherwise we end up consuming more energy and potentially invert the mitigation effect. In function idle_inject_fn(), we call

Re: [PATCH] thermal/drivers/cpuidle_cooling: Change the set_cur_state function

2020-09-17 Thread zhuguangqing83
> > On 17/09/2020 13:15, zhuguangqing83 wrote: > > > >>> From: zhuguangqing > >>> > >>> In the function cpuidle_cooling_set_cur_state(), if current_state is > >>> not equal to state and both current_state and state are greater than &

Re: [PATCH] thermal/drivers/cpuidle_cooling: Change the set_cur_state function

2020-09-17 Thread zhuguangqing83
> > From: zhuguangqing > > > > In the function cpuidle_cooling_set_cur_state(), if current_state is > > not equal to state and both current_state and state are greater than > > 0(scene 4 as follows), then maybe it should stop->start or restart > > idle_inject. > > Sorry, I don't get it. > >

[PATCH] thermal/idle_inject: Fix comment of idle_duration_us and name of latency_ns

2020-09-17 Thread zhuguangqing83
From: zhuguangqing The comment of idle_duration_us and the name of latency_ns can be misleading, so fix them. Signed-off-by: zhuguangqing --- drivers/thermal/cpuidle_cooling.c | 2 +- include/linux/idle_inject.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] thermal/drivers/cpuidle_cooling: Change the set_cur_state function

2020-09-17 Thread zhuguangqing83
From: zhuguangqing In the function cpuidle_cooling_set_cur_state(), if current_state is not equal to state and both current_state and state are greater than 0(scene 4 as follows), then maybe it should stop->start or restart idle_inject. The scenes changed is as follows, scenecurrent_state

[PATCH] thermal: Fix slab-out-of-bounds in thermal_cooling_device_stats_update()

2020-09-14 Thread zhuguangqing83
From: zhuguangqing In function thermal_cooling_device_stats_update(), if the input parameter new_state is greater or equal to stats->max_states, then it will cause slab-out-of-bounds error when execute the code as follows: stats->trans_table[stats->state * stats->max_states + new_state]++; Two

[PATCH] thermal: cooling: Remove unused variable *tz

2020-09-14 Thread zhuguangqing83
From: zhuguangqing 1. devfreq_cooling.c: The variable *tz is not used in devfreq_cooling_get_requested_power(), devfreq_cooling_state2power() and devfreq_cooling_power2state(). 2. cpufreq_cooling.c: After 84fe2cab48590, the variable *tz is not used anymore in cpufreq_get_requested_power(),

[PATCH] PM/wakeup: Add print_wakeup_sour_stats(m, _ws)

2019-10-21 Thread zhuguangqing83
From: zhuguangqing After commit 00ee22c28915 (PM / wakeup: Use seq_open() to show wakeup stats), print_wakeup_source_stats(m, _ws) is deleted in function wakeup_sources_stats_seq_show(). Because deleted_ws is one of wakeup sources, so it should also be showed. This patch add it to the end of