From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935391AbcI3B1m (ORCPT ); Thu, 29 Sep 2016 21:27:42 -0400 Received: from foss.arm.com ([217.140.101.70]:35182 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934082AbcI3B1f (ORCPT ); Thu, 29 Sep 2016 21:27:35 -0400 Date: Fri, 30 Sep 2016 02:27:28 +0100 From: Mark Rutland To: Laura Abbott Cc: AKASHI Takahiro , Ard Biesheuvel , David Brown , Will Deacon , Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Kees Cook , kernel-hardening@lists.openwall.com Subject: Re: [PATCH 1/3] arm64: dump: Make ptdump debugfs a separate option Message-ID: <20160930012728.GA4611@remoulade> References: <20160929213257.30505-1-labbott@redhat.com> <20160929213257.30505-2-labbott@redhat.com> <20160930001339.GA4369@remoulade> <20160930004852.GC4369@remoulade> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 29, 2016 at 06:11:44PM -0700, Laura Abbott wrote: > On 09/29/2016 05:48 PM, Mark Rutland wrote: > >On Thu, Sep 29, 2016 at 05:31:09PM -0700, Laura Abbott wrote: > >>On 09/29/2016 05:13 PM, Mark Rutland wrote: > >>>On Thu, Sep 29, 2016 at 02:32:55PM -0700, Laura Abbott wrote: > >>>>+int ptdump_register(struct ptdump_info *info, const char *name) > >>>>+{ > >>>>+ ptdump_initialize(info); > >>>>+ return ptdump_debugfs_create(info, name); > >>>>} > >I meant moving ptdump_register into ptdump_debugfs.c, perhaps renamed to make it > >clear it's debugfs-specific. > > > >We could instead update existing users to call ptdump_debugfs_create() > >directly, and have that call ptdump_initialize(), which could itself become a > >staic inline in a header. > > Ah okay, I see what you are suggesting. ptdump_initialize should still > happen regardless of debugfs status though so I guess ptdump_debugfs_create > would just get turned into just ptdump_initialize > which seems a little unclear. I'll come up with some other shed > colors^W^Wfunction names. Cheers! FWIW, given ptsump_initialize() is only going to be called with the ptdump core and debugfs code, I'm not all that concerned by what it's called. A few leading underscores is about the only thing that comes to mind, but even as-is I think it should be fine. Thanks, Mark.