Re: [Xen-devel] Re: [PATCH 5/7] Xen: fix whitespaces, tabs coding style issue in drivers/xen/xenbus/xenbus_client.c

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

 



On Tue, 2011-07-26 at 12:17 -0400, Jeremy Fitzhardinge wrote:
> On 07/26/2011 04:16 AM, ruslanpisarev@xxxxxxxxx wrote:
> > @@ -43,15 +43,15 @@
> >  const char *xenbus_strstate(enum xenbus_state state)
> >  {
> >  	static const char *const name[] = {
> > -		[ XenbusStateUnknown      ] = "Unknown",
> > -		[ XenbusStateInitialising ] = "Initialising",
> > -		[ XenbusStateInitWait     ] = "InitWait",
> > -		[ XenbusStateInitialised  ] = "Initialised",
> > -		[ XenbusStateConnected    ] = "Connected",
> > -		[ XenbusStateClosing      ] = "Closing",
> > -		[ XenbusStateClosed	  ] = "Closed",
> > -		[XenbusStateReconfiguring] = "Reconfiguring",
> > -		[XenbusStateReconfigured] = "Reconfigured",
> > +		[XenbusStateUnknown] =		"Unknown",
> > +		[XenbusStateInitialising] =	"Initialising",
> > +		[XenbusStateInitWait] =		"InitWait",
> > +		[XenbusStateInitialised] =	"Initialised",
> > +		[XenbusStateConnected] =	"Connected",
> > +		[XenbusStateClosing] =		"Closing",
> > +		[XenbusStateClosed] =		"Closed",
> > +		[XenbusStateReconfiguring] =	"Reconfiguring",
> > +		[XenbusStateReconfigured] =	"Reconfigured",
> >  	};
> 
> Eh, I think this looks worse now.

Me too.

If we're going to change this to anything I'd suggest
#define N(x) [XenbusState#x] = ##x
...
         N(Connected),
         N(Closing),
...
#undef N

(modulo my never quite remembering the cpp stringification rules first
time)

Ian.

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux