Thread (19 messages) 19 messages, 3 authors, 4d ago

Re: [PATCH net-next v3 12/15] devlink: give user option to allocate resources

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-10-21 03:20:41

On Thu, 15 Oct 2026 20:51:23 +0200 Przemek Kitszel wrote:
quoted hunk ↗ jump to hunk
+	if (resource->occ_get &&
+	    devlink_nl_put_u64(skb, DEVLINK_ATTR_RESOURCE_OCC,
+			       resource->occ_get(resource->occ_priv)))
+		goto err;
+
+	return 0;
+err:
+	return -EMSGSIZE;
Why the goto? It's pretty idiomatic to return EMSGSIZE in place
for put failures
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help