Thread (4 messages) 4 messages, 2 authors, 2021-11-20

Re: [PATCH V2 net-next 1/2] net: wwan: common debugfs base dir for wwan device

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-11-20 04:20:12

On Fri, 19 Nov 2021 15:37:19 +0530 M Chetan Kumar wrote:
+struct dentry *wwan_get_debugfs_dir(struct device *parent)
+{
+	struct wwan_device *wwandev;
+
+	if (WARN_ON(!parent))
+		return ERR_PTR(-EINVAL);
defensive programming, please drop this check
+	wwandev = wwan_dev_get_by_parent(parent);
+
please drop empty lines before calls and error checks
+	if (IS_ERR(wwandev))
+		return ERR_CAST(wwandev);
+
+	return wwandev->debugfs_dir;
+}
+EXPORT_SYMBOL_GPL(wwan_get_debugfs_dir);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help