Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1235191pxf; Fri, 26 Mar 2021 04:06:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxTqTrHaefrkEzW4qfeFW5wPdUPtPp7o1kJSvqgzKczw2fHaQadbDNIuzdg+RVySD8EfpQ X-Received: by 2002:a17:906:4d44:: with SMTP id b4mr14607838ejv.338.1616756816778; Fri, 26 Mar 2021 04:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616756816; cv=none; d=google.com; s=arc-20160816; b=QPgFJKJSw19rR0TDLt78m6mNrQTTDcq+6J3wrHkxJ6n6vdO5em/5mJCOWeheXLtduy GPhEAZWH28gWqp3F2v9aIEy6xhPW/0rQfZjhJGNl1TqrNvltIUR57x1VYqKz2zAjiVpj xUVNmglsPndKJxzW/R5B21BjAd5Jb3TFNiEZ8sTG3EEAs2GlcOAcBADRdyorNpuvy0gk 1waeFjm9BtzVIOmRebY1N3DSSCTVARICdrtSxSuYrR12cuphLm6bkUqY82uAJzVkGAVN bPn5kKaDbCjszfYAWnrs00YM45h/ig3x9FKRJ1PLoJJLn1I3MtrM2rONc7CkUTnIQgH8 z6Tw== 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 :dkim-signature; bh=SzmHP+8GotsLvUQDWZjMNH1e8VZPgDxQwrOVdSufO3A=; b=U98kQBiSi5zM7lnUS7PR1WK9qI7J+91mT0WtuC0i2nZf7Ng9hCOZMQMpSTZzG5GzJp idDwxB0CiJYOCMxa7On6+NwDrWd6lPAOEO4XTPpI3uE82wm45KxJGNBvu+ZVqO2rBZv0 9qXMTkg1xhTENnQBI61JwH+NHhtEp3F5GQPLznieTyb0oeETT9Ksc6pSoCo8dLWj25cv qGpokXHB2F/371yue5Uovd/KdO/j7ALbrUnZxAU/0ibscW6GDNuBX+rfyLwgXSFliera PRtFakZfCi6czr7jOUi862xG8Hr1Zke4Jlam9bm7fx287zABymhq2Soy3odTp/VUFVdL rmag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b=lCslRNpl; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=S35IoNPQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr7si6899921ejc.596.2021.03.26.04.06.33; Fri, 26 Mar 2021 04:06:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kroah.com header.s=fm3 header.b=lCslRNpl; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=S35IoNPQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbhCZLF3 (ORCPT + 99 others); Fri, 26 Mar 2021 07:05:29 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:52699 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229913AbhCZLFL (ORCPT ); Fri, 26 Mar 2021 07:05:11 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 02718580AD5; Fri, 26 Mar 2021 07:05:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 26 Mar 2021 07:05:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=SzmHP+8GotsLvUQDWZjMNH1e8VZ PgDxQwrOVdSufO3A=; b=lCslRNplGihx0LQgcWlEJNZoZ3BTOMVBuC76O8dktD8 sWnV56PT4t0u/M914mJcUNLP2X/B8LMr5jj1jnrjFMd7H+NcqXt8O9JI1MSzSHas PHIWw5OHR68vY4edhx5RVJgBUQKy+anlZOoeaNgZ0uM8l024oaMhwZIWAzAVor+R NUm9N7KMx8qnDVehz56U5ea1+efJLMI9sfORmSdBz4URpL/rPRmykPfUblLWTPcU hFvLAJfgikqz3gVVaIqs3+5R56wenxN9uq6M1ylX8kp+w7fLkZB1MnrFPSqdRIRb 9N7aXDcEw99mylNRBm7eES7pqtKouYTGhgCj6KBDd+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=SzmHP+ 8GotsLvUQDWZjMNH1e8VZPgDxQwrOVdSufO3A=; b=S35IoNPQ7hNaPZYIKN6hwZ JgUpsGQOWvPn1/l7IEjWoGc8bJjCJkeo3BpmPMRrDtddTyQ4AMaKY3SVuautAt1z XpZHevYJlYFMR31yuZ0RUzfhfjnTUzG26cxuzTH5CveFD7SrOOGdkD3r7LAk6nIX AzCWANJ2AqSEDrGmFVMVMYJ+rU8fdaWHcaRI9Rw1cTk+t0eu5ZEFnW5IUYQHDXPo Cvl7JqcfNXaPD0OdYDHVAesKaNXnRz8DhLapcMPRtr4z+nv7mfdWRxz/HwVhk9cG nlUrPcjHUtqmPExf6msiuBuLjAxFtriuZE9SlLxSiGCmPMC2wngsVEAVG61KbJQw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudehvddgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucfkphepkeef rdekiedrjeegrdeigeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 20212240069; Fri, 26 Mar 2021 07:05:09 -0400 (EDT) Date: Fri, 26 Mar 2021 12:05:07 +0100 From: Greg KH To: Peter Zijlstra Cc: mingo@kernel.org, mgorman@suse.de, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, joshdon@google.com, valentin.schneider@arm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/9] debugfs: Implement debugfs_create_str() Message-ID: References: <20210326103352.603456266@infradead.org> <20210326103935.183934395@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210326103935.183934395@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 11:33:58AM +0100, Peter Zijlstra wrote: > > Signed-off-by: Peter Zijlstra (Intel) No changelog text? :( > +/** > + * debugfs_create_str - create a debugfs file that is used to read and write a string value > + * @name: a pointer to a string containing the name of the file to create. > + * @mode: the permission that the file should have > + * @parent: a pointer to the parent dentry for this file. This should be a > + * directory dentry if set. If this parameter is %NULL, then the > + * file will be created in the root of the debugfs filesystem. > + * @value: a pointer to the variable that the file should read to and write > + * from. > + * > + * This function creates a file in debugfs with the given name that > + * contains the value of the variable @value. If the @mode variable is so > + * set, it can be read from, and written to. > + * > + * This function will return a pointer to a dentry if it succeeds. This > + * pointer must be passed to the debugfs_remove() function when the file is > + * to be removed (no automatic cleanup happens if your module is unloaded, > + * you are responsible here.) If an error occurs, ERR_PTR(-ERROR) will be > + * returned. > + * > + * NOTE: when writing is enabled it will replace the string, string lifetime is > + * assumed to be RCU managed. > + * > + * If debugfs is not enabled in the kernel, the value ERR_PTR(-ENODEV) will > + * be returned. > + */ > +struct dentry *debugfs_create_str(const char *name, umode_t mode, > + struct dentry *parent, char **value) Please have this return void, no need for me to have to clean up afterward later on :) thanks, greg k-h