fpga: dfl: afu: remove unused member pdata from struct dfl_afu
Subsystems (2)
PATCH 1/1 fpga: dfl: afu: remove unused member pdata from struct dfl_afu
The member pdata was added to struct dfl_afu in commit 857a26222ff7 ("fpga: dfl: afu: add afu sub feature support") and is set in function afu_dev_init() but otherwise never used.
--- drivers/fpga/dfl-afu-main.c | 2 -- drivers/fpga/dfl-afu.h | 3 --- 2 files changed, 5 deletions(-)
drivers/fpga/dfl-afu-main.c +0 -2
@@ -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
@@ -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 */
Signature · 1 line
2.44.0
Quoted 3 lines · Peter Colberg
The member pdata was added to struct
dfl_afuin commit857a26222ff7("fpga: dfl: afu: add afu sub feature support") and is set in functionafu_dev_init()but otherwise never used.
Could you also help check if dfl_fme has the same issue?
Thanks,
Yilun
Quoted 46 lines
Signed-off-by Peter Colberg <[email protected]>Reviewed-by Matthew Gerlach <[email protected]>--- drivers/fpga/dfl-afu-main.c | 2 -- drivers/fpga/dfl-afu.h | 3 --- 2 files changed, 5 deletions(-)drivers/fpga/dfl-afu-main.c +0
-2@@ -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@@ -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 */ Signature · 1 line
2.44.0
Quoted 6 lines · Xu Yilun
Quoted 3 lines · Peter Colberg
The member pdata was added to struct
dfl_afuin commit857a26222ff7("fpga: dfl: afu: add afu sub feature support") and is set in functionafu_dev_init()but otherwise never used.Could you also help check if
dfl_fmehas the same issue?
Indeed, thank you for pointing this out.
Peter
Quoted 50 lines
Thanks,
YilunQuoted 46 lines
Signed-off-by Peter Colberg <[email protected]>Reviewed-by Matthew Gerlach <[email protected]>--- drivers/fpga/dfl-afu-main.c | 2 -- drivers/fpga/dfl-afu.h | 3 --- 2 files changed, 5 deletions(-)drivers/fpga/dfl-afu-main.c +0
-2@@ -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@@ -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 */ Signature · 1 line
2.44.0