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

On Tue, Nov 27, 2018 at 12:19:09AM +0100, Cristian Sicilia wrote:
> 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);


What problem are you trying to solve?  Shouldn't it just be:

		reg_data = _nbu2ss_readl(IO_ADDRESS(USB_BASE_ADDRESS + i));

regards,
dan carpenter


  reply	other threads:[~2018-11-27  1:45 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 ` [PATCH 2/2] staging: emxx_udc: Added a temporary variable with address Cristian Sicilia
2018-11-27  1:44   ` Dan Carpenter [this message]
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=20181127014458.GN2970@unbuntlaptop \
    --to=dan.carpenter@oracle.com \
    --cc=areklis909@gmail.com \
    --cc=carmeli.tamir@gmail.com \
    --cc=chrisadr@gentoo.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=sicilia.cristian@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.