Thread (79 messages) 79 messages, 7 authors, 2023-06-13

RE: [RFC PATCH v7 2/8] dpll: Add DPLL framework base functions

flat view

From: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@intel.com>
Date: 2023-06-06 18:50:37
Also in: linux-arm-kernel, linux-clk

From: Jiri Pirko <jiri@resnulli.us>
Sent: Wednesday, May 3, 2023 10:09 AM

Fri, Apr 28, 2023 at 02:20:03AM CEST, vadfed@meta.com wrote:
quoted
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
[...]

quoted
+static struct dpll_pin *
+dpll_pin_alloc(u64 clock_id, u8 pin_idx, struct module *module,
+	       const struct dpll_pin_properties *prop)
+{
+	struct dpll_pin *pin;
+	int ret, fs_size;
+
+	pin = kzalloc(sizeof(*pin), GFP_KERNEL);
+	if (!pin)
+		return ERR_PTR(-ENOMEM);
+	pin->pin_idx = pin_idx;
+	pin->clock_id = clock_id;
+	pin->module = module;
+	refcount_set(&pin->refcount, 1);
+	if (WARN_ON(!prop->label)) {
Why exactly label has to be mandatory? In mlx5, I have no use for it.
Please make it optional. IIRC, I asked for this in the last review
as well.
Fixed.
quoted
+		ret = -EINVAL;
+		goto err;
+	}
+	pin->prop.label = kstrdup(prop->label, GFP_KERNEL);
Labels should be static const string. Do you see a usecase when you need
to dup it? If not, remove this please.
Fixed.

Thank you,
Arkadiusz
quoted
+	if (!pin->prop.label) {
+		ret = -ENOMEM;
+		goto err;
+	}

[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help