[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ed7277eb-bf16-d90f-0697-7a421bb3910d@mev.co.uk>
Date: Mon, 20 Feb 2017 10:03:39 +0000
From: Ian Abbott <abbotti@....co.uk>
To: Cheah Kok Cheong <thrust73@...il.com>,
hsweeten@...ionengravers.com, gregkh@...uxfoundation.org,
devel@...verdev.osuosl.org
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple
line dereference
On 20/02/17 08:28, Cheah Kok Cheong wrote:
> Fix checkpatch warning "Avoid multiple line dereference"
> using a local variable to avoid line wrap.
>
> Signed-off-by: Cheah Kok Cheong <thrust73@...il.com>
> ---
> drivers/staging/comedi/drivers/comedi_test.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c
> index 2a063f0..fde83e0 100644
> --- a/drivers/staging/comedi/drivers/comedi_test.c
> +++ b/drivers/staging/comedi/drivers/comedi_test.c
> @@ -480,11 +480,9 @@ static void waveform_ao_timer(unsigned long arg)
> /* output the last scan */
> for (i = 0; i < cmd->scan_end_arg; i++) {
> unsigned int chan = CR_CHAN(cmd->chanlist[i]);
> + unsigned short d = devpriv->ao_loopbacks[chan];
>
> - if (comedi_buf_read_samples(s,
> - &devpriv->
> - ao_loopbacks[chan],
> - 1) == 0) {
> + if (!comedi_buf_read_samples(s, &d, 1)) {
> /* unexpected underrun! (cancelled?) */
> async->events |= COMEDI_CB_OVERFLOW;
> goto underrun;
>
NAK. This leaves devpriv->ao_loopbacks[chan] unchanged.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@....co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
Powered by blists - more mailing lists