From: Andrew Morton <akpm@linux-foundation.org>
To: Nelson <arhuaco@freaks-unidos.net>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
andy@openmoko.com
Subject: Re: [PATCH 3/5] Add median filter
Date: Thu, 15 Jan 2009 15:47:24 -0800 [thread overview]
Message-ID: <20090115154724.fe722ce3.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090113233955.26361.77565.stgit@fugue.noexisteestedominiotanlargo.biz>
On Tue, 13 Jan 2009 18:39:55 -0500
Nelson <arhuaco@freaks-unidos.net> wrote:
> +static void ts_filter_median_del(int *p, int value, int count)
> +{
> + int index;
> +
> + for (index = 0; index < count; index++)
> + if (p[index] == value) {
> + for (; index < count; index++)
> + p[index] = p[index + 1];
> + return;
> + }
> +}
> +
> +
> +static void ts_filter_median_clear_internal(struct ts_filter *tsf)
> +{
> + struct ts_filter_median *tsfm = (struct ts_filter_median *)tsf;
> +
> + tsfm->pos = 0;
> + tsfm->valid = 0;
> +
> +}
> +static void ts_filter_median_clear(struct ts_filter *tsf)
> +{
> + ts_filter_median_clear_internal(tsf);
> +
> + if (tsf->next) /* chain */
> + (tsf->next->api->clear)(tsf->next);
> +}
Again, the code seems to do an awful lot of browsing over
exernally-visible data structures while holding no locks.
next prev parent reply other threads:[~2009-01-15 23:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 23:39 [PATCH 0/5][RFC] Touchscreen filters Nelson Castillo
2009-01-13 23:39 ` [PATCH 1/5] Add touchscreen filter API Nelson
2009-01-15 23:47 ` Andrew Morton
2009-01-16 5:05 ` Nelson Castillo
2009-01-16 6:55 ` Andrew Morton
2009-01-16 13:28 ` Nelson Castillo
2009-01-16 5:06 ` Nelson Castillo
2009-01-13 23:39 ` [PATCH 2/5] Add group filter Nelson
2009-01-15 23:47 ` Andrew Morton
2009-01-13 23:39 ` [PATCH 3/5] Add median filter Nelson
2009-01-15 23:47 ` Andrew Morton [this message]
2009-01-13 23:40 ` [PATCH 4/5] Add mean filter Nelson
2009-01-13 23:40 ` [PATCH 5/5] Add linear filter Nelson
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=20090115154724.fe722ce3.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andy@openmoko.com \
--cc=arhuaco@freaks-unidos.net \
--cc=linux-input@vger.kernel.org \
--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
Powered by JetHome