soc: qcom: mdt_loader: Remove unused parameter
Subsystems (7)
PATCH v3 1/3 soc: qcom: mdt_loader: Remove unused parameter
commit f4e526ff7e38e ("soc: qcom: mdt_loader: Extract PAS
operations") move pas specific code from __qcom_mdt_load()
to a separate function qcom_mdt_pas_init() after which the pas_init variable became unused in __qcom_mdt_load().
Remove pas_init argument from __qcom_mdt_load().
---
Changes in v3: https://lore.kernel.org/lkml/[email protected]/
- Because of the drop of 1/4 in earlier version this becomes first
patch.
- Changes in v2:
- Added R-b tag and its order in the series.
drivers/soc/qcom/mdt_loader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/soc/qcom/mdt_loader.c +3 -3
@@ -333,7 +333,7 @@ static bool qcom_mdt_bins_are_split(const struct firmware *fw, const char *fw_nastatic 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, -phys_addr_t *reloc_base,bool pas_init) +phys_addr_t *reloc_base) {const struct elf32_phdr *phdrs;const struct elf32_phdr *phdr;
@@ -459,7 +459,7 @@ int qcom_mdt_load(struct device *dev, const struct firmware *fw,return ret;return __qcom_mdt_load (dev, fw, firmware, pas_id, mem_region, mem_phys, - mem_size, reloc_base, true); + mem_size, reloc_base); }EXPORT_SYMBOL_GPL (qcom_mdt_load);
@@ -482,7 +482,7 @@ int qcom_mdt_load_no_init(struct device *dev, const struct firmware *fw, size_t mem_size, phys_addr_t *reloc_base) { return __qcom_mdt_load(dev, fw, firmware, pas_id, mem_region, mem_phys, -mem_size ,reloc_base ,false ); +mem_size ,reloc_base ); }EXPORT_SYMBOL_GPL (qcom_mdt_load_no_init);
Signature · 1 line
2.50.1
PATCH v3 2/3 soc: qcom: mdt_loader: Remove pas id parameter
pas id is not used in qcom_mdt_load_no_init() and it should not be used as it is non-PAS specific function and has no relation to PAS specific mechanism.
---
Changes in v3: https://lore.kernel.org/lkml/[email protected]/
- Some left over removed from this patch and moved to 3/3
- patch order changes due to drop of one patch from earlier version.
Changes in v2:
- Added Acked-b and R-b tag and its order in the series.
drivers/media/platform/qcom/venus/firmware.c | 4 ++-- drivers/net/wireless/ath/ath12k/ahb.c | 2 +- drivers/remoteproc/qcom_q6v5_adsp.c | 2 +- drivers/remoteproc/qcom_q6v5_pas.c | 7 +++---- drivers/remoteproc/qcom_q6v5_wcss.c | 2 +- drivers/soc/qcom/mdt_loader.c | 10 ++++------ include/linux/soc/qcom/mdt_loader.h | 7 +++---- 7 files changed, 15 insertions(+), 19 deletions(-)
drivers/media/platform/qcom/venus/firmware.c +2 -2
@@ -136,8 +136,8 @@ static int venus_load_fw(struct venus_core *core, const char *fwname, ret =qcom_mdt_load (dev, mdt, fwname,VENUS_PAS_ID , mem_va, *mem_phys, *mem_size,NULL ); else - ret =qcom_mdt_load_no_init (dev, mdt, fwname,VENUS_PAS_ID , - mem_va, *mem_phys, *mem_size,NULL ); + ret =qcom_mdt_load_no_init (dev, mdt, fwname, mem_va, + *mem_phys, *mem_size,NULL );memunmap (mem_va); err_release_fw:
drivers/net/wireless/ath/ath12k/ahb.c +1 -1
@@ -414,7 +414,7 @@ static int ath12k_ahb_power_up(struct ath12k_base *ab) goto err_fw2; } - ret =qcom_mdt_load_no_init (dev, fw2, fw2_name, pasid, mem_region, mem_phys, + ret =qcom_mdt_load_no_init (dev, fw2, fw2_name, mem_region, mem_phys, mem_size, &mem_phys);if (ret) {ath12k_err (ab,"Failed to load MDT segments: %d\n" , ret);
drivers/remoteproc/qcom_q6v5_adsp.c +1 -1
@@ -317,7 +317,7 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw)struct qcom_adsp *adsp = rproc->priv;int ret; - ret =qcom_mdt_load_no_init (adsp->dev, fw, rproc->firmware,0 , + ret =qcom_mdt_load_no_init (adsp->dev, fw, rproc->firmware, adsp->mem_region, adsp->mem_phys, adsp->mem_size, &adsp->mem_reloc);if (ret)
drivers/remoteproc/qcom_q6v5_pas.c +3 -4
@@ -242,9 +242,8 @@ static int qcom_pas_load(struct rproc *rproc, const struct firmware *fw) goto release_dtb_firmware; ret =qcom_mdt_load_no_init (pas->dev, pas->dtb_firmware, pas->dtb_firmware_name, - pas->dtb_pas_id, pas->dtb_mem_region, - pas->dtb_mem_phys, pas->dtb_mem_size, - &pas->dtb_mem_reloc); + pas->dtb_mem_region, pas->dtb_mem_phys, + pas->dtb_mem_size, &pas->dtb_mem_reloc);if (ret) goto release_dtb_metadata; }
@@ -307,7 +306,7 @@ static int qcom_pas_start(struct rproc *rproc)if (ret) goto disable_px_supply; - ret =qcom_mdt_load_no_init (pas->dev, pas->firmware, rproc->firmware, pas->pas_id, + ret =qcom_mdt_load_no_init (pas->dev, pas->firmware, rproc->firmware, pas->mem_region, pas->mem_phys, pas->mem_size, &pas->mem_reloc);if (ret)
drivers/remoteproc/qcom_q6v5_wcss.c +1 -1
@@ -757,7 +757,7 @@ static int q6v5_wcss_load(struct rproc *rproc, const struct firmware *fw)int ret; ret =qcom_mdt_load_no_init (wcss->dev, fw, rproc->firmware, -0 , wcss->mem_region, wcss->mem_phys, + wcss->mem_region, wcss->mem_phys, wcss->mem_size, &wcss->mem_reloc);if (ret)return ret;
drivers/soc/qcom/mdt_loader.c +4 -6
@@ -331,7 +331,7 @@ static bool qcom_mdt_bins_are_split(const struct firmware *fw, const char *fw_na }static int __qcom_mdt_load (struct device *dev,const struct firmware *fw, -const char *fw_name,int pas_id,void *mem_region, +const char *fw_name,void *mem_region,phys_addr_t mem_phys,size_t mem_size,phys_addr_t *reloc_base) {
@@ -458,7 +458,7 @@ int qcom_mdt_load(struct device *dev, const struct firmware *fw,if (ret)return ret; -return __qcom_mdt_load (dev, fw, firmware, pas_id, mem_region, mem_phys, +return __qcom_mdt_load (dev, fw, firmware, mem_region, mem_phys, mem_size, reloc_base); }EXPORT_SYMBOL_GPL (qcom_mdt_load);
@@ -468,7 +468,6 @@ EXPORT_SYMBOL_GPL(qcom_mdt_load);* @dev: device handle to associate resources with * @fw: firmware object for the mdt file * @firmware: name of the firmware, for construction of segment file names -* @pas_id: PAS identifier * @mem_region: allocated memory region to load firmware into * @mem_phys: physical address of allocated memory region * @mem_size: size of the allocated memory region
@@ -477,11 +476,10 @@ EXPORT_SYMBOL_GPL(qcom_mdt_load);* Returns 0 on success, negative errno otherwise. */ int qcom_mdt_load_no_init (struct device *dev,const struct firmware *fw, -const char *firmware,int pas_id, -void *mem_region,phys_addr_t mem_phys, +const char *firmware,void *mem_region,phys_addr_t mem_phys,size_t mem_size,phys_addr_t *reloc_base) { -return __qcom_mdt_load (dev, fw, firmware, pas_id, mem_region, mem_phys, +return __qcom_mdt_load (dev, fw, firmware, mem_region, mem_phys, mem_size, reloc_base); }EXPORT_SYMBOL_GPL (qcom_mdt_load_no_init);
include/linux/soc/qcom/mdt_loader.h +3 -4
@@ -24,7 +24,7 @@ int qcom_mdt_load(struct device *dev, const struct firmware *fw, phys_addr_t *reloc_base);int qcom_mdt_load_no_init (struct device *dev,const struct firmware *fw, -const char *fw_name,int pas_id,void *mem_region, +const char *fw_name,void *mem_region,phys_addr_t mem_phys,size_t mem_size,phys_addr_t *reloc_base); void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len,
@@ -54,9 +54,8 @@ static inline int qcom_mdt_load(struct device *dev, const struct firmware *fw,static inline int qcom_mdt_load_no_init (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, +const char *fw_name,void *mem_region, +phys_addr_t mem_phys,size_t mem_size,phys_addr_t *reloc_base) {return -ENODEV ;
Signature · 1 line
2.50.1
Re: [Patch v3 2/3] soc: qcom: mdt_loader: Remove pas id parameter
Quoted 8 lines · Mukesh Ojha
pas id is not used in
qcom_mdt_load_no_init()and it should not be used as it is non-PAS specific function and has no relation to PAS specific mechanism.Reviewed-by Dikshita Agarwal <[email protected]>Signed-off-by Mukesh Ojha <[email protected]>---
Konrad
PATCH v3 3/3 soc: qcom: mdt_loader: Remove unused parameter
In reply to Mukesh Ojhafw_name in qcom_mdt_bins_are_split() seems unused now, it may have used in the past for logging it but due to code refactor this parameter is unused now.
---
Changes in v3: https://lore.kernel.org/lkml/[email protected]/
- Caller of qcom_mdt_bins_are_split() was modified in 2/2 of this patch in earlier version, bring the change here.
- patch order changes due to drop of one patch from earlier version.
Changes in v2:
- made this as separate patch.
drivers/soc/qcom/mdt_loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/qcom/mdt_loader.c +2 -2
@@ -302,7 +302,7 @@ int qcom_mdt_pas_init(struct device *dev, const struct firmware *fw, }EXPORT_SYMBOL_GPL (qcom_mdt_pas_init); -static bool qcom_mdt_bins_are_split (const struct firmware *fw,const char *fw_name) +static bool qcom_mdt_bins_are_split (const struct firmware *fw) {const struct elf32_phdr *phdrs;const struct elf32_hdr *ehdr;
@@ -353,7 +353,7 @@ static int __qcom_mdt_load(struct device *dev, const struct firmware *fw,if (!mdt_header_valid (fw))return -EINVAL ; - is_split =qcom_mdt_bins_are_split (fw, fw_name); + is_split =qcom_mdt_bins_are_split (fw); ehdr = (struct elf32_hdr *)fw->data; phdrs = (struct elf32_phdr *)(fw->data + ehdr->e_phoff);
Signature · 1 line
2.50.1
Quoted 6 lines · Mukesh Ojha
fw_nameinqcom_mdt_bins_are_split()seems unused now, it may have used in the past for logging it but due to code refactor this parameter is unused now.Signed-off-by Mukesh Ojha <[email protected]>---
Konrad
Quoted 5 lines · Mukesh Ojha
fw_nameinqcom_mdt_bins_are_split()seems unused now, it may have used in the past for logging it but due to code refactor this parameter is unused now.Signed-off-by Mukesh Ojha <[email protected]>
Quoted 8 lines · Mukesh Ojha
commit
f4e526ff7e38e("soc: qcom:mdt_loader: Extract PAS
operations") move pas specific code from__qcom_mdt_load()
to a separate functionqcom_mdt_pas_init()after which thepas_initvariable became unused in__qcom_mdt_load().Remove
pas_initargument from__qcom_mdt_load().[...]
Applied, thanks!
[1/3] soc: qcom: mdt_loader: Remove unused parameter
commit: 3bf7097bfdd4cf43874d7d41689957bc0d581d47
[2/3] soc: qcom: mdt_loader: Remove pas id parameter
commit: 0daf35da397b083ea0ea5407196bb6bd210530ec
[3/3] soc: qcom: mdt_loader: Remove unused parameter
commit: 3bf7097bfdd4cf43874d7d41689957bc0d581d47Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>