Re: [PATCH] Staging: netlogic: platform_net: Fixed '(' at the EOL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux