linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ahmed S. Darwish" <darwish.07@gmail.com>
To: Christopher Li <sparse@chrisli.org>
Cc: Josh Triplett <josh@kernel.org>, linux-sparse@vger.kernel.org
Subject: Re: Warnings on global symbols accessed only from assembly code
Date: Sun, 14 Feb 2010 02:48:32 +0200	[thread overview]
Message-ID: <20100214004832.GA29636@laptop> (raw)
In-Reply-To: <70318cbf1002112243q7de5f692k632f156d769fd7fb@mail.gmail.com>

On Thu, Feb 11, 2010 at 10:43:51PM -0800, Christopher Li wrote:
> On Thu, Feb 11, 2010 at 5:47 PM, Ahmed S. Darwish <darwish.07@gmail.com> wrote:
> >
> > The case I faced was kernel's main entrance C method which should only be
> > jumped to from bootstrap asm code. I think a declaration in such case will
> > only give bogus function usage impressions.
> 
> How about give it some prototype which clearly indicate the function should
> be only call from boot strap? e.g. BOOT_STRAP_ENTRY(function_name) which
> expand it to a function prototype.
>

mm, yes, I guess this can be a good-enough solution :)

> >
> >> > Unfortunately the current `-Wno-decl' solution is a bit extreme: it
> >> > turns off a very useful sparse feature (by design).
> >>
> >> Right, the problem is that sparse can't tell which functions are used in
> >> asm files and only skip warning on those.
> >>
> >
> > Would proposing an __attribute__ for such case be accepted in concept?
> 
> I don't thing it justify more non-stander attribute, which is
> for-the-sake-of-sparse thing as well.
>

It seems those non-standard attributes have some associated costs
that I'm not aware of; I can see the implicit trade-off then.

> Chris

Thanks for the sincere help.

-- 
Darwish
http://darwish.07.googlepages.com

      reply	other threads:[~2010-02-14  0:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12  0:00 Warnings on global symbols accessed only from assembly code Ahmed S. Darwish
2010-02-12  1:06 ` Christopher Li
2010-02-12  1:47   ` Ahmed S. Darwish
2010-02-12  6:43     ` Christopher Li
2010-02-14  0:48       ` Ahmed S. Darwish [this message]

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=20100214004832.GA29636@laptop \
    --to=darwish.07@gmail.com \
    --cc=josh@kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.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).