From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8E3CC77B62 for ; Wed, 22 Mar 2023 17:03:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231270AbjCVRDE convert rfc822-to-8bit (ORCPT ); Wed, 22 Mar 2023 13:03:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230389AbjCVRCz (ORCPT ); Wed, 22 Mar 2023 13:02:55 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 119B065056 for ; Wed, 22 Mar 2023 10:02:33 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id D421F6431C2E; Wed, 22 Mar 2023 18:02:11 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5O8DagyRu-Wg; Wed, 22 Mar 2023 18:02:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 3A19E61989EA; Wed, 22 Mar 2023 18:02:11 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YVeIiaZh7mZI; Wed, 22 Mar 2023 18:02:11 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 1710761989E6; Wed, 22 Mar 2023 18:02:11 +0100 (CET) Date: Wed, 22 Mar 2023 18:02:10 +0100 (CET) From: Richard Weinberger To: Yangtao Li Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Damien Le Moal , linux-mtd , linux-kernel Message-ID: <462173384.277322.1679504530972.JavaMail.zimbra@nod.at> In-Reply-To: <20230322165905.55389-4-frank.li@vivo.com> References: <20230322165905.55389-1-frank.li@vivo.com> <20230322165905.55389-4-frank.li@vivo.com> Subject: Re: [PATCH v3 05/10] ubifs: convert to kobject_del_and_put() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: ubifs: convert to kobject_del_and_put() Thread-Index: gpQy2dclbZOSlO48/BHuEnRTh4PO1A== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "Yangtao Li" > An: "richard" > CC: "Yangtao Li" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" > , "Damien Le Moal" , "linux-mtd" , > "linux-kernel" > 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 > Cc: "Rafael J. Wysocki" > Cc: Damien Le Moal > Signed-off-by: Yangtao Li > --- > 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 Thanks, //richard