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: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// 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>
|
#include <linux/of.h>
|
||||||
@@ -42,7 +42,6 @@ static ktime_t last_read;
|
|||||||
static int qcom_llcc_event_init(struct perf_event *event)
|
static int qcom_llcc_event_init(struct perf_event *event)
|
||||||
{
|
{
|
||||||
u64 config = event->attr.config;
|
u64 config = event->attr.config;
|
||||||
u64 type = event->attr.type;
|
|
||||||
|
|
||||||
if (config == LLCC_RD_EV) {
|
if (config == LLCC_RD_EV) {
|
||||||
event->hw.config_base = event->attr.config;
|
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)
|
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)
|
if (flags & PERF_EF_RELOAD)
|
||||||
WARN_ON(!(event->hw.state & PERF_HES_UPTODATE));
|
WARN_ON(!(event->hw.state & PERF_HES_UPTODATE));
|
||||||
event->hw.state = 0;
|
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)
|
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);
|
qcom_llcc_event_read(event);
|
||||||
event->hw.state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
|
event->hw.state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qcom_llcc_event_add(struct perf_event *event, int flags)
|
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);
|
struct llcc_pmu *llccpmu = to_llcc_pmu(event->pmu);
|
||||||
|
|
||||||
raw_spin_lock(&users_lock);
|
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)
|
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);
|
struct llcc_pmu *llccpmu = to_llcc_pmu(event->pmu);
|
||||||
|
|
||||||
raw_spin_lock(&users_lock);
|
raw_spin_lock(&users_lock);
|
||||||
@@ -134,7 +123,7 @@ static int qcom_llcc_pmu_probe(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
struct llcc_pmu *llccpmu;
|
struct llcc_pmu *llccpmu;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
int ret, i;
|
int ret;
|
||||||
|
|
||||||
llccpmu = devm_kzalloc(&pdev->dev, sizeof(struct llcc_pmu), GFP_KERNEL);
|
llccpmu = devm_kzalloc(&pdev->dev, sizeof(struct llcc_pmu), GFP_KERNEL);
|
||||||
if (!llccpmu)
|
if (!llccpmu)
|
||||||
|
|||||||
Reference in New Issue
Block a user