mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: devendra sharma <devendra.sharma9091@gmail.com>
To: abbotti@mev.co.uk
Cc: hsweeten@visionengravers.com, gregkh@linuxfoundation.org,
	ansonjacob.aj@gmail.com, amitoj1606@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	devendra sharma <devendra.sharma9091@gmail.com>
Subject: [PATCH] staging: comedi: cb_pcidas64: Fixed coding issue about multiple line dereferencing
Date: Mon, 19 Dec 2016 20:44:28 +0530	[thread overview]
Message-ID: <1482160468-5614-1-git-send-email-devendra.sharma9091@gmail.com> (raw)

Fixed coding issue about multiple line dereferencing

Signed-off-by: Devendra Sharma <devendra.sharma9091@gmail.com>
---
 drivers/staging/comedi/drivers/cb_pcidas64.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
index cb9c269..9ace9c0 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -2475,20 +2475,17 @@ static int setup_channel_queue(struct comedi_device *dev,
 			/* load external queue */
 			for (i = 0; i < cmd->chanlist_len; i++) {
 				bits = 0;
+				unsigned int ch = cmd->chanlist[i];
 				/* set channel */
-				bits |= adc_chan_bits(CR_CHAN(cmd->
-							      chanlist[i]));
+				bits |= adc_chan_bits(CR_CHAN(ch));
 				/* set gain */
 				bits |= ai_range_bits_6xxx(dev,
-							   CR_RANGE(cmd->
-								    chanlist
-								    [i]));
+							   CR_RANGE(ch));
 				/* set single-ended / differential */
 				bits |= se_diff_bit_6xxx(dev,
-							 CR_AREF(cmd->
-								 chanlist[i]) ==
+							 CR_AREF(ch) ==
 							 AREF_DIFF);
-				if (CR_AREF(cmd->chanlist[i]) == AREF_COMMON)
+				if (CR_AREF(ch) == AREF_COMMON)
 					bits |= ADC_COMMON_BIT;
 				/* mark end of queue */
 				if (i == cmd->chanlist_len - 1)
-- 
2.7.4

             reply	other threads:[~2016-12-19 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 15:14 devendra sharma [this message]
2016-12-19 18:12 ` Ian Abbott
2016-12-19 18:40 ` kbuild test robot
2017-01-03 14:26 ` Greg KH

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=1482160468-5614-1-git-send-email-devendra.sharma9091@gmail.com \
    --to=devendra.sharma9091@gmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=amitoj1606@gmail.com \
    --cc=ansonjacob.aj@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome