From: Matthew Wilcox Date: Sun, 04 Oct 2020 01:36:26 +0000 Subject: Re: Where is the declaration of buffer used in kernel_param_ops .get functions? Message-Id: <20201004013626.GE20115@casper.infradead.org> List-Id: References: <250919192de237dadf36218ee6b4dabf1bd4cbde.camel@perches.com> In-Reply-To: <250919192de237dadf36218ee6b4dabf1bd4cbde.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Joe Perches Cc: Greg KH , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, rcu@vger.kernel.org, linux-mm@kvack.org On Sat, Oct 03, 2020 at 06:19:18PM -0700, Joe Perches wrote: > These patches came up because I was looking for > the location of the declaration of the buffer used > in kernel/params.c struct kernel_param_ops .get > functions. > > I didn't find it. > > I want to see if it's appropriate to convert the > sprintf family of functions used in these .get > functions to sysfs_emit. > > Patches submitted here: > https://lore.kernel.org/lkml/5d606519698ce4c8f1203a2b35797d8254c6050a.1600285923.git.joe@perches.com/T/ > > Anyone know if it's appropriate to change the > sprintf-like uses in these functions to sysfs_emit > and/or sysfs_emit_at? There's a lot of preprocessor magic to wade through. I'm pretty sure this comes through include/linux/moduleparam.h and kernel/module.c.