linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Dave Hansen <dave.hansen@intel.com>
Cc: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] b/arch/x86/mm/pti.c - make local symbols static
Date: Thu, 21 Mar 2019 15:33:30 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1903211528530.1784@nanos.tec.linutronix.de> (raw)
In-Reply-To: <36d37d88-4460-e2bb-4f09-07693ddb5831@intel.com>

On Tue, 12 Mar 2019, Dave Hansen wrote:

> > Make both variables static.
> 
> "pti_set_kernel_image_nonglobal(void)" is an awfully funny looking
> variable. ;)
> 
> > Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
> > 
> > ---
> > diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
> > index 4fee5c3003ed..139b28a01ce4 100644
> > --- a/arch/x86/mm/pti.c
> > +++ b/arch/x86/mm/pti.c
> > @@ -77,7 +77,7 @@ static void __init pti_print_if_secure(const char *reason)
> >  		pr_info("%s\n", reason);
> >  }
> >  
> > -enum pti_mode {
> > +static enum pti_mode {
> 
> I'm struggling to figure out why we would want to do this.  If there's a
> really good reason, I think we probably need to do it en masse:

Because its:

enum pti_mode {
 ....
} pti_mode;

So that's both enum and variable declaration. 

> $ grep -r '^enum.{' arch/x86/ | wc -l
> 48

In the other cases it's a enum declaration without declaring a variable at
the same time. Making them static would be obviously bogus.

Thanks,

	tglx

 

  reply	other threads:[~2019-03-21 14:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12  7:47 [PATCH] b/arch/x86/mm/pti.c - make local symbols static Valdis Klētnieks
2019-03-13  0:02 ` Dave Hansen
2019-03-21 14:33   ` Thomas Gleixner [this message]
2019-03-22 12:46 ` Thomas Gleixner
2019-03-22 13:22 ` [tip:x86/urgent] x86/mm/pti: Make " tip-bot for Valdis Kletnieks

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=alpine.DEB.2.21.1903211528530.1784@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=valdis.kletnieks@vt.edu \
    --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).