[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57c18e08-3e36-b5b3-aaba-9a21b75a1613@intel.com>
Date:   Thu, 1 Apr 2021 12:32:58 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Jarkko Sakkinen <jarkko@...nel.org>, linux-sgx@...r.kernel.org
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] x86/sgx: Add sgx_nr_{all, free}_pages to the debugfs
On 3/31/21 10:21 PM, Jarkko Sakkinen wrote:
> +#ifdef CONFIG_DEBUG_FS
> +	debugfs_create_file("sgx_nr_all_pages", 0400, arch_debugfs_dir, NULL,
> +			    &sgx_nr_all_pages_fops);
> +	debugfs_create_file("sgx_nr_free_pages", 0400, arch_debugfs_dir, NULL,
> +			    &sgx_nr_free_pages_fops);
> +#endif /* CONFIG_DEBUG_FS */
Why not make the types u64's and use debugfs_create_u64()?  That would
save a ton of code.  There's also debugfs_create_ulong().
Powered by blists - more mailing lists
 
