[PATCH v4 17/19] fpga: dfl: remove unneeded function build_info_create_dev()

Peter Colberg posted 19 patches 1 month ago
There is a newer version of this series
[PATCH v4 17/19] fpga: dfl: remove unneeded function build_info_create_dev()
Posted by Peter Colberg 1 month ago
Now that the platform device allocation has been moved from
build_info_create_dev() to feature_dev_register(), the former
no longer serves its original purpose and may be removed.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com>
---
Changes since v3:
- New patch extracted from last patch of v3 series.
---
 drivers/fpga/dfl.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
index d9cef150ed0d..a2459b0cbc68 100644
--- a/drivers/fpga/dfl.c
+++ b/drivers/fpga/dfl.c
@@ -858,16 +858,6 @@ binfo_create_feature_dev_data(struct build_feature_devs_info *binfo)
 	return fdata;
 }
 
-static int
-build_info_create_dev(struct build_feature_devs_info *binfo)
-{
-	binfo->feature_num = 0;
-
-	INIT_LIST_HEAD(&binfo->sub_features);
-
-	return 0;
-}
-
 /*
  * register current feature device, it is called when we need to switch to
  * another feature parsing or we have parsed all features on given device
@@ -1316,11 +1306,8 @@ static int parse_feature_fiu(struct build_feature_devs_info *binfo,
 		return -EINVAL;
 
 	binfo->type = type;
-
-	/* create platform device for dfl feature dev */
-	ret = build_info_create_dev(binfo);
-	if (ret)
-		return ret;
+	binfo->feature_num = 0;
+	INIT_LIST_HEAD(&binfo->sub_features);
 
 	ret = create_feature_instance(binfo, 0, 0, 0);
 	if (ret)
-- 
2.47.0
Re: [PATCH v4 17/19] fpga: dfl: remove unneeded function build_info_create_dev()
Posted by Xu Yilun 6 days, 22 hours ago
On Fri, Oct 25, 2024 at 06:37:12PM -0400, Peter Colberg wrote:
> Now that the platform device allocation has been moved from
> build_info_create_dev() to feature_dev_register(), the former
> no longer serves its original purpose and may be removed.

may be removed? It is removed in this patch, please be confirmative.

Thanks,
Yilun

> 
> Signed-off-by: Peter Colberg <peter.colberg@intel.com>
> Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
> Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com>
> ---
> Changes since v3:
> - New patch extracted from last patch of v3 series.
> ---
>  drivers/fpga/dfl.c | 17 ++---------------
>  1 file changed, 2 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
> index d9cef150ed0d..a2459b0cbc68 100644
> --- a/drivers/fpga/dfl.c
> +++ b/drivers/fpga/dfl.c
> @@ -858,16 +858,6 @@ binfo_create_feature_dev_data(struct build_feature_devs_info *binfo)
>  	return fdata;
>  }
>  
> -static int
> -build_info_create_dev(struct build_feature_devs_info *binfo)
> -{
> -	binfo->feature_num = 0;
> -
> -	INIT_LIST_HEAD(&binfo->sub_features);
> -
> -	return 0;
> -}
> -
>  /*
>   * register current feature device, it is called when we need to switch to
>   * another feature parsing or we have parsed all features on given device
> @@ -1316,11 +1306,8 @@ static int parse_feature_fiu(struct build_feature_devs_info *binfo,
>  		return -EINVAL;
>  
>  	binfo->type = type;
> -
> -	/* create platform device for dfl feature dev */
> -	ret = build_info_create_dev(binfo);
> -	if (ret)
> -		return ret;
> +	binfo->feature_num = 0;
> +	INIT_LIST_HEAD(&binfo->sub_features);
>  
>  	ret = create_feature_instance(binfo, 0, 0, 0);
>  	if (ret)
> -- 
> 2.47.0
> 
>
Re: [PATCH v4 17/19] fpga: dfl: remove unneeded function build_info_create_dev()
Posted by Colberg, Peter 5 days, 13 hours ago
On Mon, 2024-11-18 at 22:58 +0800, Xu Yilun wrote:
> On Fri, Oct 25, 2024 at 06:37:12PM -0400, Peter Colberg wrote:
> > Now that the platform device allocation has been moved from
> > build_info_create_dev() to feature_dev_register(), the former
> > no longer serves its original purpose and may be removed.
> 
> may be removed? It is removed in this patch, please be confirmative.

The commit description has been revised in [PATCH v5 16/18].

Thanks,
Peter

> 
> Thanks,
> Yilun
> 
> > 
> > Signed-off-by: Peter Colberg <peter.colberg@intel.com>
> > Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
> > Reviewed-by: Basheer Ahmed Muddebihal <basheer.ahmed.muddebihal@linux.intel.com>
> > ---
> > Changes since v3:
> > - New patch extracted from last patch of v3 series.
> > ---
> >  drivers/fpga/dfl.c | 17 ++---------------
> >  1 file changed, 2 insertions(+), 15 deletions(-)
> > 
> > diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
> > index d9cef150ed0d..a2459b0cbc68 100644
> > --- a/drivers/fpga/dfl.c
> > +++ b/drivers/fpga/dfl.c
> > @@ -858,16 +858,6 @@ binfo_create_feature_dev_data(struct build_feature_devs_info *binfo)
> >  	return fdata;
> >  }
> >  
> > -static int
> > -build_info_create_dev(struct build_feature_devs_info *binfo)
> > -{
> > -	binfo->feature_num = 0;
> > -
> > -	INIT_LIST_HEAD(&binfo->sub_features);
> > -
> > -	return 0;
> > -}
> > -
> >  /*
> >   * register current feature device, it is called when we need to switch to
> >   * another feature parsing or we have parsed all features on given device
> > @@ -1316,11 +1306,8 @@ static int parse_feature_fiu(struct build_feature_devs_info *binfo,
> >  		return -EINVAL;
> >  
> >  	binfo->type = type;
> > -
> > -	/* create platform device for dfl feature dev */
> > -	ret = build_info_create_dev(binfo);
> > -	if (ret)
> > -		return ret;
> > +	binfo->feature_num = 0;
> > +	INIT_LIST_HEAD(&binfo->sub_features);
> >  
> >  	ret = create_feature_instance(binfo, 0, 0, 0);
> >  	if (ret)
> > -- 
> > 2.47.0
> > 
> >