Skip to content

Commit 928dbaa

Browse files
mukeshojha-linuxandersson
authored andcommitted
soc: qcom: mdtloader: Remove qcom_mdt_pas_init() from exported symbols
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>
1 parent 8a4fcff commit 928dbaa

2 files changed

Lines changed: 5 additions & 27 deletions

File tree

drivers/soc/qcom/mdt_loader.c

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -227,20 +227,9 @@ void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len,
227227
}
228228
EXPORT_SYMBOL_GPL(qcom_mdt_read_metadata);
229229

230-
/**
231-
* qcom_mdt_pas_init() - initialize PAS region for firmware loading
232-
* @dev: device handle to associate resources with
233-
* @fw: firmware object for the mdt file
234-
* @fw_name: name of the firmware, for construction of segment file names
235-
* @pas_id: PAS identifier
236-
* @mem_phys: physical address of allocated memory region
237-
* @ctx: PAS context, ctx->metadata to be released by caller
238-
*
239-
* Returns 0 on success, negative errno otherwise.
240-
*/
241-
int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
242-
const char *fw_name, int pas_id, phys_addr_t mem_phys,
243-
struct qcom_scm_pas_context *ctx)
230+
static int __qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
231+
const char *fw_name, int pas_id, phys_addr_t mem_phys,
232+
struct qcom_scm_pas_context *ctx)
244233
{
245234
const struct elf32_phdr *phdrs;
246235
const struct elf32_phdr *phdr;
@@ -302,7 +291,6 @@ int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
302291
out:
303292
return ret;
304293
}
305-
EXPORT_SYMBOL_GPL(qcom_mdt_pas_init);
306294

307295
static bool qcom_mdt_bins_are_split(const struct firmware *fw)
308296
{
@@ -469,7 +457,7 @@ int qcom_mdt_load(struct device *dev, const struct firmware *fw,
469457
{
470458
int ret;
471459

472-
ret = qcom_mdt_pas_init(dev, fw, fw_name, pas_id, mem_phys, NULL);
460+
ret = __qcom_mdt_pas_init(dev, fw, fw_name, pas_id, mem_phys, NULL);
473461
if (ret)
474462
return ret;
475463

@@ -500,7 +488,7 @@ int qcom_mdt_pas_load(struct qcom_scm_pas_context *ctx, const struct firmware *f
500488
{
501489
int ret;
502490

503-
ret = qcom_mdt_pas_init(ctx->dev, fw, firmware, ctx->pas_id, ctx->mem_phys, ctx);
491+
ret = __qcom_mdt_pas_init(ctx->dev, fw, firmware, ctx->pas_id, ctx->mem_phys, ctx);
504492
if (ret)
505493
return ret;
506494

include/linux/soc/qcom/mdt_loader.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ struct qcom_scm_pas_context;
1515
#if IS_ENABLED(CONFIG_QCOM_MDT_LOADER)
1616

1717
ssize_t qcom_mdt_get_size(const struct firmware *fw);
18-
int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
19-
const char *fw_name, int pas_id, phys_addr_t mem_phys,
20-
struct qcom_scm_pas_context *pas_ctx);
2118
int qcom_mdt_load(struct device *dev, const struct firmware *fw,
2219
const char *fw_name, int pas_id, void *mem_region,
2320
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)
4037
return -ENODEV;
4138
}
4239

43-
static inline int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw,
44-
const char *fw_name, int pas_id, phys_addr_t mem_phys,
45-
struct qcom_scm_pas_context *pas_ctx)
46-
{
47-
return -ENODEV;
48-
}
49-
5040
static inline int qcom_mdt_load(struct device *dev, const struct firmware *fw,
5141
const char *fw_name, int pas_id,
5242
void *mem_region, phys_addr_t mem_phys,

0 commit comments

Comments
 (0)