mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tachino Nobuhiro <tachino@open.nm.fujitsu.co.jp>
To: Robert Love <rml@tech9.net>
Cc: Tachino Nobuhiro <tachino@open.nm.fujitsu.co.jp>,
	"Michael F. Robbins" <compumike@compumike.com>,
	linux-kernel@vger.kernel.org
Subject: Re: SiS/Trident 4DWave sound driver oops
Date: Fri, 26 Oct 2001 11:36:34 +0900	[thread overview]
Message-ID: <g087jff1.wl@nisaaru.dvs.cs.fujitsu.co.jp> (raw)
In-Reply-To: <1004061741.11366.32.camel@phantasy>
In-Reply-To: <1004016263.1384.15.camel@tbird.robbins> <7ktjw58u.wl@nisaaru.dvs.cs.fujitsu.co.jp> <1004060759.11258.12.camel@phantasy> <6693w4ds.wl@nisaaru.dvs.cs.fujitsu.co.jp> <1004061741.11366.32.camel@phantasy>

At 25 Oct 2001 22:02:20 -0400,
Robert Love wrote:
> 
> On Thu, 2001-10-25 at 21:56, Tachino Nobuhiro wrote:
> > Robert Love wrote:
> > > Hm, I don't think so.  The last area is marked zero so code can know
> > > when it ends.  This is common practice.
> > 
> > But the code does not use the last area. this is the code in
> > ac97_probe_codec().
> 
> ARRAY_SIZE(x) returns the number of elements in x, but since everything
> is 0-referenced going from 0 to i < ARRAY_SIZE isn't a problem.
> 
> ie int x[3];
> ARRAY_SIZE(x) = 3;
> but x[2] is last element... so no issue here.

  No. {0, } is the last elemnet of ac97_codec_ids[] and that index is
ARRAY_SIZE(ac97_code_ids) - 1. So this element which should be used as
a loop terminator is used as a valid entry in for loop incorrectly. 

Please read ac97_codec.c

  reply	other threads:[~2001-10-26  2:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-25 13:24 Michael F. Robbins
2001-10-26  1:37 ` Tachino Nobuhiro
2001-10-26  1:56   ` Tachino Nobuhiro
2001-10-26  2:36     ` Tachino Nobuhiro [this message]
2001-10-26  1:45 ` Robert Love
2001-10-26  2:02   ` Robert Love
2001-10-26  2:42     ` Robert Love
2001-10-26  3:13       ` David Weinehall
2001-10-26  3:28       ` Robert Love
2001-10-26  3:24     ` Stuart Young
2001-10-26 14:36       ` Alan Cox
2001-10-26 14:47         ` Trever L. Adams
2001-10-28 23:06       ` SiS/Trident 4DWave sound driver Stuart Young
2001-10-29  1:19       ` SiS/Trident 4DWave sound driver (Update) Stuart Young
2001-10-29  4:04       ` SiS drivers (more) Stuart Young
2001-10-26 23:43 ` SiS/Trident 4DWave sound driver oops Michael F. Robbins
  -- strict thread matches above, loose matches on Subject: below --
2001-10-25  1:07 Michael F. Robbins
2001-10-25  5:55 ` Stuart Young
2001-10-25  7:02 ` Stuart Young
2001-10-23  6:15 Stuart Young
2001-10-23 16:19 ` Alan Cox
2001-10-24 23:55 ` Stuart Young

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=g087jff1.wl@nisaaru.dvs.cs.fujitsu.co.jp \
    --to=tachino@open.nm.fujitsu.co.jp \
    --cc=compumike@compumike.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    /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

all inboxes | Powered by JetHome®