From: Dan Carpenter <error27@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
Joonyoung Shim <jy0922.shim@samsung.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [rfc patch] wm8994: range checking issue
Date: Thu, 25 Mar 2010 13:58:22 +0300 [thread overview]
Message-ID: <20100325105822.GE5069@bicker> (raw)
In-Reply-To: <20100324143139.GE26453@rakim.wolfsonmicro.main>
On Wed, Mar 24, 2010 at 02:31:39PM +0000, Mark Brown wrote:
> On Wed, Mar 24, 2010 at 05:06:21PM +0300, Dan Carpenter wrote:
> > On Wed, Mar 24, 2010 at 12:59:46PM +0000, Mark Brown wrote:
>
> > > This is caused by confusion with the MAX_CACHED_REGISTER definition in
> > > the header. Best to use that one consistently, I guess - I've got a
> > > sneaking suspicion something has gone AWOL in the driver publication
> > > process.
>
> > Hm... That sounds more involved than I anticipated. I don't have the
> > hardware and don't feel comfortable making complicated changes if I
> > can't test them.
>
> Not really, it's just a case of picking the value to standardise on for
> the size of the array instead of the one you picked. However, now I
> look at it again REG_CACHE_SIZE is the one we want and _MAX_CACHED_REGISTER
> is bitrot which should be removed.
>
> I didn't look as closely as I might due to the extraneous changes for
> BUG_ON() I mentioned which meant the patch wouldn't be applied anyway.
> Those shouldn't be changed because there's no way anything in the kernel
> should be generating a reference to a register which doesn't physically
> exist (which is what they check for).
>
> > Can someone else take care of this.
>
> Actually, now I look even more closely there's further issues with the
> patch - you're missing the fact that the register cache is only used for
> non-volatile registers but all registers beyond the end of the register
> cache are treated as volatile. This means that I'm not convinced there
> are any actual problems here, I'm not sure what analysis smatch is doing
> but it looks to have generated false positives here.
>
Yup. You are right, this is a false positive. I'm very sorry about that,
I misread the code as well.
The problem is that Smatch doesn't do cross function analysis yet. :/
regards,
dan carpenter
> I'll send a patch for _MAX_CACHED_REGISTER later today.
prev parent reply other threads:[~2010-03-25 10:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 12:01 [rfc patch] wm8994: range checking issue Dan Carpenter
2010-03-24 12:59 ` Mark Brown
2010-03-24 14:06 ` Dan Carpenter
2010-03-24 14:31 ` Mark Brown
2010-03-25 10:58 ` Dan Carpenter [this message]
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=20100325105822.GE5069@bicker \
--to=error27@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jy0922.shim@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).