From: Nathan Myers <ncm@nospam.cantrip.org>
To: linux-kernel@vger.kernel.org
Subject: Bad cpu_data macro in include/asm-*/processor.h
Date: Thu, 15 Nov 2001 01:52:30 -0800 [thread overview]
Message-ID: <20011115015230.A9599@shell7.ba.best.com> (raw)
In building 2.4.15-pre4 for non-SMP, I get a compile error at
kernel/i386/setup.c, line 2791. This is traceable to
include/asm-{i386,mips}/processor.h, the line
#define cpu_data &boot_cpu_data
has a very stupid non-syntactic macro. (This is line 54 in the mips
header, 79 in the x86 header.) The minimal fix is obvious:
#define cpu_data (&boot_cpu_data)
What stinky code, anyhow. Why not make it a one-element array
to begin with?
I grepped for other similar macros with
grep -n '#define[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*[ ][ ]*[^-A-Za-z0-9_\\{"( ]' */*.h */*/*.h | less
and found more (mostly involving unary operator~) in
asm-m68k/bvme*.h
asm-mips/asm.h,
asm-mips64/asm.h
asm-ppc/io.h
asm-arm/arch-l7200/aug_reg.h
linux/pci.h
linux/ps2esdi.h
net/irda/nsc-ircc.h
net/irda/w83977af_ir.h
If you check for things like
#define FOO -1
which should be
#define FOO (-1)
you find zillions more.
Feh.
Nathan Myers
ncm@nospam.cantrip.org
reply other threads:[~2001-11-15 9:53 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=20011115015230.A9599@shell7.ba.best.com \
--to=ncm@nospam.cantrip.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox