From: Dave Jones <davej@redhat.com>
To: Jarek Poplawski <jarkao2@o2.pl>
Cc: linux-kernel@vger.kernel.org, ak@suse.de
Subject: Re: [PATCH] mpparse.c:231: warning: comparison is always false
Date: Wed, 13 Sep 2006 12:42:51 -0400 [thread overview]
Message-ID: <20060913164251.GD13956@redhat.com> (raw)
In-Reply-To: <20060913065010.GA2110@ff.dom.local>
On Wed, Sep 13, 2006 at 08:50:10AM +0200, Jarek Poplawski wrote:
> Probably after 2.6.18-rc6-git1 there is this cc warning:
> "arch/i386/kernel/mpparse.c:231: warning: comparison is
> always false due to limited range of data type".
> Maybe this patch will be helpful.
>
> diff -Nurp linux-2.6.18-rc6-git4-/arch/i386/kernel/mpparse.c linux-2.6.18-rc6-git4/arch/i386/kernel/mpparse.c
> --- linux-2.6.18-rc6-git4-/arch/i386/kernel/mpparse.c 2006-09-13 00:01:00.000000000 +0200
> +++ linux-2.6.18-rc6-git4/arch/i386/kernel/mpparse.c 2006-09-13 00:01:00.000000000 +0200
> @@ -228,12 +228,14 @@ static void __init MP_bus_info (struct m
>
> mpc_oem_bus_info(m, str, translation_table[mpc_record]);
>
> +#if 0xFF >= MAX_MP_BUSSES
> if (m->mpc_busid >= MAX_MP_BUSSES) {
> printk(KERN_WARNING "MP table busid value (%d) for bustype %s "
> " is too large, max. supported is %d\n",
> m->mpc_busid, str, MAX_MP_BUSSES - 1);
> return;
> }
> +#endif
mpc_busid is a uchar. I don't see how this can ever be > 0xff, yet
mach-summit and mach-generic have MAX_MP_BUSSES set to 260.
I don't see how this can possibly work.
Dave
next prev parent reply other threads:[~2006-09-13 16:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-13 6:50 [PATCH] mpparse.c:231: warning: comparison is always false Jarek Poplawski
2006-09-13 16:42 ` Dave Jones [this message]
2006-09-14 5:36 ` Jarek Poplawski
2006-09-14 6:35 ` Dave Jones
2006-09-14 7:36 ` Jarek Poplawski
2006-09-14 10:12 ` Andi Kleen
2006-09-14 16:08 ` Dave Jones
2006-09-15 6:43 ` Andi Kleen
[not found] ` <20060914181754.bd963f6d.akpm@osdl.org>
2006-09-15 8:11 ` Jarek Poplawski
2006-09-15 8:23 ` Andrew Morton
2006-09-15 9:08 ` Jarek Poplawski
2006-09-15 15:23 ` Dave Jones
2006-09-15 19:33 ` Andrew Morton
2006-09-16 6:19 ` Andi Kleen
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=20060913164251.GD13956@redhat.com \
--to=davej@redhat.com \
--cc=ak@suse.de \
--cc=jarkao2@o2.pl \
--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