asoc: holi: address checkpatch error and warning
Checkpatch tool generates some errors and warnings due to added PM QoS feature This change fixes these issues. Change-Id: I0843ecd33144d7ac65649ee90ed156e97a1a2f8a Signed-off-by: George Gao <georgao@codeaurora.org>
This commit is contained in:
parent
f286b6fbf3
commit
c5394cf277
@ -753,25 +753,23 @@ static struct wcd_mbhc_config wcd_mbhc_cfg = {
|
||||
/* set audio task affinity to core 1 & 2 */
|
||||
static const unsigned int audio_core_list[] = {1, 2};
|
||||
static cpumask_t audio_cpu_map = CPU_MASK_NONE;
|
||||
static struct dev_pm_qos_request *msm_audio_req = NULL;
|
||||
static unsigned int qos_client_active_cnt = 0;
|
||||
static struct dev_pm_qos_request *msm_audio_req;
|
||||
static unsigned int qos_client_active_cnt;
|
||||
|
||||
static void msm_audio_add_qos_request()
|
||||
static void msm_audio_add_qos_request(void)
|
||||
{
|
||||
int i;
|
||||
int cpu = 0;
|
||||
|
||||
msm_audio_req = kzalloc(sizeof(struct dev_pm_qos_request) * NR_CPUS,
|
||||
GFP_KERNEL);
|
||||
if (!msm_audio_req) {
|
||||
pr_err("%s failed to alloc mem for qos req.\n", __func__);
|
||||
msm_audio_req = kcalloc(num_possible_cpus(),
|
||||
sizeof(struct dev_pm_qos_request), GFP_KERNEL);
|
||||
if (!msm_audio_req)
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(audio_core_list); i++) {
|
||||
if (audio_core_list[i] >= NR_CPUS)
|
||||
if (audio_core_list[i] >= num_possible_cpus())
|
||||
pr_err("%s incorrect cpu id: %d specified.\n",
|
||||
__func__, audio_core_list[i]);
|
||||
__func__, audio_core_list[i]);
|
||||
else
|
||||
cpumask_set_cpu(audio_core_list[i], &audio_cpu_map);
|
||||
}
|
||||
@ -785,7 +783,7 @@ static void msm_audio_add_qos_request()
|
||||
}
|
||||
}
|
||||
|
||||
static void msm_audio_remove_qos_request()
|
||||
static void msm_audio_remove_qos_request(void)
|
||||
{
|
||||
int cpu = 0;
|
||||
|
||||
@ -794,7 +792,7 @@ static void msm_audio_remove_qos_request()
|
||||
dev_pm_qos_remove_request(
|
||||
&msm_audio_req[cpu]);
|
||||
pr_debug("%s remove cpu affinity of core %d.\n",
|
||||
__func__, cpu);
|
||||
__func__, cpu);
|
||||
}
|
||||
kfree(msm_audio_req);
|
||||
}
|
||||
@ -809,7 +807,7 @@ static void msm_audio_update_qos_request(u32 latency)
|
||||
dev_pm_qos_update_request(
|
||||
&msm_audio_req[cpu], latency);
|
||||
pr_debug("%s update latency of core %d to %ul.\n",
|
||||
__func__, cpu, latency);
|
||||
__func__, cpu, latency);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user