* [PATCH v3 05/10] ubifs: convert to kobject_del_and_put()
[not found] <20230322165905.55389-1-frank.li@vivo.com>
@ 2023-03-22 16:59 ` Yangtao Li
2023-03-22 17:02 ` Richard Weinberger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yangtao Li @ 2023-03-22 16:59 UTC (permalink / raw)
To: Richard Weinberger
Cc: Yangtao Li, Greg Kroah-Hartman, Rafael J. Wysocki, Damien Le Moal,
linux-mtd, linux-kernel
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/ubifs/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
index 1c958148bb87..9571718e61a9 100644
--- a/fs/ubifs/sysfs.c
+++ b/fs/ubifs/sysfs.c
@@ -130,8 +130,7 @@ int ubifs_sysfs_register(struct ubifs_info *c)
void ubifs_sysfs_unregister(struct ubifs_info *c)
{
- kobject_del(&c->kobj);
- kobject_put(&c->kobj);
+ kobject_del_and_put(&c->kobj);
wait_for_completion(&c->kobj_unregister);
kfree(c->stats);
--
2.35.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 05/10] ubifs: convert to kobject_del_and_put()
2023-03-22 16:59 ` [PATCH v3 05/10] ubifs: convert to kobject_del_and_put() Yangtao Li
@ 2023-03-22 17:02 ` Richard Weinberger
2023-03-22 23:34 ` Damien Le Moal
2023-03-23 1:08 ` Zhihao Cheng
2 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2023-03-22 17:02 UTC (permalink / raw)
To: Yangtao Li
Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Damien Le Moal, linux-mtd,
linux-kernel
----- Ursprüngliche Mail -----
> Von: "Yangtao Li" <frank.li@vivo.com>
> An: "richard" <richard@nod.at>
> CC: "Yangtao Li" <frank.li@vivo.com>, "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, "Rafael J. Wysocki"
> <rafael@kernel.org>, "Damien Le Moal" <damien.lemoal@opensource.wdc.com>, "linux-mtd" <linux-mtd@lists.infradead.org>,
> "linux-kernel" <linux-kernel@vger.kernel.org>
> Gesendet: Mittwoch, 22. März 2023 17:59:00
> Betreff: [PATCH v3 05/10] ubifs: convert to kobject_del_and_put()
> Use kobject_del_and_put() to simplify code.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> fs/ubifs/sysfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
> index 1c958148bb87..9571718e61a9 100644
> --- a/fs/ubifs/sysfs.c
> +++ b/fs/ubifs/sysfs.c
> @@ -130,8 +130,7 @@ int ubifs_sysfs_register(struct ubifs_info *c)
>
> void ubifs_sysfs_unregister(struct ubifs_info *c)
> {
> - kobject_del(&c->kobj);
> - kobject_put(&c->kobj);
> + kobject_del_and_put(&c->kobj);
> wait_for_completion(&c->kobj_unregister);
Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 05/10] ubifs: convert to kobject_del_and_put()
2023-03-22 16:59 ` [PATCH v3 05/10] ubifs: convert to kobject_del_and_put() Yangtao Li
2023-03-22 17:02 ` Richard Weinberger
@ 2023-03-22 23:34 ` Damien Le Moal
2023-03-23 1:08 ` Zhihao Cheng
2 siblings, 0 replies; 4+ messages in thread
From: Damien Le Moal @ 2023-03-22 23:34 UTC (permalink / raw)
To: Yangtao Li, Richard Weinberger
Cc: Greg Kroah-Hartman, Rafael J. Wysocki, linux-mtd, linux-kernel
On 3/23/23 01:59, Yangtao Li wrote:
> Use kobject_del_and_put() to simplify code.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 05/10] ubifs: convert to kobject_del_and_put()
2023-03-22 16:59 ` [PATCH v3 05/10] ubifs: convert to kobject_del_and_put() Yangtao Li
2023-03-22 17:02 ` Richard Weinberger
2023-03-22 23:34 ` Damien Le Moal
@ 2023-03-23 1:08 ` Zhihao Cheng
2 siblings, 0 replies; 4+ messages in thread
From: Zhihao Cheng @ 2023-03-23 1:08 UTC (permalink / raw)
To: Yangtao Li, Richard Weinberger
Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Damien Le Moal, linux-mtd,
linux-kernel
> Use kobject_del_and_put() to simplify code.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> fs/ubifs/sysfs.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
> diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
> index 1c958148bb87..9571718e61a9 100644
> --- a/fs/ubifs/sysfs.c
> +++ b/fs/ubifs/sysfs.c
> @@ -130,8 +130,7 @@ int ubifs_sysfs_register(struct ubifs_info *c)
>
> void ubifs_sysfs_unregister(struct ubifs_info *c)
> {
> - kobject_del(&c->kobj);
> - kobject_put(&c->kobj);
> + kobject_del_and_put(&c->kobj);
> wait_for_completion(&c->kobj_unregister);
>
> kfree(c->stats);
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-23 1:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230322165905.55389-1-frank.li@vivo.com>
2023-03-22 16:59 ` [PATCH v3 05/10] ubifs: convert to kobject_del_and_put() Yangtao Li
2023-03-22 17:02 ` Richard Weinberger
2023-03-22 23:34 ` Damien Le Moal
2023-03-23 1:08 ` Zhihao Cheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox