All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Zubin Mithra <zsm@chromium.org>
Cc: mingo@redhat.com, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org, groeck@chromium.org,
	Kees Cook <keescook@chromium.org>,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] x86/pci: Annotate 'pci_root_ops' with __ro_after_init
Date: Mon, 5 Nov 2018 22:38:25 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1811052232020.1659@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20181105201735.72026-1-zsm@chromium.org>

On Mon, 5 Nov 2018, Zubin Mithra wrote:

Cc+: Bjorn

> When CONFIG_X86_INTEL_MID is set pci_root_ops is written to inside
> intel_mid_pci_init(which is marked __init) and not modified after. This
> makes pci_root_ops a suitable candidate for annotating as
> __ro_after_init.

This is confusing. What about CONFIG_X86_INTEL_MID=n?

What you want to say is:

 pci_root_ops is only modified from intel_mid_pci_init() which is a init
 function, so it can be made __ro_after_init.

or something like this. Hmm?

Other than the nitpick above:

      Reviewed-by: Thomas Gleixner <tglx@linutronix.de>

> Signed-off-by: Zubin Mithra <zsm@chromium.org>
> ---
>  arch/x86/pci/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
> index d4ec117c1142..204ee80cfa63 100644
> --- a/arch/x86/pci/common.c
> +++ b/arch/x86/pci/common.c
> @@ -67,7 +67,7 @@ static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int siz
>  				  devfn, where, size, value);
>  }
>  
> -struct pci_ops pci_root_ops = {
> +struct pci_ops pci_root_ops __ro_after_init = {
>  	.read = pci_read,
>  	.write = pci_write,
>  };
> -- 
> 2.19.1.930.g4563a0d9d0-goog
> 
> 

  reply	other threads:[~2018-11-05 21:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 20:17 [PATCH] x86/pci: Annotate 'pci_root_ops' with __ro_after_init Zubin Mithra
2018-11-05 21:38 ` Thomas Gleixner [this message]
2018-11-05 21:57 ` Christoph Hellwig

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.1811052232020.1659@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=groeck@chromium.org \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=zsm@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.