From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: "K . Y . Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Wei Liu <wei.liu@kernel.org>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uio_hv_generic: add missed sysfs_remove_bin_file
Date: Thu, 7 May 2020 18:36:28 +0200 [thread overview]
Message-ID: <20200507163628.GB2100062@kroah.com> (raw)
In-Reply-To: <20200507151343.792816-1-hslester96@gmail.com>
On Thu, May 07, 2020 at 11:13:43PM +0800, Chuhong Yuan wrote:
> This driver calls sysfs_create_bin_file() in probe, but forgets to
> call sysfs_remove_bin_file() in remove.
> Add the missed call to fix it.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
> drivers/uio/uio_hv_generic.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c
> index 3c5169eb23f5..4dae2320b103 100644
> --- a/drivers/uio/uio_hv_generic.c
> +++ b/drivers/uio/uio_hv_generic.c
> @@ -361,6 +361,7 @@ hv_uio_remove(struct hv_device *dev)
> if (!pdata)
> return 0;
>
> + sysfs_remove_bin_file(&dev->channel->kobj, &ring_buffer_bin_attr);
> uio_unregister_device(&pdata->info);
> hv_uio_cleanup(dev, pdata);
> hv_set_drvdata(dev, NULL);
I'll take this, but it's not always needed as all sysfs files are
removed from the device when it is removed from sysfs anyway. So this
shouldn't be an issue in a real system.
thanks,
greg k-h
prev parent reply other threads:[~2020-05-07 16:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 15:13 [PATCH] uio_hv_generic: add missed sysfs_remove_bin_file Chuhong Yuan
2020-05-07 16:36 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200507163628.GB2100062@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=hslester96@gmail.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sthemmin@microsoft.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).