aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2023-11-14 10:42:14 +0100
committerMikael Olsson <mikael.olsson@arm.com>2023-11-14 14:22:46 +0100
commit404a536f84d7ccebd5e2a09633dba9d0c2eb67bb (patch)
treea3a5ede03c971f6587790643eafa7ccab2400e7c
parent9f176ba0e99b131b790038948af51c62c2d46b8c (diff)
downloadethos-u-linux-driver-stack-404a536f84d7ccebd5e2a09633dba9d0c2eb67bb.tar.gz
Make internal functions static in kernel modules
Internal functions in some of the kernel modules were not marked as static and have now been fixed. Change-Id: Ibec000e4370f2438e7190a9178e05513fcccda26 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
-rw-r--r--mailbox/arm_mhu_v2.c29
-rw-r--r--remoteproc/corstone1000_es_reset.c13
-rw-r--r--remoteproc/juno_fpga_reset.c8
3 files changed, 32 insertions, 18 deletions
diff --git a/mailbox/arm_mhu_v2.c b/mailbox/arm_mhu_v2.c
index b65bd78..8c1a6e9 100644
--- a/mailbox/arm_mhu_v2.c
+++ b/mailbox/arm_mhu_v2.c
@@ -1,11 +1,23 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
/*
- * Message Handling Unit version 2 controller driver
- * Copyright (C) 2019-2020 ARM Ltd.
+ * SPDX-FileCopyrightText: Copyright 2019-2021, 2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0
*
- * Based on drivers/mailbox/arm_mhu.c
+ * This program is free software and is provided to you under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation, and any use by you of this program is subject to the terms
+ * of such GNU licence.
*
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you can access it online at
+ * http://www.gnu.org/licenses/gpl-2.0.html.
+ *
+ * Message Handling Unit version 2 controller driver
+ * Based on drivers/mailbox/arm_mhu.c
*/
#include <linux/interrupt.h>
@@ -162,7 +174,7 @@ static const struct mbox_chan_ops mhuv2_ops = {
.last_tx_done = mhuv2_last_tx_done,
};
-void mhuv2_check_enable_cmbint(struct mhuv2_link *link)
+static void mhuv2_check_enable_cmbint(struct mhuv2_link *link)
{
const u32 aidr = readl_relaxed(link->rx_reg + MHU_V2_AIDR_OFS);
@@ -191,6 +203,7 @@ static int mhuv2_probe(struct amba_device *adev,
tx_base = of_iomap((struct device_node *)np, 0);
if (!tx_base) {
dev_err(dev, "failed to map tx registers\n");
+
return -ENOMEM;
}
@@ -198,6 +211,7 @@ static int mhuv2_probe(struct amba_device *adev,
if (!rx_base) {
dev_err(dev, "failed to map rx registers\n");
iounmap(tx_base);
+
return -ENOMEM;
}
@@ -272,6 +286,7 @@ static void mhuv2_remove(struct amba_device *adev)
mbox_controller_unregister(&mhuv2->mbox);
}
+
#else
static int mhuv2_remove(struct amba_device *adev)
{
@@ -281,8 +296,8 @@ static int mhuv2_remove(struct amba_device *adev)
return 0;
}
-#endif
+#endif
static struct amba_id mhuv2_ids[] = {
{
diff --git a/remoteproc/corstone1000_es_reset.c b/remoteproc/corstone1000_es_reset.c
index e62ebdb..bda57fe 100644
--- a/remoteproc/corstone1000_es_reset.c
+++ b/remoteproc/corstone1000_es_reset.c
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2022 Arm Limited. All rights reserved.
+ * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -14,8 +15,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
- *
- * SPDX-License-Identifier: GPL-2.0-only
*/
#include <linux/io.h>
@@ -43,8 +42,8 @@ struct cs1k_es_reset_data {
void __iomem *status;
};
-int cs1k_es_assert(struct reset_controller_dev *rcdev,
- unsigned long id)
+static int cs1k_es_assert(struct reset_controller_dev *rcdev,
+ unsigned long id)
{
u32 status;
struct cs1k_es_reset_data *reset =
@@ -64,8 +63,8 @@ int cs1k_es_assert(struct reset_controller_dev *rcdev,
return status == EXTSYS_STATUS_RST_REQ_COMPLETED ? 0 : 1;
}
-int cs1k_es_deassert(struct reset_controller_dev *rcdev,
- unsigned long id)
+static int cs1k_es_deassert(struct reset_controller_dev *rcdev,
+ unsigned long id)
{
u32 status;
struct cs1k_es_reset_data *reset =
diff --git a/remoteproc/juno_fpga_reset.c b/remoteproc/juno_fpga_reset.c
index 0d29c20..901d1ca 100644
--- a/remoteproc/juno_fpga_reset.c
+++ b/remoteproc/juno_fpga_reset.c
@@ -67,8 +67,8 @@ static void __iomem *verify_and_remap(struct device *dev,
return base;
}
-int juno_fpga_reset_assert(struct reset_controller_dev *rcdev,
- unsigned long id)
+static int juno_fpga_reset_assert(struct reset_controller_dev *rcdev,
+ unsigned long id)
{
struct juno_fpga_reset *reset = container_of(rcdev,
struct juno_fpga_reset,
@@ -89,8 +89,8 @@ int juno_fpga_reset_assert(struct reset_controller_dev *rcdev,
return 0;
}
-int juno_fpga_reset_deassert(struct reset_controller_dev *rcdev,
- unsigned long id)
+static int juno_fpga_reset_deassert(struct reset_controller_dev *rcdev,
+ unsigned long id)
{
struct juno_fpga_reset *reset = container_of(rcdev,
struct juno_fpga_reset,