lkml.org 
[lkml]   [2018]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Staging: netlogic: platform_net: Fixed '(' at the EOL
From
Date
On Sun, 2018-01-14 at 23:47 +0530, Naveen Panwar wrote:
> Removed '(' from the end of line, coding style issue.
[]
> diff --git a/drivers/staging/netlogic/platform_net.c b/drivers/staging/netlogic/platform_net.c
[]
> @@ -107,8 +107,8 @@ static struct platform_device *gmac_controller2_init(void *gmac0_addr)
> .dev.platform_data = &ndata1,
> };
>
> - gmac4_addr = ioremap(CPHYSADDR(
> - nlm_mmio_base(NETLOGIC_IO_GMAC_4_OFFSET)), 0xfff);
> + gmac4_addr = ioremap(CPHYSADDR
> + (nlm_mmio_base(NETLOGIC_IO_GMAC_4_OFFSET)), 0xfff);

My first reaction is this is ugly.

I suggest
gmac4_addr = ioremap(CPHYSADDR(nlm_mmio_base(NETLOGIC_IO_GMAC_4_OFFSET)),
0xfff);

or using a temporary or a #define for
CPHYSADDR(nlm_mmio_base(NETLOGIC_IO_GMAC_4_OFFSET))

or add a new define like:

#define MMIO_CPHYSADDR(addr) (CPHYSADDR(nlm_mmio_base(addr)))

and change all the netlogic uses of CPHYSADDR so this one
could be

gmac4_addr = ioremap(MMIO_CPHYSADDR(NETLOGIC_IO_GMAC_4_OFFSET), 0xfff);

etc...

\
 
 \ /
  Last update: 2018-01-14 23:27    [W:0.142 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site