Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ceb70ac authored by Deepak Kumar Singh's avatar Deepak Kumar Singh Committed by Arun Kumar Neelakantam
Browse files

soc: qcom: smem: Use uint64_t instead of phys_addr_t



Reading max item from wrong offset in smem_targ_info_type
structure due to previous structure member is using compiler
dependent data type.

Use uint64_t data type instead of compiler dependent phys_addr_t.

CRs-Fixed: 2416801
Change-Id: Ibc03eb53ea086ea9ebc0a9a03a5a7591b7bae157
Signed-off-by: default avatarDeepak Kumar Singh <deesin@codeaurora.org>
parent dd006fea
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2019, 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
@@ -155,7 +155,7 @@ struct smem_targ_info_type {
	/* Identifier is a constant, set to SMEM_TARG_INFO_IDENTIFIER. */
	/* Identifier is a constant, set to SMEM_TARG_INFO_IDENTIFIER. */
	uint32_t identifier;
	uint32_t identifier;
	uint32_t size;
	uint32_t size;
	phys_addr_t phys_base_addr;
	uint64_t phys_base_addr;
	uint32_t  max_items;
	uint32_t  max_items;
};
};


@@ -1317,7 +1317,7 @@ static int smem_init_target_info(phys_addr_t info_addr, resource_size_t size)
		LOG_ERR("%s failed: invalid TARGET INFO magic\n", __func__);
		LOG_ERR("%s failed: invalid TARGET INFO magic\n", __func__);
		return -ENODEV;
		return -ENODEV;
	}
	}
	smem_ram_phys = smem_targ_info->phys_base_addr;
	smem_ram_phys = (phys_addr_t)smem_targ_info->phys_base_addr;
	smem_ram_size = smem_targ_info->size;
	smem_ram_size = smem_targ_info->size;
	if (smem_targ_info->max_items)
	if (smem_targ_info->max_items)
		smem_max_items = smem_targ_info->max_items;
		smem_max_items = smem_targ_info->max_items;