From: Jiri Pirko <jiri@resnulli.us>
To: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Cc: kuba@kernel.org, vadfed@meta.com, jonathan.lemon@gmail.com,
pabeni@redhat.com, corbet@lwn.net, davem@davemloft.net,
edumazet@google.com, vadfed@fb.com, jesse.brandeburg@intel.com,
anthony.l.nguyen@intel.com, saeedm@nvidia.com, leon@kernel.org,
richardcochran@gmail.com, sj@kernel.org, javierm@redhat.com,
ricardo.canuelo@collabora.com, mst@redhat.com,
tzimmermann@suse.de, michal.michalik@intel.com,
gregkh@linuxfoundation.org, jacek.lawrynowicz@linux.intel.com,
airlied@redhat.com, ogabbay@kernel.org, arnd@arndb.de,
nipun.gupta@amd.com, axboe@kernel.dk, linux@zary.sk,
masahiroy@kernel.org, benjamin.tissoires@redhat.com,
geert+renesas@glider.be, milena.olech@intel.com,
kuniyu@amazon.com, liuhangbin@gmail.com, hkallweit1@gmail.com,
andy.ren@getcruise.com, razor@blackwall.org, idosch@nvidia.com,
lucien.xin@gmail.com, nicolas.dichtel@6wind.com, phil@nwl.cc,
claudiajkang@gmail.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, poros@redhat.com,
mschmidt@redhat.com, linux-clk@vger.kernel.org,
vadim.fedorenko@linux.dev
Subject: Re: [RFC PATCH v8 03/10] dpll: core: Add DPLL framework base functions
Date: Sun, 11 Jun 2023 12:01:12 +0200 [thread overview]
Message-ID: <ZIWbaLd87EMbkDAY@nanopsycho> (raw)
In-Reply-To: <20230609121853.3607724-4-arkadiusz.kubalewski@intel.com>
Fri, Jun 09, 2023 at 02:18:46PM CEST, arkadiusz.kubalewski@intel.com wrote:
>From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
[...]
>+ * dpll_xa_ref_dpll_first - find first record of given xarray
>+ * @xa_refs: xarray
>+ *
>+ * Context: shall be called under a lock (dpll_lock)
>+ * Return: first element on given xaaray
typo: xarray
>+ */
>+struct dpll_pin_ref *dpll_xa_ref_dpll_first(struct xarray *xa_refs)
[...]
>+/**
>+ * dpll_device_get - find existing or create new dpll device
>+ * @clock_id: clock_id of creator
>+ * @device_idx: idx given by device driver
>+ * @module: reference to registering module
>+ *
>+ * Get existing object of a dpll device, unique for given arguments.
>+ * Create new if doesn't exist yet.
>+ *
>+ * Context: Acquires a lock (dpll_lock)
>+ * Return:
>+ * * valid dpll_device struct pointer if succeeded
>+ * * ERR_PTR(-ENOMEM) - failed memory allocation
Yeah, that is kind of obvious, isn't? Really, drop this pointless
coments.
>+ * * ERR_PTR(X) - failed allocation on dpll's xa
>+ */
>+struct dpll_device *
>+dpll_device_get(u64 clock_id, u32 device_idx, struct module *module)
[...]
>+/**
>+ * dpll_pin_register - register the dpll pin in the subsystem
>+ * @dpll: pointer to a dpll
>+ * @pin: pointer to a dpll pin
>+ * @ops: ops for a dpll pin ops
>+ * @priv: pointer to private information of owner
>+ *
>+ * Context: Acquires a lock (dpll_lock)
>+ * Return:
>+ * * 0 on success
>+ * * -EINVAL - missing pin ops
>+ * * -ENOMEM - failed to allocate memory
Does not make sense to assign one errno to one specific error.
Avoid tables like this.
>+ */
>+int
>+dpll_pin_register(struct dpll_device *dpll, struct dpll_pin *pin,
>+ const struct dpll_pin_ops *ops, void *priv)
>+{
>+ int ret;
>+
>+ mutex_lock(&dpll_lock);
>+ if (WARN_ON(!(dpll->module == pin->module &&
>+ dpll->clock_id == pin->clock_id)))
>+ ret = -EFAULT;
-EINVAL;
>+ else
>+ ret = __dpll_pin_register(dpll, pin, ops, priv);
>+ mutex_unlock(&dpll_lock);
>+
>+ return ret;
>+}
[...]
next prev parent reply other threads:[~2023-06-11 10:01 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 12:18 [RFC PATCH v8 00/10] Create common DPLL configuration API Arkadiusz Kubalewski
2023-06-09 12:18 ` [RFC PATCH v8 01/10] dpll: documentation on DPLL subsystem interface Arkadiusz Kubalewski
2023-06-10 3:22 ` Bagas Sanjaya
2023-06-12 14:24 ` Kubalewski, Arkadiusz
2023-06-10 16:28 ` Jiri Pirko
2023-06-12 15:24 ` Kubalewski, Arkadiusz
2023-06-12 22:30 ` Jakub Kicinski
2023-06-12 15:30 ` Bart Van Assche
2023-06-12 16:01 ` Kubalewski, Arkadiusz
2023-06-12 22:43 ` Jakub Kicinski
2023-06-13 9:55 ` Jiri Pirko
2023-06-13 16:38 ` Jakub Kicinski
2023-06-14 9:27 ` Jiri Pirko
2023-06-14 12:21 ` Kubalewski, Arkadiusz
2023-06-14 19:15 ` Jakub Kicinski
2023-06-14 19:23 ` Jakub Kicinski
2023-06-15 10:18 ` Jiri Pirko
2023-06-15 13:44 ` Kubalewski, Arkadiusz
2023-06-15 16:31 ` Jakub Kicinski
2023-06-17 10:36 ` Jiri Pirko
2023-06-12 23:49 ` Jakub Kicinski
2023-06-14 12:23 ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 02/10] dpll: spec: Add Netlink spec in YAML Arkadiusz Kubalewski
2023-06-10 16:22 ` Jiri Pirko
2023-06-15 13:42 ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 03/10] dpll: core: Add DPLL framework base functions Arkadiusz Kubalewski
2023-06-10 17:38 ` Jiri Pirko
2023-06-21 16:28 ` Kubalewski, Arkadiusz
2023-06-21 18:55 ` Kubalewski, Arkadiusz
2023-06-22 7:05 ` Jiri Pirko
2023-06-11 9:36 ` Jiri Pirko
2023-06-12 7:25 ` Paolo Abeni
2023-06-21 20:38 ` Kubalewski, Arkadiusz
2023-06-11 10:01 ` Jiri Pirko [this message]
2023-06-12 23:45 ` Jakub Kicinski
2023-06-21 21:17 ` Kubalewski, Arkadiusz
2023-06-22 7:09 ` Jiri Pirko
2023-06-09 12:18 ` [RFC PATCH v8 04/10] dpll: netlink: " Arkadiusz Kubalewski
2023-06-11 11:42 ` Jiri Pirko
2023-06-23 1:01 ` Kubalewski, Arkadiusz
2023-06-21 11:18 ` Petr Oros
2023-06-21 11:53 ` Jiri Pirko
2023-06-21 13:07 ` Jiri Pirko
2023-06-23 0:56 ` Kubalewski, Arkadiusz
2023-06-23 7:48 ` Jiri Pirko
2023-06-23 0:56 ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 05/10] dpll: api header: " Arkadiusz Kubalewski
2023-06-10 7:25 ` Jiri Pirko
2023-06-10 7:29 ` Jiri Pirko
2023-06-12 15:00 ` Vadim Fedorenko
2023-06-10 7:32 ` Jiri Pirko
2023-06-09 12:18 ` [RFC PATCH v8 06/10] netdev: expose DPLL pin handle for netdevice Arkadiusz Kubalewski
2023-06-12 9:17 ` Petr Oros
2023-06-13 13:51 ` Jiri Pirko
2023-06-14 12:25 ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 07/10] ice: add admin commands to access cgu configuration Arkadiusz Kubalewski
2023-06-10 8:46 ` Jiri Pirko
2023-06-15 21:35 ` Kubalewski, Arkadiusz
2023-06-09 12:18 ` [RFC PATCH v8 08/10] ice: implement dpll interface to control cgu Arkadiusz Kubalewski
2023-06-10 9:57 ` Jiri Pirko
2023-06-19 18:08 ` Kubalewski, Arkadiusz
2023-06-21 12:28 ` Jiri Pirko
2023-06-10 16:36 ` Jiri Pirko
2023-06-19 20:34 ` Kubalewski, Arkadiusz
2023-06-21 12:29 ` Jiri Pirko
2023-06-29 6:14 ` Jiri Pirko
2023-07-03 12:37 ` Kubalewski, Arkadiusz
2023-07-10 8:23 ` Jiri Pirko
2023-06-09 12:18 ` [RFC PATCH v8 09/10] ptp_ocp: implement DPLL ops Arkadiusz Kubalewski
2023-06-10 8:06 ` Jiri Pirko
2023-06-09 12:18 ` [RFC PATCH v8 10/10] mlx5: Implement SyncE support using DPLL infrastructure Arkadiusz Kubalewski
2023-06-09 23:27 ` [RFC PATCH v8 00/10] Create common DPLL configuration API Jakub Kicinski
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=ZIWbaLd87EMbkDAY@nanopsycho \
--to=jiri@resnulli.us \
--cc=airlied@redhat.com \
--cc=andy.ren@getcruise.com \
--cc=anthony.l.nguyen@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=benjamin.tissoires@redhat.com \
--cc=claudiajkang@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=hkallweit1@gmail.com \
--cc=idosch@nvidia.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=javierm@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=leon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux@zary.sk \
--cc=liuhangbin@gmail.com \
--cc=lucien.xin@gmail.com \
--cc=masahiroy@kernel.org \
--cc=michal.michalik@intel.com \
--cc=milena.olech@intel.com \
--cc=mschmidt@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=nipun.gupta@amd.com \
--cc=ogabbay@kernel.org \
--cc=pabeni@redhat.com \
--cc=phil@nwl.cc \
--cc=poros@redhat.com \
--cc=razor@blackwall.org \
--cc=ricardo.canuelo@collabora.com \
--cc=richardcochran@gmail.com \
--cc=saeedm@nvidia.com \
--cc=sj@kernel.org \
--cc=tzimmermann@suse.de \
--cc=vadfed@fb.com \
--cc=vadfed@meta.com \
--cc=vadim.fedorenko@linux.dev \
/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).