public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: devendra sharma <devendra.sharma9091@gmail.com>
Cc: abbotti@mev.co.uk, hsweeten@visionengravers.com,
	ansonjacob.aj@gmail.com, amitoj1606@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging:comedi:cb_pcidas64=>Fixed check patch warnings
Date: Sun, 18 Dec 2016 11:30:05 +0100	[thread overview]
Message-ID: <20161218103005.GA7863@kroah.com> (raw)
In-Reply-To: <1482055995-31664-1-git-send-email-devendra.sharma9091@gmail.com>

On Sun, Dec 18, 2016 at 03:43:15PM +0530, devendra sharma wrote:
> Fixed check patch warnings about multiple line dereferencing

What does that mean?

> 
> Signed-off-by: Devendra Sharma <devendra.sharma9091@gmail.com>
> ---
>  drivers/staging/comedi/drivers/cb_pcidas64.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
> index cb9c269..946c580 100644
> --- a/drivers/staging/comedi/drivers/cb_pcidas64.c
> +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
> @@ -1500,10 +1500,9 @@ static int alloc_and_init_dma_members(struct comedi_device *dev)
>  		if (ao_cmd_is_supported(board)) {
>  			devpriv->ao_buffer[i] =
>  				dma_alloc_coherent(&pcidev->dev,
> -						   DMA_BUFFER_SIZE,
> -						   &devpriv->
> -						   ao_buffer_bus_addr[i],
> -						   GFP_KERNEL);
> +				   DMA_BUFFER_SIZE,
> +				   &devpriv->ao_buffer_bus_addr[i],
> +				   GFP_KERNEL);
>  			if (!devpriv->ao_buffer[i])
>  				return -ENOMEM;
>  		}
> @@ -2476,18 +2475,15 @@ static int setup_channel_queue(struct comedi_device *dev,
>  			for (i = 0; i < cmd->chanlist_len; i++) {
>  				bits = 0;
>  				/* set channel */
> -				bits |= adc_chan_bits(CR_CHAN(cmd->
> -							      chanlist[i]));
> +				bits |= adc_chan_bits(
> +				CR_CHAN(cmd->chanlist[i]));

That doesn't look better to me, does it to you?

checkpatch is a guide, don't let it make you write code that isn't easy
to understand.

thanks,

greg k-h

  reply	other threads:[~2016-12-18 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-18 10:13 [PATCH] Staging:comedi:cb_pcidas64=>Fixed check patch warnings devendra sharma
2016-12-18 10:30 ` Greg KH [this message]
2016-12-18 17:30 ` Joe Perches

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=20161218103005.GA7863@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=abbotti@mev.co.uk \
    --cc=amitoj1606@gmail.com \
    --cc=ansonjacob.aj@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devendra.sharma9091@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox