All of lore.kernel.org
 help / color / mirror / Atom feed
From: H Hartley Sweeten <hartleys@visionengravers.com>
To: linux-sparse@vger.kernel.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: improper sparse warnings in linux kernel build?
Date: Fri, 9 Sep 2011 15:41:28 -0700	[thread overview]
Message-ID: <201109091541.28395.hartleys@visionengravers.com> (raw)

Hello all,

I'm not sure if this is the correct place to post this.  Please let me know.

I am seeing a lot of sparse warnings when compiling the linux kernel that
look like this:

arch/x86/kernel/cpu/mcheck/mce_intel.c:25:8:
  warning: symbol 'mce_banks_owned' was not declared. Should it be static?

This line in the code is:

static DEFINE_PER_CPU(mce_banks_t, mce_banks_owned);

I'm not really sure what the DEFINE_PER_CPU macro expands to so I'm not
sure if the 'static' in front is actually getting used or if sparse is just
confused.

Is this an actual problem in the linux kernel or is sparse just getting
tripped up by the DEFINE_PER_CPU macro?

Thanks,
Hartley

WARNING: multiple messages have this Message-ID (diff)
From: H Hartley Sweeten <hartleys@visionengravers.com>
To: <linux-sparse@vger.kernel.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: improper sparse warnings in linux kernel build?
Date: Fri, 9 Sep 2011 15:41:28 -0700	[thread overview]
Message-ID: <201109091541.28395.hartleys@visionengravers.com> (raw)

Hello all,

I'm not sure if this is the correct place to post this.  Please let me know.

I am seeing a lot of sparse warnings when compiling the linux kernel that
look like this:

arch/x86/kernel/cpu/mcheck/mce_intel.c:25:8:
  warning: symbol 'mce_banks_owned' was not declared. Should it be static?

This line in the code is:

static DEFINE_PER_CPU(mce_banks_t, mce_banks_owned);

I'm not really sure what the DEFINE_PER_CPU macro expands to so I'm not
sure if the 'static' in front is actually getting used or if sparse is just
confused.

Is this an actual problem in the linux kernel or is sparse just getting
tripped up by the DEFINE_PER_CPU macro?

Thanks,
Hartley

             reply	other threads:[~2011-09-09 22:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09 22:41 H Hartley Sweeten [this message]
2011-09-09 22:41 ` improper sparse warnings in linux kernel build? H Hartley Sweeten
2011-09-10  5:27 ` Dan Carpenter
2011-09-19 17:49   ` H Hartley Sweeten

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=201109091541.28395.hartleys@visionengravers.com \
    --to=hartleys@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.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 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.