From: Jarkko Sakkinen <jarkko@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
reinette.chatre@intel.com, tony.luck@intel.com,
linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org
Subject: Re: [PATCH v9 2/2] x86/sgx: Add an attribute for the amount of SGX memory in a NUMA node
Date: Mon, 01 Nov 2021 01:52:04 +0200 [thread overview]
Message-ID: <e2e347e08fc28a13e57aeb22ba5b3c54cde34f25.camel@kernel.org> (raw)
In-Reply-To: <YX7uy3tZwBFQmAiR@kroah.com>
On Sun, 2021-10-31 at 20:30 +0100, Greg Kroah-Hartman wrote:
> On Sun, Oct 31, 2021 at 07:39:32PM +0200, Jarkko Sakkinen wrote:
> > > > +static ssize_t size_show(struct device *dev, struct device_attribute *attr, char *buf)
> > > > +{
> > > > + unsigned long size = 0;
> > > > + int nid;
> > > > +
> > > > + for (nid = 0; nid < num_possible_nodes(); nid++) {
> > > > + if (dev == sgx_numa_nodes[nid].dev) {
> > > > + size = sgx_numa_nodes[nid].size;
> > > > + break;
> > > > + }
> > > > + }
> > > > +
> > > > + return sysfs_emit(buf, "%lu\n", size);
> > > > +}
> > > > +DEVICE_ATTR_RO(size);
> > >
> > > static?
> >
> > The named ("sgx") attribute group is exported:
> >
> > extern const struct attribute_group sgx_node_group;
>
> That's fine, I am objecting to the fact that you now have added a global
> symbol called device_attr_size. Please make that static as that is a
> VERY generic name.
Right, got it! Thank you.
/Jarkko
next prev parent reply other threads:[~2021-10-31 23:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 12:18 [PATCH v9 1/2] x86/sgx: Rename fallback labels in sgx_init() Jarkko Sakkinen
2021-10-29 12:18 ` [PATCH v9 2/2] x86/sgx: Add an attribute for the amount of SGX memory in a NUMA node Jarkko Sakkinen
2021-10-29 14:53 ` Greg Kroah-Hartman
2021-10-31 17:39 ` Jarkko Sakkinen
2021-10-31 19:30 ` Greg Kroah-Hartman
2021-10-31 23:52 ` Jarkko Sakkinen [this message]
2021-10-29 17:00 ` Dave Hansen
2021-10-31 17:49 ` Jarkko Sakkinen
2021-11-01 0:01 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2e347e08fc28a13e57aeb22ba5b3c54cde34f25.camel@kernel.org \
--to=jarkko@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael@kernel.org \
--cc=reinette.chatre@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).