mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cristian Sicilia <sicilia.cristian@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Carmeli Tamir <carmeli.tamir@gmail.com>,
	Christopher Diaz Riveros <chrisadr@gentoo.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Arkadiusz Lis <areklis909@gmail.com>,
	Nathan Chancellor <natechancellor@gmail.com>
Cc: Cristian Sicilia <sicilia.cristian@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] staging: emxx_udc: Added a temporary variable with address.
Date: Tue, 27 Nov 2018 00:19:09 +0100	[thread overview]
Message-ID: <1543274351-25762-3-git-send-email-sicilia.cristian@gmail.com> (raw)
In-Reply-To: <1543274351-25762-1-git-send-email-sicilia.cristian@gmail.com>

Replace the IO_ADDRESS call with a temporary variable.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index ebc622f..d55cadd 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -108,20 +108,22 @@ static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)
 
 	dev_dbg(&udc->dev, "\n-USB REG-\n");
 	for (i = 0x0 ; i < USB_BASE_SIZE ; i += 16) {
-		reg_data =   _nbu2ss_readl(
-			(u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i));
+		u32 *tmp;
+
+		tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i);
+		reg_data = _nbu2ss_readl(tmp);
 		dev_dbg(&udc->dev, "USB%04x =%08x", i, (int)reg_data);
 
-		reg_data =  _nbu2ss_readl(
-			(u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 4));
+		tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 4);
+		reg_data = _nbu2ss_readl(tmp);
 		dev_dbg(&udc->dev, " %08x", (int)reg_data);
 
-		reg_data =  _nbu2ss_readl(
-			(u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 8));
+		tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 8);
+		reg_data = _nbu2ss_readl(tmp);
 		dev_dbg(&udc->dev, " %08x", (int)reg_data);
 
-		reg_data =  _nbu2ss_readl(
-			(u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 12));
+		tmp = (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 12);
+		reg_data = _nbu2ss_readl(tmp);
 		dev_dbg(&udc->dev, " %08x\n", (int)reg_data);
 	}
 
-- 
2.7.4


  parent reply	other threads:[~2018-11-26 23:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26 23:19 [PATCH 0/2] Parenthesis fix and temp vars Cristian Sicilia
2018-11-26 23:19 ` [PATCH 1/2] staging: emxx_udc: Align parameter with parenthesis Cristian Sicilia
2018-11-26 23:19 ` Cristian Sicilia [this message]
2018-11-27  1:44   ` [PATCH 2/2] staging: emxx_udc: Added a temporary variable with address Dan Carpenter
2018-11-27 20:57   ` [PATCH 0/2] Parenthesis fix Cristian Sicilia
2018-11-27 20:57     ` [PATCH 1/2] staging: emxx_udc: Align parameter with parenthesis Cristian Sicilia
2018-12-05  8:44       ` Greg Kroah-Hartman
2018-11-27 20:57     ` [PATCH 2/2] staging: emxx_udc: Remove cast and move all in one line Cristian Sicilia
2018-11-30 11:21 ` [PATCH 0/2] Parenthesis fix and temp vars Greg Kroah-Hartman

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=1543274351-25762-3-git-send-email-sicilia.cristian@gmail.com \
    --to=sicilia.cristian@gmail.com \
    --cc=areklis909@gmail.com \
    --cc=carmeli.tamir@gmail.com \
    --cc=chrisadr@gentoo.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    /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

all inboxes | Powered by JetHome®