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

Commit cab34f97 authored by Rama Aparna Mallavarapu's avatar Rama Aparna Mallavarapu
Browse files

perf: llcc: Remove all unused local variables from llcc pmu driver



Compilation of LLCC PMU driver with Clang is warning of many unused
local variables. Remove these for a cleaner compilation.

Change-Id: I8f99faba87cb5de141b8509c2dde11db24a357cf
Signed-off-by: default avatarRama Aparna Mallavarapu <aparnam@codeaurora.org>
parent d0efeea7
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2018, 2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/of.h>
@@ -42,7 +42,6 @@ static ktime_t last_read;
static int qcom_llcc_event_init(struct perf_event *event)
{
	u64 config = event->attr.config;
	u64 type = event->attr.type;

	if (config == LLCC_RD_EV) {
		event->hw.config_base = event->attr.config;
@@ -80,8 +79,6 @@ static void qcom_llcc_event_read(struct perf_event *event)

static void qcom_llcc_event_start(struct perf_event *event, int flags)
{
	struct llcc_pmu *llccpmu = to_llcc_pmu(event->pmu);

	if (flags & PERF_EF_RELOAD)
		WARN_ON(!(event->hw.state & PERF_HES_UPTODATE));
	event->hw.state = 0;
@@ -89,17 +86,12 @@ static void qcom_llcc_event_start(struct perf_event *event, int flags)

static void qcom_llcc_event_stop(struct perf_event *event, int flags)
{
	struct llcc_pmu *llccpmu = to_llcc_pmu(event->pmu);

	qcom_llcc_event_read(event);
	event->hw.state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
}

static int qcom_llcc_event_add(struct perf_event *event, int flags)
{
	int i;
	unsigned int cpu = event->cpu;
	unsigned long irq_flags;
	struct llcc_pmu *llccpmu = to_llcc_pmu(event->pmu);

	raw_spin_lock(&users_lock);
@@ -118,9 +110,6 @@ static int qcom_llcc_event_add(struct perf_event *event, int flags)

static void qcom_llcc_event_del(struct perf_event *event, int flags)
{
	int i;
	unsigned int cpu = event->cpu;
	unsigned long irq_flags;
	struct llcc_pmu *llccpmu = to_llcc_pmu(event->pmu);

	raw_spin_lock(&users_lock);
@@ -134,7 +123,7 @@ static int qcom_llcc_pmu_probe(struct platform_device *pdev)
{
	struct llcc_pmu *llccpmu;
	struct resource *res;
	int ret, i;
	int ret;

	llccpmu = devm_kzalloc(&pdev->dev, sizeof(struct llcc_pmu), GFP_KERNEL);
	if (!llccpmu)