kernel: Fix build errors with LLVM

This patch intends to fix compilation errors
while building kernel with LLVM toolchain.

Change-Id: I76c4f97d8a0efb44434d54fb07cae23b050d2003
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
This commit is contained in:
Swetha Chikkaboraiah 2020-03-02 10:55:12 +05:30 committed by Gerrit - the friendly Code Review server
parent 5a6566f225
commit 6dbab77b6d
27 changed files with 122 additions and 113 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013-2014, 2016-2017, * Copyright (c) 2013-2014, 2016-2017, 2020,
* *
* The Linux Foundation. All rights reserved. * The Linux Foundation. All rights reserved.
* *
@ -177,13 +177,12 @@ static int clk_debug_mux_set_parent(struct clk_hw *hw, u8 index)
regval |= (meas->parent[index].next_sel & meas->mask); regval |= (meas->parent[index].next_sel & meas->mask);
if (meas->parent[index].en_mask == 0xFF) if (meas->parent[index].en_mask != 0xFF) {
/* Skip en_mask */ if (meas->parent[index].en_mask)
regval = regval; regval |= meas->parent[index].en_mask;
else if (meas->parent[index].en_mask) else
regval |= meas->parent[index].en_mask; regval |= meas->en_mask;
else }
regval |= meas->en_mask;
regmap_write(meas->regmap[dbg_cc], 0x0, regval); regmap_write(meas->regmap[dbg_cc], 0x0, regval);
} }

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2016,2019 The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2016, 2019-2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -1844,7 +1844,7 @@ static int hfi_process_session_rel_buf_done(u32 device_id,
cmd_done.size = sizeof(struct msm_vidc_cb_cmd_done); cmd_done.size = sizeof(struct msm_vidc_cb_cmd_done);
cmd_done.session_id = (void *)(uintptr_t)pkt->session_id; cmd_done.session_id = (void *)(uintptr_t)pkt->session_id;
cmd_done.status = hfi_map_err_status(pkt->error_type); cmd_done.status = hfi_map_err_status(pkt->error_type);
if (pkt->rg_buffer_info) { if (pkt->rg_buffer_info != NULL) {
cmd_done.data.buffer_info.buffer_addr = *pkt->rg_buffer_info; cmd_done.data.buffer_info.buffer_addr = *pkt->rg_buffer_info;
cmd_done.size = sizeof(struct hal_buffer_info); cmd_done.size = sizeof(struct hal_buffer_info);
} else { } else {

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -1542,16 +1542,17 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst)
return 0; return 0;
} }
static void close_helper(struct kref *kref)
{
struct msm_vidc_inst *inst = container_of(kref,
struct msm_vidc_inst, kref);
msm_vidc_destroy(inst);
}
int msm_vidc_close(void *instance) int msm_vidc_close(void *instance)
{ {
void close_helper(struct kref *kref)
{
struct msm_vidc_inst *inst = container_of(kref,
struct msm_vidc_inst, kref);
msm_vidc_destroy(inst);
}
struct msm_vidc_inst *inst = instance; struct msm_vidc_inst *inst = instance;
struct buffer_info *bi, *dummy; struct buffer_info *bi, *dummy;
int rc = 0, i = 0; int rc = 0, i = 0;

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -712,16 +712,17 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data)
return; return;
} }
static void put_inst_helper(struct kref *kref)
{
struct msm_vidc_inst *inst = container_of(kref,
struct msm_vidc_inst, kref);
msm_vidc_destroy(inst);
}
static void put_inst(struct msm_vidc_inst *inst) static void put_inst(struct msm_vidc_inst *inst)
{ {
void put_inst_helper(struct kref *kref)
{
struct msm_vidc_inst *inst = container_of(kref,
struct msm_vidc_inst, kref);
msm_vidc_destroy(inst);
}
if (!inst) if (!inst)
return; return;

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -54,13 +54,13 @@ fail_read:
return 0; return 0;
} }
static bool is_compatible(char *compat)
{
return !!of_find_compatible_node(NULL, NULL, compat);
}
static inline enum imem_type read_imem_type(struct platform_device *pdev) static inline enum imem_type read_imem_type(struct platform_device *pdev)
{ {
bool is_compatible(char *compat)
{
return !!of_find_compatible_node(NULL, NULL, compat);
}
return is_compatible("qcom,msm-ocmem") ? IMEM_OCMEM : return is_compatible("qcom,msm-ocmem") ? IMEM_OCMEM :
is_compatible("qcom,msm-vmem") ? IMEM_VMEM : is_compatible("qcom,msm-vmem") ? IMEM_VMEM :
IMEM_NONE; IMEM_NONE;
@ -518,20 +518,19 @@ error:
return rc; return rc;
} }
static int cmp(const void *a, const void *b)
{
/* want to sort in reverse so flip the comparison */
return ((struct load_freq_table *)b)->load -
((struct load_freq_table *)a)->load;
}
static int msm_vidc_load_freq_table(struct msm_vidc_platform_resources *res) static int msm_vidc_load_freq_table(struct msm_vidc_platform_resources *res)
{ {
int rc = 0; int rc = 0;
int num_elements = 0; int num_elements = 0;
struct platform_device *pdev = res->pdev; struct platform_device *pdev = res->pdev;
/* A comparator to compare loads (needed later on) */
int cmp(const void *a, const void *b)
{
/* want to sort in reverse so flip the comparison */
return ((struct load_freq_table *)b)->load -
((struct load_freq_table *)a)->load;
}
if (!of_find_property(pdev->dev.of_node, "qcom,load-freq-tbl", NULL)) { if (!of_find_property(pdev->dev.of_node, "qcom,load-freq-tbl", NULL)) {
/* qcom,load-freq-tbl is an optional property. It likely won't /* qcom,load-freq-tbl is an optional property. It likely won't
* be present on cores that we can't clock scale on. */ * be present on cores that we can't clock scale on. */

View file

@ -381,6 +381,7 @@ static void execute_user_location(void *dst)
static void lkdtm_do_action(enum ctype which) static void lkdtm_do_action(enum ctype which)
{ {
int *ptr = NULL;
switch (which) { switch (which) {
case CT_PANIC: case CT_PANIC:
panic("dumptest"); panic("dumptest");
@ -392,7 +393,7 @@ static void lkdtm_do_action(enum ctype which)
WARN_ON(1); WARN_ON(1);
break; break;
case CT_EXCEPTION: case CT_EXCEPTION:
*((int *) 0) = 0; *ptr = 0;
break; break;
case CT_LOOP: case CT_LOOP:
for (;;) for (;;)

View file

@ -29,6 +29,7 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
{ {
unsigned i, nr_strings; unsigned i, nr_strings;
char **buffer, *string; char **buffer, *string;
size_t buf_size = 0;
/* Find all null-terminated (including zero length) strings in /* Find all null-terminated (including zero length) strings in
the TPLLV1_INFO field. Trailing garbage is ignored. */ the TPLLV1_INFO field. Trailing garbage is ignored. */
@ -55,7 +56,8 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
for (i = 0; i < nr_strings; i++) { for (i = 0; i < nr_strings; i++) {
buffer[i] = string; buffer[i] = string;
strlcpy(string, buf, strlen(buf) + 1); buf_size = strlen(buf);
strlcpy(string, buf, buf_size + 1);
string += strlen(string) + 1; string += strlen(string) + 1;
buf += strlen(buf) + 1; buf += strlen(buf) + 1;
} }

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -1529,16 +1529,13 @@ void ipahal_get_disable_aggr_valmask(struct ipahal_reg_valmask *valmask)
IPAHAL_ERR("Input error\n"); IPAHAL_ERR("Input error\n");
return; return;
} }
valmask->val = (1 << IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT) &
IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK;
valmask->mask = IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK;
valmask->val = (1 & IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK) << valmask->val |= ((0 << IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT) &
IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT; IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK);
valmask->mask = IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_BMSK << valmask->mask |= IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK;
IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT;
valmask->val |= ((0 & IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK) <<
IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT);
valmask->mask |= ((IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK <<
IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT));
} }
u32 ipahal_aggr_get_max_byte_limit(void) u32 ipahal_aggr_get_max_byte_limit(void)

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2017, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -1400,7 +1400,7 @@ void usb_bam_finish_suspend_(struct work_struct *w)
info_ptr = container_of(w, struct usb_bam_ipa_handshake_info, info_ptr = container_of(w, struct usb_bam_ipa_handshake_info,
finish_suspend_work); finish_suspend_work);
cur_bam = info_ptr->cur_bam_mode; cur_bam = (enum usb_ctrl)(info_ptr->cur_bam_mode);
log_event_dbg("%s: Finishing suspend sequence(BAM=%s)\n", __func__, log_event_dbg("%s: Finishing suspend sequence(BAM=%s)\n", __func__,
bam_enable_strings[cur_bam]); bam_enable_strings[cur_bam]);

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2014, 2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2014, 2017, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -227,8 +227,8 @@ int msm_bcl_enable(void)
int ret = 0, i = 0; int ret = 0, i = 0;
struct bcl_param_data *param_data = NULL; struct bcl_param_data *param_data = NULL;
if (!bcl[i] || !bcl[BCL_PARAM_VOLTAGE]->thresh if (!bcl[i] || (bcl[BCL_PARAM_VOLTAGE]->thresh == NULL)
|| !bcl[BCL_PARAM_CURRENT]->thresh) { || (bcl[BCL_PARAM_CURRENT]->thresh == NULL)) {
pr_err("BCL not initialized\n"); pr_err("BCL not initialized\n");
return -EINVAL; return -EINVAL;
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -1671,8 +1671,8 @@ static int qpnp_lcdb_init_bst(struct qpnp_lcdb *lcdb)
if (lcdb->bst.ps != -EINVAL) { if (lcdb->bst.ps != -EINVAL) {
rc = qpnp_lcdb_masked_write(lcdb, lcdb->base + rc = qpnp_lcdb_masked_write(lcdb, lcdb->base +
LCDB_PS_CTL_REG, EN_PS_BIT, LCDB_PS_CTL_REG, EN_PS_BIT,
&lcdb->bst.ps ? EN_PS_BIT : 0); lcdb->bst.ps ? EN_PS_BIT : 0);
if (rc < 0) { if (rc < 0) {
pr_err("Failed to disable BST PS rc=%d", rc); pr_err("Failed to disable BST PS rc=%d", rc);
return rc; return rc;

View file

@ -1,5 +1,4 @@
/* Copyright (c) 2010-2012, 2014-2015, 2017 The Linux Foundation. All rights /* Copyright (c) 2010-2012, 2014-2015, 2017, 2020, The Linux Foundation. All rights reserved.
* reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -577,7 +576,6 @@ static ssize_t msm_bus_dbg_update_request_write(struct file *file,
list_for_each_entry(cldata, &cl_list, list) { list_for_each_entry(cldata, &cl_list, list) {
if (strnstr(chid, cldata->pdata->name, cnt)) { if (strnstr(chid, cldata->pdata->name, cnt)) {
found = 1; found = 1;
cldata = cldata;
strsep(&chid, " "); strsep(&chid, " ");
if (chid) { if (chid) {
ret = kstrtoul(chid, 10, &index); ret = kstrtoul(chid, 10, &index);

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2017, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -65,8 +65,8 @@ static struct rule_node_info *get_node(u32 id, void *data)
list_for_each_entry(node_it, &node_list, link) { list_for_each_entry(node_it, &node_list, link) {
if (node_it->id == id) { if (node_it->id == id) {
if ((id == NB_ID)) { if (id == NB_ID) {
if ((node_it->data == data)) { if (node_it->data == data) {
node_match = node_it; node_match = node_it;
break; break;
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2014-2018, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -2728,9 +2728,9 @@ error:
for (i = 0; i < num_clusters; i++) { for (i = 0; i < num_clusters; i++) {
if (!managed_clusters[i]) if (!managed_clusters[i])
break; break;
if (managed_clusters[i]->offlined_cpus) if (managed_clusters[i]->offlined_cpus != NULL)
free_cpumask_var(managed_clusters[i]->offlined_cpus); free_cpumask_var(managed_clusters[i]->offlined_cpus);
if (managed_clusters[i]->cpus) if (managed_clusters[i]->cpus != NULL)
free_cpumask_var(managed_clusters[i]->cpus); free_cpumask_var(managed_clusters[i]->cpus);
kfree(managed_clusters[i]); kfree(managed_clusters[i]);
} }

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2014, 2016, 2018-2019 The Linux Foundation. /* Copyright (c) 2010-2014, 2016, 2018-2020 The Linux Foundation.
* All rights reserved. * All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -748,7 +748,7 @@ int apr_get_svc(const char *svc_name, int domain_id, int *client_id,
struct apr_svc_table *tbl; struct apr_svc_table *tbl;
int ret = 0; int ret = 0;
if ((domain_id == APR_DOMAIN_ADSP)) { if (domain_id == APR_DOMAIN_ADSP) {
tbl = (struct apr_svc_table *)&svc_tbl_qdsp6; tbl = (struct apr_svc_table *)&svc_tbl_qdsp6;
size = ARRAY_SIZE(svc_tbl_qdsp6); size = ARRAY_SIZE(svc_tbl_qdsp6);
} else if (domain_id == APR_DOMAIN_SDSP) { } else if (domain_id == APR_DOMAIN_SDSP) {

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2016, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -298,6 +298,7 @@ static int msm_rpmstats_probe(struct platform_device *pdev)
void __iomem *offset_addr = NULL; void __iomem *offset_addr = NULL;
struct resource res; struct resource res;
int i, ret = 0; int i, ret = 0;
size_t master_name_len = 0;
if (!pdev) if (!pdev)
return -EINVAL; return -EINVAL;
@ -365,7 +366,7 @@ static int msm_rpmstats_probe(struct platform_device *pdev)
* Read master names from DT * Read master names from DT
*/ */
for (i = 0; i < ss.num_masters; i++) { for (i = 0; i < ss.num_masters; i++) {
const char *master_name; const char *master_name = NULL;
of_property_read_string_index(pdev->dev.of_node, of_property_read_string_index(pdev->dev.of_node,
"qcom,masters", "qcom,masters",
@ -377,8 +378,9 @@ static int msm_rpmstats_probe(struct platform_device *pdev)
pr_err("%s:Failed to get memory\n", __func__); pr_err("%s:Failed to get memory\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
master_name_len = strlen(master_name);
strlcpy(ss.master[i], master_name, strlcpy(ss.master[i], master_name,
strlen(master_name) + 1); master_name_len + 1);
} }
dent = debugfs_create_file("system_stats", S_IRUGO, NULL, dent = debugfs_create_file("system_stats", S_IRUGO, NULL,

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2017, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -995,7 +995,8 @@ static int tsens_tm_activate_trip_type(struct thermal_zone_device *thermal,
switch (trip) { switch (trip) {
case TSENS_TM_TRIP_CRITICAL: case TSENS_TM_TRIP_CRITICAL:
tmdev->sensor[tm_sensor->sensor_hw_num]. tmdev->sensor[tm_sensor->sensor_hw_num].
debug_thr_state_copy.crit_th_state = mode; debug_thr_state_copy.crit_th_state =
(enum thermal_device_mode) mode;
reg_cntl = readl_relaxed(TSENS_TM_CRITICAL_INT_MASK reg_cntl = readl_relaxed(TSENS_TM_CRITICAL_INT_MASK
(tmdev->tsens_addr)); (tmdev->tsens_addr));
if (mode == THERMAL_TRIP_ACTIVATION_DISABLED) if (mode == THERMAL_TRIP_ACTIVATION_DISABLED)
@ -1009,7 +1010,8 @@ static int tsens_tm_activate_trip_type(struct thermal_zone_device *thermal,
break; break;
case TSENS_TM_TRIP_WARM: case TSENS_TM_TRIP_WARM:
tmdev->sensor[tm_sensor->sensor_hw_num]. tmdev->sensor[tm_sensor->sensor_hw_num].
debug_thr_state_copy.high_th_state = mode; debug_thr_state_copy.high_th_state =
(enum thermal_device_mode) mode;
reg_cntl = readl_relaxed(TSENS_TM_UPPER_LOWER_INT_MASK reg_cntl = readl_relaxed(TSENS_TM_UPPER_LOWER_INT_MASK
(tmdev->tsens_addr)); (tmdev->tsens_addr));
if (mode == THERMAL_TRIP_ACTIVATION_DISABLED) if (mode == THERMAL_TRIP_ACTIVATION_DISABLED)
@ -1025,7 +1027,8 @@ static int tsens_tm_activate_trip_type(struct thermal_zone_device *thermal,
break; break;
case TSENS_TM_TRIP_COOL: case TSENS_TM_TRIP_COOL:
tmdev->sensor[tm_sensor->sensor_hw_num]. tmdev->sensor[tm_sensor->sensor_hw_num].
debug_thr_state_copy.low_th_state = mode; debug_thr_state_copy.low_th_state =
(enum thermal_device_mode) mode;
reg_cntl = readl_relaxed(TSENS_TM_UPPER_LOWER_INT_MASK reg_cntl = readl_relaxed(TSENS_TM_UPPER_LOWER_INT_MASK
(tmdev->tsens_addr)); (tmdev->tsens_addr));
if (mode == THERMAL_TRIP_ACTIVATION_DISABLED) if (mode == THERMAL_TRIP_ACTIVATION_DISABLED)
@ -1071,7 +1074,8 @@ static int tsens_tz_activate_trip_type(struct thermal_zone_device *thermal,
switch (trip) { switch (trip) {
case TSENS_TRIP_WARM: case TSENS_TRIP_WARM:
tmdev->sensor[tm_sensor->sensor_hw_num]. tmdev->sensor[tm_sensor->sensor_hw_num].
debug_thr_state_copy.high_th_state = mode; debug_thr_state_copy.high_th_state =
(enum thermal_device_mode)mode;
code = (reg_cntl & TSENS_UPPER_THRESHOLD_MASK) code = (reg_cntl & TSENS_UPPER_THRESHOLD_MASK)
>> TSENS_UPPER_THRESHOLD_SHIFT; >> TSENS_UPPER_THRESHOLD_SHIFT;
@ -1082,7 +1086,8 @@ static int tsens_tz_activate_trip_type(struct thermal_zone_device *thermal,
break; break;
case TSENS_TRIP_COOL: case TSENS_TRIP_COOL:
tmdev->sensor[tm_sensor->sensor_hw_num]. tmdev->sensor[tm_sensor->sensor_hw_num].
debug_thr_state_copy.low_th_state = mode; debug_thr_state_copy.low_th_state =
(enum thermal_device_mode)mode;
code = (reg_cntl & TSENS_LOWER_THRESHOLD_MASK); code = (reg_cntl & TSENS_LOWER_THRESHOLD_MASK);
mask = TSENS_LOWER_STATUS_CLR; mask = TSENS_LOWER_STATUS_CLR;

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -2803,7 +2803,7 @@ static int do_vdd_mx(void)
} }
} }
if ((dis_cnt == thresh[MSM_VDD_MX_RESTRICTION].thresh_ct)) { if (dis_cnt == thresh[MSM_VDD_MX_RESTRICTION].thresh_ct) {
ret = remove_vdd_mx_restriction(); ret = remove_vdd_mx_restriction();
if (ret) if (ret)
pr_err("Failed to remove vdd mx restriction\n"); pr_err("Failed to remove vdd mx restriction\n");
@ -6293,7 +6293,7 @@ static int fetch_cpu_mitigaiton_info(struct msm_thermal_data *data,
struct platform_device *pdev) struct platform_device *pdev)
{ {
int _cpu = 0, err = 0; int _cpu = 0, err = 0, sensor_name_len = 0;
struct device_node *cpu_node = NULL, *limits = NULL, *tsens = NULL; struct device_node *cpu_node = NULL, *limits = NULL, *tsens = NULL;
char *key = NULL; char *key = NULL;
struct device_node *node = pdev->dev.of_node; struct device_node *node = pdev->dev.of_node;
@ -6351,8 +6351,9 @@ static int fetch_cpu_mitigaiton_info(struct msm_thermal_data *data,
err = -ENOMEM; err = -ENOMEM;
goto fetch_mitig_exit; goto fetch_mitig_exit;
} }
sensor_name_len = strlen(sensor_name);
strlcpy((char *) cpus[_cpu].sensor_type, sensor_name, strlcpy((char *) cpus[_cpu].sensor_type, sensor_name,
strlen(sensor_name) + 1); sensor_name_len + 1);
create_alias_name(_cpu, limits, pdev); create_alias_name(_cpu, limits, pdev);
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved. * Copyright (c) 2011-2017, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -544,12 +544,6 @@ static int qpnp_tm_probe(struct platform_device *pdev)
int rc = 0; int rc = 0;
u8 raw_type[2], type, subtype; u8 raw_type[2], type, subtype;
if (!pdev || !(&pdev->dev) || !pdev->dev.of_node) {
dev_err(&pdev->dev, "%s: device tree node not found\n",
__func__);
return -EINVAL;
}
node = pdev->dev.of_node; node = pdev->dev.of_node;
chip = kzalloc(sizeof(struct qpnp_tm_chip), GFP_KERNEL); chip = kzalloc(sizeof(struct qpnp_tm_chip), GFP_KERNEL);

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -168,7 +168,7 @@ void mdss_check_dsi_ctrl_status(struct work_struct *work, uint32_t interval)
if ((mipi->mode == DSI_CMD_MODE) && !ctrl_pdata->burst_mode_enabled) if ((mipi->mode == DSI_CMD_MODE) && !ctrl_pdata->burst_mode_enabled)
mutex_unlock(&mdp5_data->ov_lock); mutex_unlock(&mdp5_data->ov_lock);
if ((pstatus_data->mfd->panel_power_state == MDSS_PANEL_POWER_ON)) { if (pstatus_data->mfd->panel_power_state == MDSS_PANEL_POWER_ON) {
if (ret > 0) if (ret > 0)
schedule_delayed_work(&pstatus_data->check_status, schedule_delayed_work(&pstatus_data->check_status,
msecs_to_jiffies(interval)); msecs_to_jiffies(interval));

View file

@ -139,11 +139,11 @@ void ecryptfs_dump_cipher(struct ecryptfs_crypt_stat *stat)
if (!stat) if (!stat)
return; return;
if (stat->cipher) if (stat->cipher != NULL)
ecryptfs_printk(KERN_DEBUG, ecryptfs_printk(KERN_DEBUG,
"ecryptfs cipher is %s\n", stat->cipher); "ecryptfs cipher is %s\n", stat->cipher);
if (stat->cipher_mode) if (stat->cipher_mode != NULL)
ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher mode is %s\n", ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher mode is %s\n",
stat->cipher_mode); stat->cipher_mode);

View file

@ -1,4 +1,4 @@
#ifndef _UAPI__HDMI_HDCP_MGR_H #ifndef _UAPI__MSM_HDMI_HDCP_MGR_H
#define _UAPI__MSM_HDMI_HDCP_MGR_H #define _UAPI__MSM_HDMI_HDCP_MGR_H
enum DS_TYPE { /* type of downstream device */ enum DS_TYPE { /* type of downstream device */

View file

@ -1151,7 +1151,6 @@ extern unsigned int __read_mostly sched_small_wakee_task_load;
extern unsigned int __read_mostly sched_spill_load; extern unsigned int __read_mostly sched_spill_load;
extern unsigned int __read_mostly sched_upmigrate; extern unsigned int __read_mostly sched_upmigrate;
extern unsigned int __read_mostly sched_downmigrate; extern unsigned int __read_mostly sched_downmigrate;
extern unsigned int __read_mostly sysctl_sched_spill_nr_run;
extern unsigned int __read_mostly sched_load_granule; extern unsigned int __read_mostly sched_load_granule;
extern void init_new_task_load(struct task_struct *p); extern void init_new_task_load(struct task_struct *p);

View file

@ -3876,8 +3876,10 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
if (err) if (err)
return err; return err;
err = validate_beacon_tx_rate(rdev, params.chandef.chan->band, err = validate_beacon_tx_rate(
&params.beacon_rate); rdev,
(enum nl80211_band)(params.chandef.chan->band),
&params.beacon_rate);
if (err) if (err)
return err; return err;
} }
@ -6259,7 +6261,10 @@ static int parse_bss_select(struct nlattr *nla, struct wiphy *wiphy,
bss_select->behaviour = NL80211_BSS_SELECT_ATTR_RSSI_ADJUST; bss_select->behaviour = NL80211_BSS_SELECT_ATTR_RSSI_ADJUST;
bss_select->param.adjust.band = adj_param->band; bss_select->param.adjust.band = adj_param->band;
bss_select->param.adjust.delta = adj_param->delta; bss_select->param.adjust.delta = adj_param->delta;
if (!is_band_valid(wiphy, bss_select->param.adjust.band)) if (!is_band_valid(
wiphy,
((enum ieee80211_band)(bss_select->param.adjust.band))
))
return -EINVAL; return -EINVAL;
} }
@ -6968,7 +6973,10 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev,
attrs[NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST]); attrs[NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST]);
request->rssi_adjust.band = rssi_adjust->band; request->rssi_adjust.band = rssi_adjust->band;
request->rssi_adjust.delta = rssi_adjust->delta; request->rssi_adjust.delta = rssi_adjust->delta;
if (!is_band_valid(wiphy, request->rssi_adjust.band)) { if (!is_band_valid(
wiphy,
(enum ieee80211_band)(request->rssi_adjust.band)
)) {
err = -EINVAL; err = -EINVAL;
goto out_free; goto out_free;
} }
@ -9493,8 +9501,10 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
if (err) if (err)
return err; return err;
err = validate_beacon_tx_rate(rdev, setup.chandef.chan->band, err = validate_beacon_tx_rate(
&setup.beacon_rate); rdev,
(enum nl80211_band)(setup.chandef.chan->band),
&setup.beacon_rate);
if (err) if (err)
return err; return err;
} }

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2014-2016, 2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2016, 2018, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -663,7 +663,7 @@ static void cpe_notify_cmi_client(struct cpe_info *t_info, u8 *payload,
hdr = CMI_GET_HEADER(payload); hdr = CMI_GET_HEADER(payload);
service = CMI_HDR_GET_SERVICE(hdr); service = CMI_HDR_GET_SERVICE(hdr);
notif.event = CPE_SVC_CMI_MSG; notif.event = (enum cmi_api_event)CPE_SVC_CMI_MSG;
notif.result = result; notif.result = result;
notif.message = payload; notif.message = payload;
@ -1178,7 +1178,7 @@ static enum cpe_process_result cpe_boot_complete(
} }
pr_debug("%s: boot complete\n", __func__); pr_debug("%s: boot complete\n", __func__);
return CPE_SVC_SUCCESS; return CPE_PROC_SUCCESS;
} }
static enum cpe_process_result cpe_process_send_msg( static enum cpe_process_result cpe_process_send_msg(

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013-2019, Linux Foundation. All rights reserved. * Copyright (c) 2013-2020, Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -226,7 +226,7 @@ static void q6lsm_session_free(struct lsm_client *client)
unsigned long flags; unsigned long flags;
pr_debug("%s: Freeing session ID %d\n", __func__, client->session); pr_debug("%s: Freeing session ID %d\n", __func__, client->session);
spin_lock_irqsave(&lsm_session_lock, flags); spin_lock_irqsave(&lsm_session_lock, flags);
lsm_session[client->session] = LSM_INVALID_SESSION_ID; lsm_session[client->session] = NULL;
spin_unlock_irqrestore(&lsm_session_lock, flags); spin_unlock_irqrestore(&lsm_session_lock, flags);
client->session = LSM_INVALID_SESSION_ID; client->session = LSM_INVALID_SESSION_ID;
} }

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, 2020, The Linux Foundation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and * it under the terms of the GNU General Public License version 2 and
@ -7111,8 +7111,8 @@ static int32_t qdsp_cvp_callback(struct apr_client_data *data, void *priv)
break; break;
} }
} }
} else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM || } else if ((data->opcode == VSS_ICOMMON_RSP_GET_PARAM) ||
VSS_ICOMMON_RSP_GET_PARAM_V3) { (data->opcode == VSS_ICOMMON_RSP_GET_PARAM_V3)) {
pr_debug("%s: VSS_ICOMMON_RSP_GET_PARAM\n", __func__); pr_debug("%s: VSS_ICOMMON_RSP_GET_PARAM\n", __func__);
ptr = data->payload; ptr = data->payload;
if (ptr[0] != 0) { if (ptr[0] != 0) {