[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211119202007.077a1656@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 19 Nov 2021 20:20:07 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
johannes@...solutions.net, ryazanov.s.a@...il.com,
loic.poulain@...aro.org, krishna.c.sudi@...el.com,
m.chetan.kumar@...el.com, linuxwwan@...el.com
Subject: Re: [PATCH V2 net-next 1/2] net: wwan: common debugfs base dir for
wwan device
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);
Powered by blists - more mailing lists