Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1578964
| From | Cheah Kok Cheong <thrust73@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Staging: comedi: drivers: comedi_test: Set max input value for auto config |
| Date | 2017-02-11 10:30 +0100 |
| Message-ID | <t9Cad-7mN-5@gated-at.bofh.it> (permalink) |
| References | <t3zI7-4Hf-37@gated-at.bofh.it> <t4ilQ-6Xe-37@gated-at.bofh.it> <t8Wb0-6a9-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] Staging: comedi: drivers: comedi_test: Set max input value for auto config Ian Abbott <abbotti@mev.co.uk> - 2017-02-09 13:40 +0100 Re: [PATCH] Staging: comedi: drivers: comedi_test: Set max input value for auto config Cheah Kok Cheong <thrust73@gmail.com> - 2017-02-11 10:30 +0100
csiph-web