Skip to contentSkip to conversation

fpga: dfl: remove unused member pdata from struct dfl_{afu,fme}

PATCH Applied Peter Colberg 2 participants 3 messages Apr 1, 2024 – Apr 13, 2024

Subsystems (2)

v2 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fpga: dfl: remove unused member pdata from struct dfl_{afu,fme}

The member pdata was added to struct dfl_afu in commit 857a26222ff7 ("fpga:
dfl: afu: add afu sub feature support") and to struct dfl_fme in commit 29de76240e86 ("fpga: dfl: fme: add partial reconfiguration sub feature support"). It is set in function {afu,fme}_dev_init() but never used.

---
v2:
- Remove unused member pdata from struct dfl_fme, too.

---
 drivers/fpga/dfl-afu-main.c | 2 --
 drivers/fpga/dfl-afu.h      | 3 ---
 drivers/fpga/dfl-fme-main.c | 2 --
 drivers/fpga/dfl-fme.h      | 2 --
 4 files changed, 9 deletions(-)
drivers/fpga/dfl-afu-main.c +0 -2
index c0a75ca360d6..6b97c073849e 100644
@@ -858,8 +858,6 @@ static int afu_dev_init(struct platform_device *pdev)
 	if (!afu)
 		return -ENOMEM;
 
-	afu->pdata = pdata;
-
 	mutex_lock(&pdata->lock);
 	dfl_fpga_pdata_set_private(pdata, afu);
 	afu_mmio_region_init(pdata);
drivers/fpga/dfl-afu.h +0 -3
index 674e9772f0ea..7bef3e300aa2 100644
@@ -67,7 +67,6 @@ struct dfl_afu_dma_region {
  * @regions: the mmio region linked list of this afu feature device.
  * @dma_regions: root of dma regions rb tree.
  * @num_umsgs: num of umsgs.
- * @pdata: afu platform device's pdata.
  */
 struct dfl_afu {
 	u64 region_cur_offset;
@@ -75,8 +74,6 @@ struct dfl_afu {
 	u8 num_umsgs;
 	struct list_head regions;
 	struct rb_root dma_regions;
-
-	struct dfl_feature_platform_data *pdata;
 };
 
 /* hold pdata->lock when call __afu_port_enable/disable */
drivers/fpga/dfl-fme-main.c +0 -2
index a2b5da0093da..864924f68f5e 100644
@@ -679,8 +679,6 @@ static int fme_dev_init(struct platform_device *pdev)
 	if (!fme)
 		return -ENOMEM;
 
-	fme->pdata = pdata;
-
 	mutex_lock(&pdata->lock);
 	dfl_fpga_pdata_set_private(pdata, fme);
 	mutex_unlock(&pdata->lock);
drivers/fpga/dfl-fme.h +0 -2
index 4195dd68193e..a566dbc2b485 100644
@@ -24,13 +24,11 @@
  * @mgr: FME's FPGA manager platform device.
  * @region_list: linked list of FME's FPGA regions.
  * @bridge_list: linked list of FME's FPGA bridges.
- * @pdata: fme platform device's pdata.
  */
 struct dfl_fme {
 	struct platform_device *mgr;
 	struct list_head region_list;
 	struct list_head bridge_list;
-	struct dfl_feature_platform_data *pdata;
 };
 
 extern const struct dfl_feature_ops fme_pr_mgmt_ops;
Signature · 1 line
2.44.0
Acked-by on v2 1/1 Applied
#1 lore raw
Quoted 7 lines · Peter Colberg

The member pdata was added to struct dfl_afu in commit 857a26222ff7 ("fpga:
dfl: afu: add afu sub feature support") and to struct dfl_fme in commit 29de76240e86 ("fpga: dfl: fme: add partial reconfiguration sub feature support"). It is set in function {afu,fme}_dev_init() but never used.

Applied to for-next.

#2 lore raw
Quoted 3 lines · Xu Yilun
Quoted 2 lines · Peter Colberg

The member pdata was added to struct dfl_afu in commit 857a26222ff7 ("fpga:
dfl: afu: add afu sub feature support") and to struct dfl_fme in commit

Sorry, I didn't apply. Please don't wrap the git commit description. Put them in a new line but no wrap, if you have to reference git commit in changelog.

Quoted 2 lines
Quoted 2 lines

29de76240e86 ("fpga: dfl: fme: add partial reconfiguration sub feature support").

This sentence is actually not useful, I suggest you just remove it and add a Fix: tag below. That makes reviewers quickly find what the problem. Also avoid the git commit references fragments the changelog too much.

Thanks,
Yilun

Quoted 9 lines
Quoted 4 lines

It is set in function {afu,fme}_dev_init() but never used.

Applied to for-next.