driver: Fix compilation error with new sdclang 12

Fix the compilation error with sdclang 12.0.

Change-Id: If6b5caf655568b0d4ee12a71927df9476f3b4c55
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
This commit is contained in:
Swetha Chikkaboraiah
2021-08-13 09:40:52 +05:30
parent 5347ec3264
commit 17344d786c
5 changed files with 8 additions and 8 deletions

View File

@@ -172,7 +172,7 @@ void *diagmem_alloc(struct diagchar_dev *driver, int size, int pool_type)
break;
}
if (size == 0 || size > mempool->itemsize ||
size > (int)mempool->pool->pool_data) {
size > (size_t)mempool->pool->pool_data) {
pr_err_ratelimited("diag: cannot alloc from mempool %s, invalid size: %d\n",
mempool->name, size);
break;

View File

@@ -135,7 +135,7 @@ static void __dump_packet(u8 *packet)
/* row must contain enough for 0xdeadbaad * 8 to be converted into
* "de ad ba ab " * 8 + '\0'
*/
char row[3 * row_size];
char row[96]; /*char row[3 * row_size];*/
for (c = 0; c * row_size < packet_size; ++c) {
int bytes_to_read = ((c + 1) * row_size > packet_size) ?

View File

@@ -3704,8 +3704,8 @@ static int __qseecom_send_cmd(struct qseecom_dev_handle *data,
(uint32_t)(__qseecom_uvirt_to_kphys(
data, (uintptr_t)req->resp_buf));
} else {
send_data_req.req_ptr = (uint32_t)req->cmd_req_buf;
send_data_req.rsp_ptr = (uint32_t)req->resp_buf;
send_data_req.req_ptr = (uintptr_t)req->cmd_req_buf;
send_data_req.rsp_ptr = (uintptr_t)req->resp_buf;
}
send_data_req.req_len = req->cmd_req_len;

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019, 2021, The Linux Foundation. All rights reserved.
*/
#include "ipahal.h"
@@ -225,7 +225,7 @@ static struct ipahal_stats_init_pyld *ipahal_generate_init_pyld_flt_rt_v4_5(
void *params, bool is_atomic_ctx)
{
struct ipahal_stats_init_pyld *pyld;
int num = (int)(params);
int num = (uintptr_t)(params);
if (num > IPA_MAX_FLT_RT_CNT_INDEX ||
num <= 0) {

View File

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2010-2018, 2020, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2010-2018, 2020, 2021, The Linux Foundation. All rights reserved. */
#include <linux/bitops.h>
#include <linux/delay.h>
@@ -649,7 +649,7 @@ static ssize_t edid_store(struct device *dev,
memset(hdmi_ctrl->edid_buf, 0, hdmi_ctrl->edid_buf_size);
while (edid_size--) {
char t[char_to_nib + 1];
char t[3]; /* char_to_nib + 1; */
int d;
memcpy(t, buf_t, sizeof(char) * char_to_nib);