linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>,
	linux-sparse@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] sparse: Increase pre_buffer[] and check overflow
Date: Thu, 10 Jul 2008 18:39:45 +0100	[thread overview]
Message-ID: <20080710173945.GE28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20080709163212.GA1227@uranus.ravnborg.org>

On Wed, Jul 09, 2008 at 06:32:12PM +0200, Sam Ravnborg wrote:
> So the expalnation seems that gcc for mips define much more
> than the usual gcc does.
> My gcc define 76 symbols for i386.
> 
> And we use this stuff in the kernel.

How much of it do we really use?  Let's see - on i386 gcc-4.1.2 I see
79 symbols.  64 simply never occur in the tree.  At all.  Out of remaining
15, we have

__GNUC__, __GNUC_MAJOR__, __GNUC_PATCHLEVEL__ - provided by sparse.
__STDC__: few users, provided by sparse.
__SIZE_TYPE__: one odd user, defined by sparse anyway
__PTRDIFF_TYPE__: one odd user, defined by sparse anyway

__linux__ - few users, explicitly added in top-level Makefile
linux - 3 users.  Defined in top-level Makefile.
unix - no real users (some instances, of course, but none outside of comments,
#include pathnames and string constants).  Defined in top-level Makefile,
anyway.

__USER_LABEL_PREFIX__, __REGISTER_PREFIX__ - arch/m68knommu/lib/*.S; not
a sparse fodder anyway *and* defaults are given in files themselves.

__ELF__: arch/alpha/boot/tools/objstrip.c (userland helper, actually, *and*
misplaced there; it's used as a proxy for type of kernel image)

__i386__: a bunch
__i386: one user, redundant (__i386__ *and* i386 in the same #if)
i386: 3 users besides the aforementioned one.

So...  Only 3 symbols out of the entire bunch are arch-dependent *and* not
provided by sparse itself.  Absolute majority of the rest is never ever
used in the tree.

I very much doubt that mips situation is seriously different...

  reply	other threads:[~2008-07-10 17:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08 15:28 [PATCH] sparse: Increase pre_buffer[] and check overflow Atsushi Nemoto
2008-07-08 15:59 ` Atsushi Nemoto
2008-07-10 17:51   ` Al Viro
2008-07-10 18:09     ` Morten Welinder
2008-07-08 20:45 ` Sam Ravnborg
2008-07-09 16:18   ` Atsushi Nemoto
2008-07-09 16:32     ` Sam Ravnborg
2008-07-10 17:39       ` Al Viro [this message]
2008-07-11 16:07         ` Atsushi Nemoto

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=20080710173945.GE28946@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sam@ravnborg.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).