[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181127014458.GN2970@unbuntlaptop>
Date: Tue, 27 Nov 2018 04:44:58 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Cristian Sicilia <sicilia.cristian@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Carmeli Tamir <carmeli.tamir@...il.com>,
Christopher Diaz Riveros <chrisadr@...too.org>,
Arkadiusz Lis <areklis909@...il.com>,
Nathan Chancellor <natechancellor@...il.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] staging: emxx_udc: Added a temporary variable with
address.
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@...il.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
Powered by blists - more mailing lists