linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fpga: dfl: afu: remove unused member pdata from struct dfl_afu
@ 2024-03-28 23:54 Peter Colberg
  2024-04-01 14:57 ` Xu Yilun
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Colberg @ 2024-03-28 23:54 UTC (permalink / raw)
  To: Wu Hao, Tom Rix, Moritz Fischer, Xu Yilun, linux-fpga,
	linux-kernel
  Cc: Russ Weight, Marco Pagani, Matthew Gerlach, Peter Colberg

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.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
---
 drivers/fpga/dfl-afu-main.c | 2 --
 drivers/fpga/dfl-afu.h      | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c
index c0a75ca360d6..6b97c073849e 100644
--- a/drivers/fpga/dfl-afu-main.c
+++ b/drivers/fpga/dfl-afu-main.c
@@ -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);
diff --git a/drivers/fpga/dfl-afu.h b/drivers/fpga/dfl-afu.h
index 674e9772f0ea..7bef3e300aa2 100644
--- a/drivers/fpga/dfl-afu.h
+++ b/drivers/fpga/dfl-afu.h
@@ -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 */
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fpga: dfl: afu: remove unused member pdata from struct dfl_afu
  2024-03-28 23:54 [PATCH] fpga: dfl: afu: remove unused member pdata from struct dfl_afu Peter Colberg
@ 2024-04-01 14:57 ` Xu Yilun
  2024-04-01 18:27   ` Colberg, Peter
  0 siblings, 1 reply; 3+ messages in thread
From: Xu Yilun @ 2024-04-01 14:57 UTC (permalink / raw)
  To: Peter Colberg
  Cc: Wu Hao, Tom Rix, Moritz Fischer, Xu Yilun, linux-fpga,
	linux-kernel, Russ Weight, Marco Pagani, Matthew Gerlach

On Thu, Mar 28, 2024 at 07:54:17PM -0400, Peter Colberg wrote:
> 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.

Could you also help check if dfl_fme has the same issue?

Thanks,
Yilun

> 
> Signed-off-by: Peter Colberg <peter.colberg@intel.com>
> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
> ---
>  drivers/fpga/dfl-afu-main.c | 2 --
>  drivers/fpga/dfl-afu.h      | 3 ---
>  2 files changed, 5 deletions(-)
> 
> diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c
> index c0a75ca360d6..6b97c073849e 100644
> --- a/drivers/fpga/dfl-afu-main.c
> +++ b/drivers/fpga/dfl-afu-main.c
> @@ -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);
> diff --git a/drivers/fpga/dfl-afu.h b/drivers/fpga/dfl-afu.h
> index 674e9772f0ea..7bef3e300aa2 100644
> --- a/drivers/fpga/dfl-afu.h
> +++ b/drivers/fpga/dfl-afu.h
> @@ -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 */
> -- 
> 2.44.0
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fpga: dfl: afu: remove unused member pdata from struct dfl_afu
  2024-04-01 14:57 ` Xu Yilun
@ 2024-04-01 18:27   ` Colberg, Peter
  0 siblings, 0 replies; 3+ messages in thread
From: Colberg, Peter @ 2024-04-01 18:27 UTC (permalink / raw)
  To: yilun.xu@linux.intel.com
  Cc: Xu, Yilun, linux-fpga@vger.kernel.org, mdf@kernel.org, Wu, Hao,
	linux-kernel@vger.kernel.org, russ.weight@linux.dev,
	Pagani, Marco, Rix, Tom, matthew.gerlach@linux.intel.com

On Mon, 2024-04-01 at 22:57 +0800, Xu Yilun wrote:
> On Thu, Mar 28, 2024 at 07:54:17PM -0400, Peter Colberg wrote:
> > 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.
> 
> Could you also help check if dfl_fme has the same issue?

Indeed, thank you for pointing this out.

Peter

> 
> Thanks,
> Yilun
> 
> > 
> > Signed-off-by: Peter Colberg <peter.colberg@intel.com>
> > Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
> > ---
> >  drivers/fpga/dfl-afu-main.c | 2 --
> >  drivers/fpga/dfl-afu.h      | 3 ---
> >  2 files changed, 5 deletions(-)
> > 
> > diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c
> > index c0a75ca360d6..6b97c073849e 100644
> > --- a/drivers/fpga/dfl-afu-main.c
> > +++ b/drivers/fpga/dfl-afu-main.c
> > @@ -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);
> > diff --git a/drivers/fpga/dfl-afu.h b/drivers/fpga/dfl-afu.h
> > index 674e9772f0ea..7bef3e300aa2 100644
> > --- a/drivers/fpga/dfl-afu.h
> > +++ b/drivers/fpga/dfl-afu.h
> > @@ -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 */
> > -- 
> > 2.44.0
> > 
> > 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-01 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-28 23:54 [PATCH] fpga: dfl: afu: remove unused member pdata from struct dfl_afu Peter Colberg
2024-04-01 14:57 ` Xu Yilun
2024-04-01 18:27   ` Colberg, Peter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).