Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp294445imw; Mon, 4 Jul 2022 09:17:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v2ZynDKAv2vIBSMjovLsD/g+B9gNF3c/u6o+7xbt/92q+Q8LyJFfTcb/ryLzaEQLhzzDqO X-Received: by 2002:a17:902:e749:b0:16a:2839:9e5 with SMTP id p9-20020a170902e74900b0016a283909e5mr37001735plf.48.1656951471900; Mon, 04 Jul 2022 09:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656951471; cv=none; d=google.com; s=arc-20160816; b=y8Fwq4L5fN6hihU3j4y2WTknxt0rl2AmBAxZBWkHdXpxcErLixizbhQGOaHQuB6QjD zwZaQspXBI640/aF7ro5FbeiVNKUsoet+EQBvZSUOtFyUrqdF6pjXnXBbUx/oymedRMA 6Ix83oyYm4vnhZbXm1dPiwwTu6Qd0HWy1hbKHsZwF951h5mf0eEXCdJYpwzYlGgtBboI zF+TrpkwilVT9crTR34oJicgIAig/jjDgpC945MxGQlegsr94zh6Jag0Cf2MxSGUpLMs H7bMrJTjN4jeP500cgeaFk2dBLfkFurg2Lyox/0hN/BZEmKDGSoNVYYV0s7a6t04By5M m1HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XDA4n4pd6Xr6uNl0td9jaJ4MaM27xHkGgXf/i16iqvU=; b=NAtC2BKepqOCgtucHgEW8n2+dQ7d9jBMIrFrhXd2sp5krmI/Xj0etjwx1t+6q0SYmk yhhmmb/edSejxCOX3HQoHN8dwliBk0Ve9kX8mKgRZ/I6t53YS6/ILHRHTIIfmRIoOWpi M6wsFqIglJ41P85GRcjIz2wtKHVHRWqBcF3itK49o1Uw7S+e95HKDIRRAlnp80QilxpJ 5kxNAIfbELUeOPLS0WrHHo7iya8Y5Jw7/vTdVcdGF5byr3NpifIfAVGmotRJmMHtnI6U DWNHcatPhLGUL7mQshFqe0Fk8Kw/aKDwl3cnA1YT55+MhuJzAasBkq3dToI6wasYC3X7 C73g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ny57otLL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a63d006000000b004088af884f4si38606404pgf.246.2022.07.04.09.17.39; Mon, 04 Jul 2022 09:17:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ny57otLL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234460AbiGDQNr (ORCPT + 99 others); Mon, 4 Jul 2022 12:13:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231276AbiGDQNp (ORCPT ); Mon, 4 Jul 2022 12:13:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9360C4A for ; Mon, 4 Jul 2022 09:13:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 45B2361166 for ; Mon, 4 Jul 2022 16:13:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24786C3411E; Mon, 4 Jul 2022 16:13:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656951223; bh=RA5+nJVfyyxORQFFFt6cc+rkcFqdB9b06K8VFwbLg4U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ny57otLLk69XK/SfQxDvP6w01zcE3ARJvIfVOjz65diQmAEvDlapBV+QpEHmBeIiQ dJ0Vp3b0yjMwrT/Q2kW32vjEDrYvvRi14g4hgM5EVw/37qOpw/exH+DDIftoV1lXpI G4BmSjVFYpMeoR6kdarV2Xx9JXg8TvsS2GGtnDKE= Date: Mon, 4 Jul 2022 18:13:40 +0200 From: Greg Kroah-Hartman To: Carlos Llamas Cc: Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Christian Brauner , Joel Fernandes , Hridya Valsaraju , Suren Baghdasaryan , kernel-team@android.com, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH] binder: fix redefinition of seq_file attributes Message-ID: References: <20220701182041.2134313-1-cmllamas@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220701182041.2134313-1-cmllamas@google.com> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 01, 2022 at 06:20:41PM +0000, Carlos Llamas wrote: > + binder_for_each_debugfs_entry(db_entry) { > + dentry = binderfs_create_file(binder_logs_root_dir, > + db_entry->name, > + db_entry->fops, > + db_entry->data); > + if (IS_ERR(dentry)) { > + ret = PTR_ERR(dentry); > + goto out; > + } I know this is a copy of what is there already, but there is never a need to check the result of a debugfs_create_* call. Just call it and move on, never "abort" based on the result of a debugfs call, that's not a good idea. So can you change this here, or want to send a follow-on patch that removes these checks? > } > > proc_log_dir = binderfs_create_dir(binder_logs_root_dir, "proc"); Also there's never a need to save a directory, you can always look it up when you want to remove it. thanks, greg k-h