From: Andres Salomon <dilinger@queued.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cs5535 mfgpt - fix wrong if condition
Date: Fri, 3 Jun 2011 16:24:35 -0700 [thread overview]
Message-ID: <20110603162435.0e359a60@queued.net> (raw)
In-Reply-To: <20110603161415.49031357.akpm@linux-foundation.org>
You're right, it's reversed.
Acked-by: Andres Salomon <dilinger@queued.net>
On Fri, 3 Jun 2011 16:14:15 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 25 May 2011 19:08:06 +0000
> Christian Gmeiner <christian.gmeiner@gmail.com> wrote:
>
> > From: Christian Gmeiner <christian.gmeiner@gmail.com>
> >
> > This patch fixes the wrong if condition for the check if the
> > requested timer is available.
> >
> > The bitmap avail is used to store if a timer is used already.
> > test_bit() is used to check if the requested timer is
> > available. If a bit in the avail bitmap is set it means that the
> > timer is available.
> >
> > Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> > ---
> > drivers/misc/cs5535-mfgpt.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/misc/cs5535-mfgpt.c
> > b/drivers/misc/cs5535-mfgpt.c index e01e08c..bc685bf 100644
> > --- a/drivers/misc/cs5535-mfgpt.c
> > +++ b/drivers/misc/cs5535-mfgpt.c
> > @@ -174,7 +174,7 @@ struct cs5535_mfgpt_timer
> > *cs5535_mfgpt_alloc_timer(int timer_nr, int domain)
> > timer_nr = t < max ? (int) t : -1;
> > } else {
> > /* check if the requested timer's available */
> > - if (test_bit(timer_nr, mfgpt->avail))
> > + if (!test_bit(timer_nr, mfgpt->avail))
> > timer_nr = -1;
> > }
> >
>
> What were the runtime effects of this bug?
>
The runtime effect would be that allocating a specific timer always
fails (versus telling cs5535_mfgpt_alloc_timer to allocate the first
available timer, which works).
> (Please always include this information in the changelog when fixing
> things)
>
> Thanks.
prev parent reply other threads:[~2011-06-03 23:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 19:08 [PATCH] cs5535 mfgpt - fix wrong if condition Christian Gmeiner
2011-06-03 23:14 ` Andrew Morton
2011-06-03 23:24 ` Andres Salomon [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=20110603162435.0e359a60@queued.net \
--to=dilinger@queued.net \
--cc=akpm@linux-foundation.org \
--cc=christian.gmeiner@gmail.com \
--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