From: Xu Yilun <yilun.xu@intel.com>
To: Russ Weight <russell.h.weight@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 16:45:15 +0800 [thread overview]
Message-ID: <20210622084515.GB29169@yilunxu-OptiPlex-7050> (raw)
In-Reply-To: <20210621222249.451387-2-russell.h.weight@intel.com>
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?
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
>
> -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 8:51 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 [this message]
2021-06-22 22:41 ` Russ Weight
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=20210622084515.GB29169@yilunxu-OptiPlex-7050 \
--to=yilun.xu@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=russell.h.weight@intel.com \
--cc=trix@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.