From: Ray Lee <ray-lk@madrabbit.org>
To: ldb@ldb.ods.org, Linux Kernel <linux-kernel@vger.kernel.org>,
torvalds@transmeta.com
Subject: Re: [PATCH] Re: 2.5.33 PNPBIOS does not compile
Date: 01 Sep 2002 14:35:07 -0700 [thread overview]
Message-ID: <1030916108.936.23.camel@orca> (raw)
In-Reply-To: <1030911455.4803.3.camel@orca>
On Sun, 2002-09-01 at 13:17, Ray Lee wrote:
> These look very wrong. They're not wrapped in the standard do {...}
> while(0) protection, and used inside bare if statements below. Can
> someone who knows the code verify that these should be wrapped?
Back from running errands, and took a longer look at the code. I don't
know if the current form is harmless or not, but it is definitely
incorrect. The patch below corrects the compile failure, as well as the
multi-statement macro defines used in bare if statements; please apply.
Ray
diff -urX ../dontdiff ../linux-2.5.33/drivers/pnp/pnpbios_core.c ./drivers/pnp/pnpbios_core.c
--- ../linux-2.5.33/drivers/pnp/pnpbios_core.c 2002-09-01 09:38:10.000000000 -0700
+++ ./drivers/pnp/pnpbios_core.c 2002-09-01 14:27:55.000000000 -0700
@@ -126,12 +126,16 @@
);
#define Q_SET_SEL(cpu, selname, address, size) \
+do { \
set_base(cpu_gdt_table[cpu][(selname) >> 3], __va((u32)(address))); \
-set_limit(&cpu_gdt_table[cpu][(selname) >> 3], size)
+set_limit(cpu_gdt_table[cpu][(selname) >> 3], size); \
+} while(0)
#define Q2_SET_SEL(cpu, selname, address, size) \
+do { \
set_base(cpu_gdt_table[cpu][(selname) >> 3], (u32)(address)); \
-set_limit(&cpu_gdt_table[cpu][(selname) >> 3], size)
+set_limit(cpu_gdt_table[cpu][(selname) >> 3], size); \
+} while(0)
/*
* At some point we want to use this stack frame pointer to unwind
next prev parent reply other threads:[~2002-09-01 21:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-01 20:17 [PATCH] Re: 2.5.33 PNPBIOS does not compile Ray Lee
2002-09-01 21:35 ` Ray Lee [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-09-01 7:14 Nicholas Miell
2002-09-01 19:18 ` [PATCH] " Luca Barbieri
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=1030916108.936.23.camel@orca \
--to=ray-lk@madrabbit.org \
--cc=ldb@ldb.ods.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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