From: Russ Weight <russell.h.weight@intel.com>
To: Xu Yilun <yilun.xu@intel.com>
Cc: mdf@kernel.org, linux-fpga@vger.kernel.org, trix@redhat.com,
lgoncalv@redhat.com, hao.wu@intel.com, matthew.gerlach@intel.com,
richard.gong@intel.com
Subject: Re: [PATCH v6 1/3] fpga: mgr: Use standard dev_release for class driver
Date: Tue, 22 Jun 2021 15:41:56 -0700 [thread overview]
Message-ID: <aaf09ea9-6ae3-c055-1f1d-060883c6682a@intel.com> (raw)
In-Reply-To: <20210622084515.GB29169@yilunxu-OptiPlex-7050>
On 6/22/21 1:45 AM, Xu Yilun wrote:
> Some more comments.
>
> On Mon, Jun 21, 2021 at 03:22:47PM -0700, Russ Weight wrote:
>> +struct fpga_manager *
>> +fpga_mgr_register(struct device *parent, struct fpga_manager_info *info)
>> {
>> + const struct fpga_manager_ops *mops = info->mops;
>> struct fpga_manager *mgr;
>> int id, ret;
>>
>> @@ -572,29 +570,31 @@ struct fpga_manager *fpga_mgr_create(struct device *parent, const char *name,
> Shall we add the check?
It's already there in the line before the context that is shown.
>
> if (!mops || ...)
>
>> !mops->write_init || (!mops->write && !mops->write_sg) ||
>> (mops->write && mops->write_sg)) {
>> dev_err(parent, "Attempt to register without fpga_manager_ops\n");
>> - return NULL;
>> + return ERR_PTR(-EINVAL);
>> }
>>
>>
> [...]
>
>> +struct fpga_manager *
>> +fpga_mgr_register(struct device *dev, struct fpga_manager_info *info);
> struct device *parent, const struct fpga_manager_info
Yes - I'll fix all of the prototypes.
Thanks,
- Russ
>
>>
>> -int devm_fpga_mgr_register(struct device *dev, struct fpga_manager *mgr);
>> +struct fpga_manager *
>> +fpga_mgr_register_simple(struct device *dev, const char *name,
> struct device *parent,
>
>> + const struct fpga_manager_ops *mops, void *priv);
>> +void fpga_mgr_unregister(struct fpga_manager *mgr);
>>
>> -struct fpga_manager *devm_fpga_mgr_create(struct device *dev, const char *name,
>> - const struct fpga_manager_ops *mops,
>> - void *priv);
>> +struct fpga_manager *
>> +devm_fpga_mgr_register(struct device *dev, struct fpga_manager_info *info);
>
> struct device *parent, const struct fpga_manager_info
>
>> +struct fpga_manager *
>> +devm_fpga_mgr_register_simple(struct device *dev, const char *name,
> struct device *parent,
>
>> + const struct fpga_manager_ops *mops, void *priv);
>>
>> #endif /*_LINUX_FPGA_MGR_H */
>> --
>> 2.25.1
next prev parent reply other threads:[~2021-06-22 22:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 22:22 [PATCH v6 0/3] fpga: Use standard class dev_release function Russ Weight
2021-06-21 22:22 ` [PATCH v6 1/3] fpga: mgr: Use standard dev_release for class driver Russ Weight
2021-06-22 7:32 ` Xu Yilun
2021-06-22 22:32 ` Russ Weight
2021-06-22 8:45 ` Xu Yilun
2021-06-22 22:41 ` Russ Weight [this message]
2021-06-21 22:22 ` [PATCH v6 2/3] fpga: bridge: " Russ Weight
2021-06-22 8:02 ` Xu Yilun
2021-06-22 23:04 ` Russ Weight
2021-06-22 8:23 ` Xu Yilun
2021-06-22 23:05 ` Russ Weight
2021-06-21 22:22 ` [PATCH v6 3/3] fpga: region: " Russ Weight
2021-06-22 8:19 ` Xu Yilun
2021-06-22 23:08 ` Russ Weight
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=aaf09ea9-6ae3-c055-1f1d-060883c6682a@intel.com \
--to=russell.h.weight@intel.com \
--cc=hao.wu@intel.com \
--cc=lgoncalv@redhat.com \
--cc=linux-fpga@vger.kernel.org \
--cc=matthew.gerlach@intel.com \
--cc=mdf@kernel.org \
--cc=richard.gong@intel.com \
--cc=trix@redhat.com \
--cc=yilun.xu@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).