lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230708-topic-rpmh_icc_rsc-v1-4-b223bd2ac8dd@linaro.org>
Date:   Tue, 11 Jul 2023 14:18:03 +0200
From:   Konrad Dybcio <konrad.dybcio@...aro.org>
To:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Georgi Djakov <djakov@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        cros-qcom-dts-watchers@...omium.org
Cc:     Marijn Suijten <marijn.suijten@...ainline.org>,
        linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Konrad Dybcio <konrad.dybcio@...aro.org>
Subject: [PATCH 04/53] interconnect: qcom: icc-rpmh: Retire dead code

of_bcm_voter_get is no longer necessary. Remove its ugly remnants.

Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
---
 drivers/interconnect/qcom/bcm-voter.c | 46 -----------------------------------
 drivers/interconnect/qcom/bcm-voter.h |  1 -
 2 files changed, 47 deletions(-)

diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c
index f8fbddb87e6b..0ce3874f60d2 100644
--- a/drivers/interconnect/qcom/bcm-voter.c
+++ b/drivers/interconnect/qcom/bcm-voter.c
@@ -16,7 +16,6 @@
 #include "bcm-voter.h"
 #include "icc-rpmh.h"
 
-static LIST_HEAD(bcm_voters);
 static DEFINE_MUTEX(bcm_voter_lock);
 
 struct bcm_voter *qcom_icc_bcm_voters[ICC_BCM_VOTER_MAX] = { };
@@ -182,51 +181,6 @@ static void tcs_list_gen(struct bcm_voter *voter, int bucket,
 	}
 }
 
-/**
- * of_bcm_voter_get - gets a bcm voter handle from DT node
- * @dev: device pointer for the consumer device
- * @name: name for the bcm voter device
- *
- * This function will match a device_node pointer for the phandle
- * specified in the device DT and return a bcm_voter handle on success.
- *
- * Returns bcm_voter pointer or ERR_PTR() on error. EPROBE_DEFER is returned
- * when matching bcm voter is yet to be found.
- */
-struct bcm_voter *of_bcm_voter_get(struct device *dev, const char *name)
-{
-	struct bcm_voter *voter = ERR_PTR(-EPROBE_DEFER);
-	struct bcm_voter *temp;
-	struct device_node *np, *node;
-	int idx = 0;
-
-	if (!dev || !dev->of_node)
-		return ERR_PTR(-ENODEV);
-
-	np = dev->of_node;
-
-	if (name) {
-		idx = of_property_match_string(np, "qcom,bcm-voter-names", name);
-		if (idx < 0)
-			return ERR_PTR(idx);
-	}
-
-	node = of_parse_phandle(np, "qcom,bcm-voters", idx);
-
-	mutex_lock(&bcm_voter_lock);
-	list_for_each_entry(temp, &bcm_voters, voter_node) {
-		if (temp->np == node) {
-			voter = temp;
-			break;
-		}
-	}
-	mutex_unlock(&bcm_voter_lock);
-
-	of_node_put(node);
-	return voter;
-}
-EXPORT_SYMBOL_GPL(of_bcm_voter_get);
-
 /**
  * qcom_icc_bcm_voter_add - queues up the bcm nodes that require updates
  * @voter: voter that the bcms are being added to
diff --git a/drivers/interconnect/qcom/bcm-voter.h b/drivers/interconnect/qcom/bcm-voter.h
index 0f64c0bab2c0..30b324fcb2ee 100644
--- a/drivers/interconnect/qcom/bcm-voter.h
+++ b/drivers/interconnect/qcom/bcm-voter.h
@@ -20,7 +20,6 @@ static struct qcom_icc_bcm _name = {					       \
 	.nodes = { __VA_ARGS__ },					       \
 }
 
-struct bcm_voter *of_bcm_voter_get(struct device *dev, const char *name);
 void qcom_icc_bcm_voter_add(struct bcm_voter *voter, struct qcom_icc_bcm *bcm);
 int qcom_icc_bcm_voter_commit(struct bcm_voter *voter);
 

-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ