Messages in this thread | | | Subject | Re: [PATCH] Staging: netlogic: platform_net: Fixed '(' at the EOL | From | Joe Perches <> | Date | Sun, 14 Jan 2018 10:44:20 -0800 |
| |
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...
| |