From: "Colberg, Peter" <peter.colberg@intel.com>
To: "yilun.xu@linux.intel.com" <yilun.xu@linux.intel.com>
Cc: "Xu, Yilun" <yilun.xu@intel.com>,
"linux-fpga@vger.kernel.org" <linux-fpga@vger.kernel.org>,
"mdf@kernel.org" <mdf@kernel.org>, "Wu, Hao" <hao.wu@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"russ.weight@linux.dev" <russ.weight@linux.dev>,
"Pagani, Marco" <marpagan@redhat.com>,
"trix@redhat.com" <trix@redhat.com>,
"basheer.ahmed.muddebihal@linux.intel.com"
<basheer.ahmed.muddebihal@linux.intel.com>,
"matthew.gerlach@linux.intel.com"
<matthew.gerlach@linux.intel.com>
Subject: Re: [PATCH v4 15/19] fpga: dfl: convert is_feature_dev_detected() to use FIU type
Date: Mon, 18 Nov 2024 23:00:28 +0000 [thread overview]
Message-ID: <bad311610de9738e88982fabc46c04b15cdc3650.camel@intel.com> (raw)
In-Reply-To: <ZztQAsDCyRqGm6UW@yilunxu-OptiPlex-7050>
On Mon, 2024-11-18 at 22:32 +0800, Xu Yilun wrote:
> On Fri, Oct 25, 2024 at 06:37:10PM -0400, Peter Colberg wrote:
> > Use binfo->type instead of binfo->feature_dev to decide whether a
> > feature device was detected during feature parsing. A subsequent
> > commit will delay the allocation of the feature platform device
> > to feature_dev_register() and remove binfo->feature_dev.
> >
> > This commit does not introduce any functional changes.
> >
> > 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 | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/fpga/dfl.c b/drivers/fpga/dfl.c
> > index 758673b0290a..a9ec37278b2d 100644
> > --- a/drivers/fpga/dfl.c
> > +++ b/drivers/fpga/dfl.c
> > @@ -1248,7 +1248,7 @@ static int parse_feature_port_afu(struct build_feature_devs_info *binfo,
> > return create_feature_instance(binfo, ofst, size, FEATURE_ID_AFU);
> > }
> >
> > -#define is_feature_dev_detected(binfo) (!!(binfo)->feature_dev)
> > +#define is_feature_dev_detected(binfo) ((binfo)->type != DFL_ID_MAX)
>
> I still doesn't get why put the change here. How it resolves my concern
> compared to v3?
Could you elaborate on your concern? I moved this change into a
separate commit so that it is not lost in other changes, but I don't
see how the two definitions would not be functionally equivalent. Would
it help to extend the commit description along the following lines?
1. Before this series, binfo->feature_dev was initialized to NULL by
devm_kzalloc() in dfl_fpga_feature_devs_enumerate(). After this
series, binfo->type is initialized to DFL_ID_MAX in
dfl_fpga_feature_devs_enumerate().
2. Before this series, binfo->feature_dev was set to a non-NULL
pointer in build_info_create_dev(), which in turn was called from
parse_feature_fiu(). After this series, binfo->type is set to a
non-DFL_ID_MAX value, as returned by dfh_id_to_type(), in
parse_feature_fiu().
3. Before this series, binfo->feature_dev was reset to NULL at the
end of build_info_commit_dev(). After this series, binfo->type is
reset to DFL_ID_MAX at the end of build_info_commit_dev().
Thanks,
Peter
>
> Thanks,
> Yilun
>
> >
> > static int parse_feature_afu(struct build_feature_devs_info *binfo,
> > resource_size_t ofst)
> > --
> > 2.47.0
> >
> >
next prev parent reply other threads:[~2024-11-18 23:01 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 22:36 [PATCH v4 00/19] fpga: dfl: fix kernel warning on port release/assign for SRIOV Peter Colberg
2024-10-25 22:36 ` [PATCH v4 01/19] fpga: dfl: omit unneeded argument pdata from dfl_feature_instance_init() Peter Colberg
2024-10-25 22:36 ` [PATCH v4 02/19] fpga: dfl: return platform data from dfl_fpga_inode_to_feature_dev_data() Peter Colberg
2024-10-25 22:36 ` [PATCH v4 03/19] fpga: dfl: afu: use parent device to log errors on port enable/disable Peter Colberg
2024-10-25 22:36 ` [PATCH v4 04/19] fpga: dfl: afu: define local pointer to feature device Peter Colberg
2024-10-25 22:37 ` [PATCH v4 05/19] fpga: dfl: pass feature platform data instead of device as argument Peter Colberg
2024-10-25 22:37 ` [PATCH v4 06/19] fpga: dfl: factor out feature data creation from build_info_commit_dev() Peter Colberg
2024-10-25 22:37 ` [PATCH v4 07/19] fpga: dfl: store FIU type in feature platform data Peter Colberg
2024-10-25 22:37 ` [PATCH v4 08/19] fpga: dfl: refactor internal DFL APIs to take/return feature device data Peter Colberg
2024-10-25 22:37 ` [PATCH v4 09/19] fpga: dfl: factor out feature device registration Peter Colberg
2024-10-25 22:37 ` [PATCH v4 10/19] fpga: dfl: factor out feature device data from platform device data Peter Colberg
2024-10-25 22:37 ` [PATCH v4 11/19] fpga: dfl: convert features from flexible array member to separate array Peter Colberg
2024-10-25 22:37 ` [PATCH v4 12/19] fpga: dfl: store MMIO resources in feature device data Peter Colberg
2024-10-25 22:37 ` [PATCH v4 13/19] fpga: dfl: store platform device name " Peter Colberg
2024-10-25 22:37 ` [PATCH v4 14/19] fpga: dfl: store platform device id " Peter Colberg
2024-11-18 14:34 ` Xu Yilun
2024-11-19 23:34 ` Colberg, Peter
2024-10-25 22:37 ` [PATCH v4 15/19] fpga: dfl: convert is_feature_dev_detected() to use FIU type Peter Colberg
2024-11-18 14:32 ` Xu Yilun
2024-11-18 23:00 ` Colberg, Peter [this message]
2024-11-19 1:19 ` Xu Yilun
2024-11-19 23:37 ` Colberg, Peter
2024-10-25 22:37 ` [PATCH v4 16/19] fpga: dfl: allocate platform device after feature device data Peter Colberg
2024-11-18 14:51 ` Xu Yilun
2024-11-18 23:04 ` Colberg, Peter
2024-11-19 23:39 ` Colberg, Peter
2024-10-25 22:37 ` [PATCH v4 17/19] fpga: dfl: remove unneeded function build_info_create_dev() Peter Colberg
2024-11-18 14:58 ` Xu Yilun
2024-11-19 23:40 ` Colberg, Peter
2024-10-25 22:37 ` [PATCH v4 18/19] fpga: dfl: drop unneeded get_device() and put_device() of feature device Peter Colberg
2024-11-18 15:01 ` Xu Yilun
2024-10-25 22:37 ` [PATCH v4 19/19] fpga: dfl: destroy/recreate feature platform device on port release/assign Peter Colberg
2024-11-18 15:09 ` Xu Yilun
2024-11-19 23:46 ` Colberg, Peter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bad311610de9738e88982fabc46c04b15cdc3650.camel@intel.com \
--to=peter.colberg@intel.com \
--cc=basheer.ahmed.muddebihal@linux.intel.com \
--cc=hao.wu@intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marpagan@redhat.com \
--cc=matthew.gerlach@linux.intel.com \
--cc=mdf@kernel.org \
--cc=russ.weight@linux.dev \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
--cc=yilun.xu@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).