public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	kernel-janitor-discuss@lists.sourceforge.net, jgarzik@pobox.com,
	miura@da-cha.org, alan@lxorguk.ukuu.org.uk, viro@math.psu.edu,
	pavel@ucw.cz
Subject: Re: [warnings] [2/8] fix uninitialized quot in drivers/serial/core.c
Date: Thu, 5 Dec 2002 03:25:39 -0800	[thread overview]
Message-ID: <20021205112539.GB18600@holomorphy.com> (raw)
In-Reply-To: <20021205111913.A18253@flint.arm.linux.org.uk>

On Thu, Dec 05, 2002 at 02:52:59AM -0800, wli@holomorphy.com wrote:
>> Give quot a default value so it's initialized. rmk, this is yours
>> to ack.

On Thu, Dec 05, 2002 at 11:19:13AM +0000, Russell King wrote:
> Why can't we get this obvious compiler bug fixed?  I'd rather have
> the compiler bug fixed rather than trying to work around the bogus
> warning.

I'll start talking with rth and drow. I'm not 100% incompetent in
luserspace, but gcc is a world unto itself (and some damn dirty
code IMHO).


On Thu, Dec 05, 2002 at 11:19:13AM +0000, Russell King wrote:
> It's obvious that the loop:
> 	for (try = 0; try < 3; try++)
> is going to be executed at least once, which will initialise quot.
> As for the second hunk, its correct in so far as it'll catch the case
> where we can't even do 9600 baud.  However, I think we should just
> bound the lowest baud rate such that we can always do 9600 baud (and
> therefore this function will never return zero.)

This is a compiler bug; the rest will follow from that. Also, the 
sub-9600 baud case of the second hunk can be handled independently
from the first hunk. I'll break this out into its second hunk if it's
worth sending by itself, as you see fit.

Before any of this happens, I'll try it out on more modern gcc's.


Bill

  reply	other threads:[~2002-12-05 11:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-05 10:52 [warnings] [0/8] fix warnings in mainline wli
2002-12-05 10:52 ` [warnings] [1/8] fix hugetlbfs security.h problem wli
2002-12-05 10:52   ` [warnings] [2/8] fix uninitialized quot in drivers/serial/core.c wli
2002-12-05 10:52     ` [warnings] [3/8] fix duplicate decls in swsusp wli
2002-12-05 10:52       ` [warnings] [4/8] remove unused cr0 in cyrix.c wli
2002-12-05 10:52         ` [warnings] [5/8] fix printk() type warning in drivers/net/starfire.c wli
2002-12-05 10:52           ` [warnings] [6/8] fix mismatched function type in arch/i386/kernel/ioapic.c wli
2002-12-05 10:52             ` [warnings] [7/8] fix printk() type warning in drivers/net/tulip/interrupt.c wli
2002-12-05 10:52               ` [warnings] [8/8] fix unused function warning in drivers/block/floppy.c wli
2002-12-05 17:28             ` [warnings] [6/8] fix mismatched function type in arch/i386/kernel/ioapic.c Alan Cox
2002-12-05 16:54           ` [warnings] [5/8] fix printk() type warning in drivers/net/starfire.c Jeff Garzik
2002-12-06  0:35         ` [warnings] [4/8] remove unused cr0 in cyrix.c Hiroshi Miura
2002-12-05 11:19     ` [warnings] [2/8] fix uninitialized quot in drivers/serial/core.c Russell King
2002-12-05 11:25       ` William Lee Irwin III [this message]
2002-12-05 11:40         ` Russell King
2002-12-05 11:41       ` William Lee Irwin III

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=20021205112539.GB18600@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jgarzik@pobox.com \
    --cc=kernel-janitor-discuss@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miura@da-cha.org \
    --cc=pavel@ucw.cz \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /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