From: Cheah Kok Cheong <thrust73@gmail.com>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: hsweeten@visionengravers.com, gregkh@linuxfoundation.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: comedi: drivers: comedi_test: Set max input value for auto config
Date: Sat, 11 Feb 2017 09:29:10 +0800 [thread overview]
Message-ID: <20170211012910.GA2811@linux-Precision-WorkStation-T5500> (raw)
In-Reply-To: <271653cb-b0d9-dcb9-0bfb-e6282221cf02@mev.co.uk>
On Thu, Feb 09, 2017 at 12:28:42PM +0000, Ian Abbott wrote:
> On 27/01/17 15:55, Cheah Kok Cheong wrote:
> >Currently user can input any value for amplitude and period.
> >This patch set a sane max value for auto-configuration mode.
> >
> >For manual configuration mode, it is assumed this is taken care of
> >by the COMEDI userspace tool since there's no limit set here from
> >day one in the staging tree. If otherwise then maybe this can be
> >looked at separately.
> >
> >Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
>
> I don't think there is any need to limit these unless it results in
> arithmetic overflow, since they only affect the fake sample data values
> produced by the driver, not system performance.
You are right there's no real danger here. Before submitting, I have
tested with positive values larger than "int" and smaller than "uint".
Anything larger than "uint" will result in loading failure.
I was motivated by the "user experience". Extreme values will not
display properly on Xoscope therefore I "googled" for a typical
oscilloscope input range for this patch.
Most probably I'm off the target here as I have only tried one
application. Maybe other supported application will handle this
better and offer a better user experience.
Again there's no real danger here, this patch is optional.
Thks.
Brgds,
CheahKC
next prev parent reply other threads:[~2017-02-11 9:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 17:31 [PATCH] Staging: comedi: drivers: comedi_test: Add auto-configuration capability Cheah Kok Cheong
2017-01-27 15:55 ` [PATCH] Staging: comedi: drivers: comedi_test: Set max input value for auto config Cheah Kok Cheong
2017-02-09 12:28 ` Ian Abbott
2017-02-11 1:29 ` Cheah Kok Cheong [this message]
2017-02-08 7:42 ` [PATCH] Staging: comedi: drivers: comedi_test: Add auto-configuration capability Cheah Kok Cheong
2017-02-09 12:25 ` Ian Abbott
2017-02-11 0:53 ` Cheah Kok Cheong
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=20170211012910.GA2811@linux-Precision-WorkStation-T5500 \
--to=thrust73@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.