Thread (73 messages) 73 messages, 8 authors, 2023-07-17

RE: [RFC PATCH v8 03/10] dpll: core: Add DPLL framework base functions

From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@intel.com>
Date: 2023-06-21 20:39:10
Also in: intel-wired-lan, linux-clk, linux-doc, linux-rdma, lkml

From: Paolo Abeni <pabeni@redhat.com>
Sent: Monday, June 12, 2023 9:25 AM

On Sun, 2023-06-11 at 11:36 +0200, Jiri Pirko wrote:
quoted
Fri, Jun 09, 2023 at 02:18:46PM CEST, arkadiusz.kubalewski@intel.com
wrote:
quoted
quoted
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
[...]
quoted
+int dpll_device_register(struct dpll_device *dpll, enum dpll_type
type,
quoted
quoted
+			 const struct dpll_device_ops *ops, void *priv)
+{
+	struct dpll_device_registration *reg;
+	bool first_registration = false;
+
+	if (WARN_ON(!ops))
+		return -EINVAL;
+	if (WARN_ON(type < DPLL_TYPE_PPS || type > DPLL_TYPE_MAX))
+		return -EINVAL;
+
+	mutex_lock(&dpll_lock);
+	reg = dpll_device_registration_find(dpll, ops, priv);
+	if (reg) {
+		mutex_unlock(&dpll_lock);
+		return -EEXIST;
+	}
+
+	reg = kzalloc(sizeof(*reg), GFP_KERNEL);
+	if (!reg) {
+		mutex_unlock(&dpll_lock);
+		return -EEXIST;
+	}
+	reg->ops = ops;
+	reg->priv = priv;
+	dpll->type = type;
+	first_registration = list_empty(&dpll->registration_list);
+	list_add_tail(&reg->list, &dpll->registration_list);
+	if (!first_registration) {
+		mutex_unlock(&dpll_lock);
+		return 0;
+	}
+
+	xa_set_mark(&dpll_device_xa, dpll->id, DPLL_REGISTERED);
+	mutex_unlock(&dpll_lock);
+	dpll_device_create_ntf(dpll);
This function is introduced in the next patch. Breaks bissection. Make
sure you can compile the code after every patch applied.
WRT, I think the easiest way to solve the above is adding the function
call in the next patch.

Cheers,

Paolo
Sure, will try to fix as suggested, but this will be much easier to do on
final version of patches before sending.

Thank you,
Arkadiusz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help