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

Commit 58cfc828 authored by Maulik Shah's avatar Maulik Shah
Browse files

drivers: qcom: rpmh_master_stat: Remove unused size for SMEM item



Size is not used in stats driver after reading item from qcom_smem_get().
It can be passed as NULL if the caller of this API don't intend to use
it anywhere. Update driver to remove unused variable.

Change-Id: I60fe4e193fff4366eda0f29c684806421e9e6b86
Signed-off-by: default avatarMaulik Shah <mkshah@codeaurora.org>
parent 2dfedfa3
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 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
@@ -133,7 +133,6 @@ static ssize_t msm_rpmh_master_stats_show(struct kobject *kobj,
{
{
	ssize_t length;
	ssize_t length;
	int i = 0;
	int i = 0;
	size_t size = 0;
	struct msm_rpmh_master_stats *record = NULL;
	struct msm_rpmh_master_stats *record = NULL;


	mutex_lock(&rpmh_stats_mutex);
	mutex_lock(&rpmh_stats_mutex);
@@ -148,7 +147,7 @@ static ssize_t msm_rpmh_master_stats_show(struct kobject *kobj,
	for (i = 0; i < ARRAY_SIZE(rpmh_masters); i++) {
	for (i = 0; i < ARRAY_SIZE(rpmh_masters); i++) {
		record = (struct msm_rpmh_master_stats *) qcom_smem_get(
		record = (struct msm_rpmh_master_stats *) qcom_smem_get(
					rpmh_masters[i].pid,
					rpmh_masters[i].pid,
					rpmh_masters[i].smem_id, &size);
					rpmh_masters[i].smem_id, NULL);
		if (!IS_ERR_OR_NULL(record) && (PAGE_SIZE - length > 0))
		if (!IS_ERR_OR_NULL(record) && (PAGE_SIZE - length > 0))
			length += msm_rpmh_master_stats_print_data(
			length += msm_rpmh_master_stats_print_data(
					buf + length, PAGE_SIZE - length,
					buf + length, PAGE_SIZE - length,