Thread (12 messages) 12 messages, 5 authors, 2021-09-14

Re: [PATCH V3 net-next 2/4] ethtool: extend coalesce setting uAPI with CQE mode

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-09-14 17:47:46
Also in: linux-wireless

On Tue, 14 Sep 2021 20:31:29 +0300 Julian Wiedmann wrote:
quoted
-	if (!dev->ethtool_ops->set_coalesce)
+	if (!dev->ethtool_ops->set_coalesce && !dev->ethtool_ops->get_coalesce)
 		return -EOPNOTSUPP;
   
This needs to be

	if (!set_coalesce || !get_coalesce)
		return -EOPNOTSUPP;

Otherwise you end up calling a NULL pointer below if just _one_ of the
callbacks is available.
Good catch, care to send a fix?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help