]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soc: qcom: mdtloader: Remove qcom_mdt_pas_init() from exported symbols
authorMukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Mon, 5 Jan 2026 13:22:55 +0000 (18:52 +0530)
committerBjorn Andersson <andersson@kernel.org>
Tue, 13 Jan 2026 18:14:34 +0000 (12:14 -0600)
qcom_mdt_pas_init() was previously used only by the remoteproc driver
(drivers/remoteproc/qcom_q6v5_pas.c). Since that driver has now
transitioned to using PAS context-based qcom_mdt_pas_load() function,
making qcom_mdt_pas_init() obsolete for external use.

Removes qcom_mdt_pas_init() from the list of exported symbols and make
it static to limit its scope to internal use within mdtloader.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260105-kvmrprocv10-v10-7-022e96815380@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/mdt_loader.c
include/linux/soc/qcom/mdt_loader.h

index 50c6a3c6b2a3e9900a8197a5bdb83336b17e7cea..c004d444d6985f1379d343f1ffb0963402ae6f44 100644 (file)
@@ -227,20 +227,9 @@ void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len,
 }
 EXPORT_SYMBOL_GPL(qcom_mdt_read_metadata);
 
-/**
- * qcom_mdt_pas_init() - initialize PAS region for firmware loading
- * @dev:       device handle to associate resources with
- * @fw:                firmware object for the mdt file
- * @fw_name:   name of the firmware, for construction of segment file names
- * @pas_id:    PAS identifier
- * @mem_phys:  physical address of allocated memory region
- * @ctx:       PAS context, ctx->metadata to be released by caller
- *
- * Returns 0 on success, negative errno otherwise.
- */
-int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
-                     const char *fw_name, int pas_id, phys_addr_t mem_phys,
-                     struct qcom_scm_pas_context *ctx)
+static int __qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
+                              const char *fw_name, int pas_id, phys_addr_t mem_phys,
+                              struct qcom_scm_pas_context *ctx)
 {
        const struct elf32_phdr *phdrs;
        const struct elf32_phdr *phdr;
@@ -302,7 +291,6 @@ int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
 out:
        return ret;
 }
-EXPORT_SYMBOL_GPL(qcom_mdt_pas_init);
 
 static bool qcom_mdt_bins_are_split(const struct firmware *fw)
 {
@@ -469,7 +457,7 @@ int qcom_mdt_load(struct device *dev, const struct firmware *fw,
 {
        int ret;
 
-       ret = qcom_mdt_pas_init(dev, fw, fw_name, pas_id, mem_phys, NULL);
+       ret = __qcom_mdt_pas_init(dev, fw, fw_name, pas_id, mem_phys, NULL);
        if (ret)
                return ret;
 
@@ -500,7 +488,7 @@ int qcom_mdt_pas_load(struct qcom_scm_pas_context *ctx, const struct firmware *f
 {
        int ret;
 
-       ret = qcom_mdt_pas_init(ctx->dev, fw, firmware, ctx->pas_id, ctx->mem_phys, ctx);
+       ret = __qcom_mdt_pas_init(ctx->dev, fw, firmware, ctx->pas_id, ctx->mem_phys, ctx);
        if (ret)
                return ret;
 
index 7d57746fbbfa50ad8d59af337fc1ea71d5b340d1..82372e0db0a18f4e07bf11054d7f1fb519be0b68 100644 (file)
@@ -15,9 +15,6 @@ struct qcom_scm_pas_context;
 #if IS_ENABLED(CONFIG_QCOM_MDT_LOADER)
 
 ssize_t qcom_mdt_get_size(const struct firmware *fw);
-int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
-                     const char *fw_name, int pas_id, phys_addr_t mem_phys,
-                     struct qcom_scm_pas_context *pas_ctx);
 int qcom_mdt_load(struct device *dev, const struct firmware *fw,
                  const char *fw_name, int pas_id, void *mem_region,
                  phys_addr_t mem_phys, size_t mem_size,
@@ -40,13 +37,6 @@ static inline ssize_t qcom_mdt_get_size(const struct firmware *fw)
        return -ENODEV;
 }
 
-static inline int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
-                                   const char *fw_name, int pas_id, phys_addr_t mem_phys,
-                                   struct qcom_scm_pas_context *pas_ctx)
-{
-       return -ENODEV;
-}
-
 static inline int qcom_mdt_load(struct device *dev, const struct firmware *fw,
                                const char *fw_name, int pas_id,
                                void *mem_region, phys_addr_t mem_phys,