On Mon, Jun 15, 2015 at 03:42:07PM +0100, Ian Abbott wrote:
> On 15/06/15 15:01, Gujulan Elango, Hari Prasath (H.) wrote:
> >From: Hari Prasath Gujulan Elango <hguju...@visteon.com>
> >
> >This patch renames the very generic variable name 'todo' to
> >num_samples_to_read.
> >
> >Signed-off-by: Hari Prasath Gujulan Elango <hguju...@visteon.com>
> >---
> >  drivers/staging/comedi/drivers/amplc_pci230.c | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> >
> >diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c 
> >b/drivers/staging/comedi/drivers/amplc_pci230.c
> >index 20d5920..b19ab12 100644
> >--- a/drivers/staging/comedi/drivers/amplc_pci230.c
> >+++ b/drivers/staging/comedi/drivers/amplc_pci230.c
> >@@ -2011,17 +2011,18 @@ static void pci230_handle_ai(struct comedi_device 
> >*dev,
> >     struct comedi_cmd *cmd = &async->cmd;
> >     unsigned int status_fifo;
> >     unsigned int i;
> >-    unsigned int todo;
> >+    unsigned int num_samples_to_read;
> >     unsigned int fifoamount;
> >     unsigned short val;
> >
> >     /* Determine number of samples to read. */
> >-    todo = comedi_nsamples_left(s, PCI230_ADC_FIFOLEVEL_HALFFULL);
> >-    if (todo == 0)
> >+    num_samples_to_read = comedi_nsamples_left(s,
> >+                                    PCI230_ADC_FIFOLEVEL_HALFFULL);
> >+    if (num_samples_to_read == 0)
> >             return;
> >
> >     fifoamount = 0;
> >-    for (i = 0; i < todo; i++) {
> >+    for (i = 0; i < num_samples_to_read; i++) {
> >             if (fifoamount == 0) {
> >                     /* Read FIFO state. */
> >                     status_fifo = inw(devpriv->daqio + PCI230_ADCCON);
> >
> 
> I don't see anything particularly wrong with the old name, but the
> new name is a bit long.  Most of the comedi drivers seem to use the
> name 'nsamples' for this.
> 
> -- 
> -=( Ian Abbott @ MEV Ltd.    E-mail: <abbo...@mev.co.uk> )=-
> -=(                          Web: http://www.mev.co.uk/  )=-

Thanks for your comments.The name 'todo' was very generic though it does
the job.So I thought of proposing a meaningul name. Yes its bit long

Regards
Hari Prasath
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to