Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: linux-mips@linux-mips.org
Subject: [PATCH] Fix oprofile compilation error.
Date: Tue, 04 Oct 2005 22:06:10 -0700	[thread overview]
Message-ID: <43435F42.9050500@avtrex.com> (raw)

Looks like oprofile_arch_init() was changed so that we have to fill in 
the caller's oprofile_operations instead of setting a pointer to ours.

We can now make the prototype oprofile_operations be __initdata as a 
copy is being made.


Signed-off-by: David Daney <ddaney@avtrex.com>


diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c
--- a/arch/mips/oprofile/common.c
+++ b/arch/mips/oprofile/common.c
@@ -68,7 +68,7 @@ static void op_mips_stop(void)
         on_each_cpu(model->cpu_stop, NULL, 0, 1);
  }

-static struct oprofile_operations oprof_mips_ops = {
+static struct oprofile_operations oprof_mips_ops __initdata = {
         .create_files   = op_mips_create_files,
         .setup          = op_mips_setup,
         .start          = op_mips_start,
@@ -76,7 +76,7 @@ static struct oprofile_operations oprof_
         .cpu_type       = NULL
  };

-int __init oprofile_arch_init(struct oprofile_operations **ops)
+int __init oprofile_arch_init(struct oprofile_operations *ops)
  {
         struct op_mips_model *lmodel = NULL;
         int res;
@@ -101,7 +101,7 @@ int __init oprofile_arch_init(struct opr
         model = lmodel;

         oprof_mips_ops.cpu_type = lmodel->cpu_type;
-       *ops = &oprof_mips_ops;
+       *ops = oprof_mips_ops;

         printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
                lmodel->cpu_type);

                 reply	other threads:[~2005-10-05  5:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=43435F42.9050500@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=linux-mips@linux-mips.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