From: Fabio M. De Francesco Date: Thu, 31 Mar 2022 06:47:51 +0000 (+0200) Subject: staging: unisys: Remove "struct dentry *eth_debugfs_dir" X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=acc24ef13ebdb893b2c348cbbaf508f96b1b40ca;p=linux.git staging: unisys: Remove "struct dentry *eth_debugfs_dir" There is no need for "struct dentry *eth_debugfs_dir" which is used for debug / sysfs directories. Therefore, remove this "struct dentry" and everything related (i.e., creation and removal). As a side effect of this change, the code has no more need of the "cleanup_register_netdev" label, which can also be removed. Suggested-by: Dan Carpenter Suggested-by: Greg Kroah-Hartman Reviewed-by: Dan Carpenter Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20220331064751.29634-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 643432458105e..bb7ec492503e1 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -103,7 +103,6 @@ struct chanstat { * @server_down: IOPART is down. * @server_change_state: Processing SERVER_CHANGESTATE msg. * @going_away: device is being torn down. - * @struct *eth_debugfs_dir: * @interrupts_rcvd: * @interrupts_notme: * @interrupts_disabled: @@ -157,7 +156,6 @@ struct visornic_devdata { bool server_down; bool server_change_state; bool going_away; - struct dentry *eth_debugfs_dir; u64 interrupts_rcvd; u64 interrupts_notme; u64 interrupts_disabled; @@ -1919,24 +1917,10 @@ static int visornic_probe(struct visor_device *dev) goto cleanup_napi_add; } - /* create debug/sysfs directories */ - devdata->eth_debugfs_dir = debugfs_create_dir(netdev->name, - visornic_debugfs_dir); - if (!devdata->eth_debugfs_dir) { - dev_err(&dev->device, - "%s debugfs_create_dir %s failed\n", - __func__, netdev->name); - err = -ENOMEM; - goto cleanup_register_netdev; - } - dev_info(&dev->device, "%s success netdev=%s\n", __func__, netdev->name); return 0; -cleanup_register_netdev: - unregister_netdev(netdev); - cleanup_napi_add: visorbus_disable_channel_interrupts(dev); netif_napi_del(&devdata->napi); @@ -2002,7 +1986,6 @@ static void visornic_remove(struct visor_device *dev) /* going_away prevents new items being added to the workqueues */ cancel_work_sync(&devdata->timeout_reset); - debugfs_remove_recursive(devdata->eth_debugfs_dir); /* this will call visornic_close() */ unregister_netdev(netdev);