summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/clk/qcom/clk-debug.c15
-rw-r--r--drivers/media/platform/msm/vidc/hfi_response_handler.c4
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc.c17
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_common.c17
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_res_parse.c27
-rw-r--r--drivers/misc/lkdtm.c3
-rw-r--r--drivers/mmc/core/sdio_cis.c4
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c17
-rw-r--r--drivers/platform/msm/usb_bam.c4
-rw-r--r--drivers/power/supply/qcom/msm_bcl.c6
-rw-r--r--drivers/regulator/qpnp-lcdb-regulator.c6
-rw-r--r--drivers/soc/qcom/msm_bus/msm_bus_dbg.c4
-rw-r--r--drivers/soc/qcom/msm_bus/msm_bus_rules.c6
-rw-r--r--drivers/soc/qcom/msm_performance.c6
-rw-r--r--drivers/soc/qcom/qdsp6v2/apr.c4
-rw-r--r--drivers/soc/qcom/system_stats.c8
-rw-r--r--drivers/thermal/msm-tsens.c17
-rw-r--r--drivers/thermal/msm_thermal.c9
-rw-r--r--drivers/thermal/qpnp-temp-alarm.c8
-rw-r--r--drivers/video/fbdev/msm/dsi_status_6g.c4
-rw-r--r--fs/ecryptfs/debug.c4
-rw-r--r--include/uapi/video/msm_hdmi_hdcp_mgr.h2
-rw-r--r--kernel/sched/sched.h1
-rw-r--r--net/wireless/nl80211.c22
-rw-r--r--sound/soc/codecs/wcd_cpe_services.c6
-rw-r--r--sound/soc/msm/qdsp6v2/q6lsm.c4
-rw-r--r--sound/soc/msm/qdsp6v2/q6voice.c6
27 files changed, 120 insertions, 111 deletions
diff --git a/drivers/clk/qcom/clk-debug.c b/drivers/clk/qcom/clk-debug.c
index 50d0d01188ed..496b80eace5b 100644
--- a/drivers/clk/qcom/clk-debug.c
+++ b/drivers/clk/qcom/clk-debug.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014, 2016-2017,
+ * Copyright (c) 2013-2014, 2016-2017, 2020,
*
* 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);
- if (meas->parent[index].en_mask == 0xFF)
- /* Skip en_mask */
- regval = regval;
- else if (meas->parent[index].en_mask)
- regval |= meas->parent[index].en_mask;
- else
- regval |= meas->en_mask;
+ if (meas->parent[index].en_mask != 0xFF) {
+ if (meas->parent[index].en_mask)
+ regval |= meas->parent[index].en_mask;
+ else
+ regval |= meas->en_mask;
+ }
regmap_write(meas->regmap[dbg_cc], 0x0, regval);
}
diff --git a/drivers/media/platform/msm/vidc/hfi_response_handler.c b/drivers/media/platform/msm/vidc/hfi_response_handler.c
index d3a7e4ce06b7..259d86744ff7 100644
--- a/drivers/media/platform/msm/vidc/hfi_response_handler.c
+++ b/drivers/media/platform/msm/vidc/hfi_response_handler.c
@@ -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
* 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.session_id = (void *)(uintptr_t)pkt->session_id;
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.size = sizeof(struct hal_buffer_info);
} else {
diff --git a/drivers/media/platform/msm/vidc/msm_vidc.c b/drivers/media/platform/msm/vidc/msm_vidc.c
index 81ce5813cec4..40781ace9d21 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc.c
@@ -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
* 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;
}
-int msm_vidc_close(void *instance)
+static void close_helper(struct kref *kref)
{
- void close_helper(struct kref *kref)
- {
- struct msm_vidc_inst *inst = container_of(kref,
- struct msm_vidc_inst, kref);
+ struct msm_vidc_inst *inst = container_of(kref,
+ struct msm_vidc_inst, kref);
- msm_vidc_destroy(inst);
- }
+ msm_vidc_destroy(inst);
+}
+
+int msm_vidc_close(void *instance)
+{
struct msm_vidc_inst *inst = instance;
struct buffer_info *bi, *dummy;
int rc = 0, i = 0;
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c
index bbf5e33a99f7..b56b48a6b7b0 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_common.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c
@@ -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
* 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;
}
-static void put_inst(struct msm_vidc_inst *inst)
+static void put_inst_helper(struct kref *kref)
{
- void put_inst_helper(struct kref *kref)
- {
- struct msm_vidc_inst *inst = container_of(kref,
- struct msm_vidc_inst, kref);
+ struct msm_vidc_inst *inst = container_of(kref,
+ struct msm_vidc_inst, kref);
- msm_vidc_destroy(inst);
- }
+ msm_vidc_destroy(inst);
+}
+
+static void put_inst(struct msm_vidc_inst *inst)
+{
if (!inst)
return;
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c b/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
index 925914bc7a6d..6a2eb9121f6b 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
@@ -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
* it under the terms of the GNU General Public License version 2 and
@@ -54,13 +54,13 @@ fail_read:
return 0;
}
-static inline enum imem_type read_imem_type(struct platform_device *pdev)
+static bool is_compatible(char *compat)
{
- bool is_compatible(char *compat)
- {
- return !!of_find_compatible_node(NULL, NULL, compat);
- }
+ return !!of_find_compatible_node(NULL, NULL, compat);
+}
+static inline enum imem_type read_imem_type(struct platform_device *pdev)
+{
return is_compatible("qcom,msm-ocmem") ? IMEM_OCMEM :
is_compatible("qcom,msm-vmem") ? IMEM_VMEM :
IMEM_NONE;
@@ -518,20 +518,19 @@ error:
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)
{
int rc = 0;
int num_elements = 0;
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)) {
/* qcom,load-freq-tbl is an optional property. It likely won't
* be present on cores that we can't clock scale on. */
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c
index 8e06e1020ad9..849592f45889 100644
--- a/drivers/misc/lkdtm.c
+++ b/drivers/misc/lkdtm.c
@@ -381,6 +381,7 @@ static void execute_user_location(void *dst)
static void lkdtm_do_action(enum ctype which)
{
+ int *ptr = NULL;
switch (which) {
case CT_PANIC:
panic("dumptest");
@@ -392,7 +393,7 @@ static void lkdtm_do_action(enum ctype which)
WARN_ON(1);
break;
case CT_EXCEPTION:
- *((int *) 0) = 0;
+ *ptr = 0;
break;
case CT_LOOP:
for (;;)
diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c
index 8b4266a11ee0..ed2705659e01 100644
--- a/drivers/mmc/core/sdio_cis.c
+++ b/drivers/mmc/core/sdio_cis.c
@@ -29,6 +29,7 @@ static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
{
unsigned i, nr_strings;
char **buffer, *string;
+ size_t buf_size = 0;
/* Find all null-terminated (including zero length) strings in
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++) {
buffer[i] = string;
- strlcpy(string, buf, strlen(buf) + 1);
+ buf_size = strlen(buf);
+ strlcpy(string, buf, buf_size + 1);
string += strlen(string) + 1;
buf += strlen(buf) + 1;
}
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c
index 9fe7b6c59302..4a7b7a72fd99 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c
@@ -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
* 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");
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) <<
- IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_SHFT;
- valmask->mask = IPA_ENDP_INIT_AGGR_n_AGGR_FORCE_CLOSE_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));
+ valmask->val |= ((0 << IPA_ENDP_INIT_AGGR_n_AGGR_EN_SHFT) &
+ IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK);
+ valmask->mask |= IPA_ENDP_INIT_AGGR_n_AGGR_EN_BMSK;
}
u32 ipahal_aggr_get_max_byte_limit(void)
diff --git a/drivers/platform/msm/usb_bam.c b/drivers/platform/msm/usb_bam.c
index a9bcabfdb009..b1d9211e09df 100644
--- a/drivers/platform/msm/usb_bam.c
+++ b/drivers/platform/msm/usb_bam.c
@@ -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
* 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,
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__,
bam_enable_strings[cur_bam]);
diff --git a/drivers/power/supply/qcom/msm_bcl.c b/drivers/power/supply/qcom/msm_bcl.c
index aea3f4645897..843cb415e810 100644
--- a/drivers/power/supply/qcom/msm_bcl.c
+++ b/drivers/power/supply/qcom/msm_bcl.c
@@ -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
* 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;
struct bcl_param_data *param_data = NULL;
- if (!bcl[i] || !bcl[BCL_PARAM_VOLTAGE]->thresh
- || !bcl[BCL_PARAM_CURRENT]->thresh) {
+ if (!bcl[i] || (bcl[BCL_PARAM_VOLTAGE]->thresh == NULL)
+ || (bcl[BCL_PARAM_CURRENT]->thresh == NULL)) {
pr_err("BCL not initialized\n");
return -EINVAL;
}
diff --git a/drivers/regulator/qpnp-lcdb-regulator.c b/drivers/regulator/qpnp-lcdb-regulator.c
index 28c7da33afe0..e295fe440a61 100644
--- a/drivers/regulator/qpnp-lcdb-regulator.c
+++ b/drivers/regulator/qpnp-lcdb-regulator.c
@@ -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
* 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) {
rc = qpnp_lcdb_masked_write(lcdb, lcdb->base +
- LCDB_PS_CTL_REG, EN_PS_BIT,
- &lcdb->bst.ps ? EN_PS_BIT : 0);
+ LCDB_PS_CTL_REG, EN_PS_BIT,
+ lcdb->bst.ps ? EN_PS_BIT : 0);
if (rc < 0) {
pr_err("Failed to disable BST PS rc=%d", rc);
return rc;
diff --git a/drivers/soc/qcom/msm_bus/msm_bus_dbg.c b/drivers/soc/qcom/msm_bus/msm_bus_dbg.c
index 8db3a62a1263..b8963a00374c 100644
--- a/drivers/soc/qcom/msm_bus/msm_bus_dbg.c
+++ b/drivers/soc/qcom/msm_bus/msm_bus_dbg.c
@@ -1,5 +1,4 @@
-/* Copyright (c) 2010-2012, 2014-2015, 2017 The Linux Foundation. All rights
- * reserved.
+/* Copyright (c) 2010-2012, 2014-2015, 2017, 2020, The Linux Foundation. All rights reserved.
*
* 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
@@ -577,7 +576,6 @@ static ssize_t msm_bus_dbg_update_request_write(struct file *file,
list_for_each_entry(cldata, &cl_list, list) {
if (strnstr(chid, cldata->pdata->name, cnt)) {
found = 1;
- cldata = cldata;
strsep(&chid, " ");
if (chid) {
ret = kstrtoul(chid, 10, &index);
diff --git a/drivers/soc/qcom/msm_bus/msm_bus_rules.c b/drivers/soc/qcom/msm_bus/msm_bus_rules.c
index 43a892bbd27c..bd032c900624 100644
--- a/drivers/soc/qcom/msm_bus/msm_bus_rules.c
+++ b/drivers/soc/qcom/msm_bus/msm_bus_rules.c
@@ -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
* 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) {
if (node_it->id == id) {
- if ((id == NB_ID)) {
- if ((node_it->data == data)) {
+ if (id == NB_ID) {
+ if (node_it->data == data) {
node_match = node_it;
break;
}
diff --git a/drivers/soc/qcom/msm_performance.c b/drivers/soc/qcom/msm_performance.c
index 1857d369bc94..8b78ac889eac 100644
--- a/drivers/soc/qcom/msm_performance.c
+++ b/drivers/soc/qcom/msm_performance.c
@@ -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
* 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++) {
if (!managed_clusters[i])
break;
- if (managed_clusters[i]->offlined_cpus)
+ if (managed_clusters[i]->offlined_cpus != NULL)
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);
kfree(managed_clusters[i]);
}
diff --git a/drivers/soc/qcom/qdsp6v2/apr.c b/drivers/soc/qcom/qdsp6v2/apr.c
index 8215674f111b..3060308652d5 100644
--- a/drivers/soc/qcom/qdsp6v2/apr.c
+++ b/drivers/soc/qcom/qdsp6v2/apr.c
@@ -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.
*
* 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;
int ret = 0;
- if ((domain_id == APR_DOMAIN_ADSP)) {
+ if (domain_id == APR_DOMAIN_ADSP) {
tbl = (struct apr_svc_table *)&svc_tbl_qdsp6;
size = ARRAY_SIZE(svc_tbl_qdsp6);
} else if (domain_id == APR_DOMAIN_SDSP) {
diff --git a/drivers/soc/qcom/system_stats.c b/drivers/soc/qcom/system_stats.c
index ba35928a991b..30e15a0a2c9a 100644
--- a/drivers/soc/qcom/system_stats.c
+++ b/drivers/soc/qcom/system_stats.c
@@ -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
* 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;
struct resource res;
int i, ret = 0;
+ size_t master_name_len = 0;
if (!pdev)
return -EINVAL;
@@ -365,7 +366,7 @@ static int msm_rpmstats_probe(struct platform_device *pdev)
* Read master names from DT
*/
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,
"qcom,masters",
@@ -377,8 +378,9 @@ static int msm_rpmstats_probe(struct platform_device *pdev)
pr_err("%s:Failed to get memory\n", __func__);
return -ENOMEM;
}
+ master_name_len = strlen(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,
diff --git a/drivers/thermal/msm-tsens.c b/drivers/thermal/msm-tsens.c
index db49c33264d5..d7cc99ba6c40 100644
--- a/drivers/thermal/msm-tsens.c
+++ b/drivers/thermal/msm-tsens.c
@@ -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
* 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) {
case TSENS_TM_TRIP_CRITICAL:
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
(tmdev->tsens_addr));
if (mode == THERMAL_TRIP_ACTIVATION_DISABLED)
@@ -1009,7 +1010,8 @@ static int tsens_tm_activate_trip_type(struct thermal_zone_device *thermal,
break;
case TSENS_TM_TRIP_WARM:
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
(tmdev->tsens_addr));
if (mode == THERMAL_TRIP_ACTIVATION_DISABLED)
@@ -1025,7 +1027,8 @@ static int tsens_tm_activate_trip_type(struct thermal_zone_device *thermal,
break;
case TSENS_TM_TRIP_COOL:
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
(tmdev->tsens_addr));
if (mode == THERMAL_TRIP_ACTIVATION_DISABLED)
@@ -1071,7 +1074,8 @@ static int tsens_tz_activate_trip_type(struct thermal_zone_device *thermal,
switch (trip) {
case TSENS_TRIP_WARM:
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)
>> TSENS_UPPER_THRESHOLD_SHIFT;
@@ -1082,7 +1086,8 @@ static int tsens_tz_activate_trip_type(struct thermal_zone_device *thermal,
break;
case TSENS_TRIP_COOL:
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);
mask = TSENS_LOWER_STATUS_CLR;
diff --git a/drivers/thermal/msm_thermal.c b/drivers/thermal/msm_thermal.c
index 389a75695355..ade4eba1c9cd 100644
--- a/drivers/thermal/msm_thermal.c
+++ b/drivers/thermal/msm_thermal.c
@@ -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
* 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();
if (ret)
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)
{
- int _cpu = 0, err = 0;
+ int _cpu = 0, err = 0, sensor_name_len = 0;
struct device_node *cpu_node = NULL, *limits = NULL, *tsens = NULL;
char *key = NULL;
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;
goto fetch_mitig_exit;
}
+ sensor_name_len = strlen(sensor_name);
strlcpy((char *) cpus[_cpu].sensor_type, sensor_name,
- strlen(sensor_name) + 1);
+ sensor_name_len + 1);
create_alias_name(_cpu, limits, pdev);
}
diff --git a/drivers/thermal/qpnp-temp-alarm.c b/drivers/thermal/qpnp-temp-alarm.c
index 8c516da1d9ab..760205b107eb 100644
--- a/drivers/thermal/qpnp-temp-alarm.c
+++ b/drivers/thermal/qpnp-temp-alarm.c
@@ -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
* 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;
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;
chip = kzalloc(sizeof(struct qpnp_tm_chip), GFP_KERNEL);
diff --git a/drivers/video/fbdev/msm/dsi_status_6g.c b/drivers/video/fbdev/msm/dsi_status_6g.c
index d24b19ea77ad..8a962efcf2f0 100644
--- a/drivers/video/fbdev/msm/dsi_status_6g.c
+++ b/drivers/video/fbdev/msm/dsi_status_6g.c
@@ -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
* 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)
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)
schedule_delayed_work(&pstatus_data->check_status,
msecs_to_jiffies(interval));
diff --git a/fs/ecryptfs/debug.c b/fs/ecryptfs/debug.c
index 0556af1adfb7..ea2c4a97fddc 100644
--- a/fs/ecryptfs/debug.c
+++ b/fs/ecryptfs/debug.c
@@ -139,11 +139,11 @@ void ecryptfs_dump_cipher(struct ecryptfs_crypt_stat *stat)
if (!stat)
return;
- if (stat->cipher)
+ if (stat->cipher != NULL)
ecryptfs_printk(KERN_DEBUG,
"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",
stat->cipher_mode);
diff --git a/include/uapi/video/msm_hdmi_hdcp_mgr.h b/include/uapi/video/msm_hdmi_hdcp_mgr.h
index 85fa918f2579..1c19d4a15bb7 100644
--- a/include/uapi/video/msm_hdmi_hdcp_mgr.h
+++ b/include/uapi/video/msm_hdmi_hdcp_mgr.h
@@ -1,4 +1,4 @@
-#ifndef _UAPI__HDMI_HDCP_MGR_H
+#ifndef _UAPI__MSM_HDMI_HDCP_MGR_H
#define _UAPI__MSM_HDMI_HDCP_MGR_H
enum DS_TYPE { /* type of downstream device */
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index ffae8d49d988..07a3cd3c6fbc 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -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_upmigrate;
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 void init_new_task_load(struct task_struct *p);
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index cdaee8598e6b..11a5ae596901 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3876,8 +3876,10 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
if (err)
return err;
- err = validate_beacon_tx_rate(rdev, params.chandef.chan->band,
- &params.beacon_rate);
+ err = validate_beacon_tx_rate(
+ rdev,
+ (enum nl80211_band)(params.chandef.chan->band),
+ &params.beacon_rate);
if (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->param.adjust.band = adj_param->band;
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;
}
@@ -6968,7 +6973,10 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev,
attrs[NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST]);
request->rssi_adjust.band = rssi_adjust->band;
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;
goto out_free;
}
@@ -9493,8 +9501,10 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
if (err)
return err;
- err = validate_beacon_tx_rate(rdev, setup.chandef.chan->band,
- &setup.beacon_rate);
+ err = validate_beacon_tx_rate(
+ rdev,
+ (enum nl80211_band)(setup.chandef.chan->band),
+ &setup.beacon_rate);
if (err)
return err;
}
diff --git a/sound/soc/codecs/wcd_cpe_services.c b/sound/soc/codecs/wcd_cpe_services.c
index 58f02f1f35f5..18cd44d3d9c7 100644
--- a/sound/soc/codecs/wcd_cpe_services.c
+++ b/sound/soc/codecs/wcd_cpe_services.c
@@ -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
* 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);
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.message = payload;
@@ -1178,7 +1178,7 @@ static enum cpe_process_result cpe_boot_complete(
}
pr_debug("%s: boot complete\n", __func__);
- return CPE_SVC_SUCCESS;
+ return CPE_PROC_SUCCESS;
}
static enum cpe_process_result cpe_process_send_msg(
diff --git a/sound/soc/msm/qdsp6v2/q6lsm.c b/sound/soc/msm/qdsp6v2/q6lsm.c
index d926623eaa19..a19f0447c4b4 100644
--- a/sound/soc/msm/qdsp6v2/q6lsm.c
+++ b/sound/soc/msm/qdsp6v2/q6lsm.c
@@ -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
* 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;
pr_debug("%s: Freeing session ID %d\n", __func__, client->session);
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);
client->session = LSM_INVALID_SESSION_ID;
}
diff --git a/sound/soc/msm/qdsp6v2/q6voice.c b/sound/soc/msm/qdsp6v2/q6voice.c
index eb635243dd5a..e86337dbab1d 100644
--- a/sound/soc/msm/qdsp6v2/q6voice.c
+++ b/sound/soc/msm/qdsp6v2/q6voice.c
@@ -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
* 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;
}
}
- } else if (data->opcode == VSS_ICOMMON_RSP_GET_PARAM ||
- VSS_ICOMMON_RSP_GET_PARAM_V3) {
+ } else if ((data->opcode == VSS_ICOMMON_RSP_GET_PARAM) ||
+ (data->opcode == VSS_ICOMMON_RSP_GET_PARAM_V3)) {
pr_debug("%s: VSS_ICOMMON_RSP_GET_PARAM\n", __func__);
ptr = data->payload;
if (ptr[0] != 0) {