On 07/28/2014 02:11 PM, Alexander Aring wrote: > On Mon, Jul 28, 2014 at 02:01:15PM +0530, Varka Bhadram wrote: >> Hi Alex, >> >> On 07/28/2014 01:56 PM, Alexander Aring wrote: >>> On Fri, Jul 25, 2014 at 10:12:38AM +0530, [email protected] wrote: >>>> From: Varka Bhadram <[email protected]> >>>> >>>> It fix the indentation for the switch case as per the kernel >>>> coding styles. >>>> >>>> Signed-off-by: Varka Bhadram <[email protected]> >>>> --- >>>> net/ieee802154/header_ops.c | 12 ++++++++---- >>>> 1 file changed, 8 insertions(+), 4 deletions(-) >>>> >>>> diff --git a/net/ieee802154/header_ops.c b/net/ieee802154/header_ops.c >>>> index c09294e..5d6e4d6 100644 >>>> --- a/net/ieee802154/header_ops.c >>>> +++ b/net/ieee802154/header_ops.c >>>> @@ -157,10 +157,14 @@ static int ieee802154_hdr_addr_len(int mode, bool >>>> omit_pan) >>>> int pan_len = omit_pan ? 0 : 2; >>>> switch (mode) { >>>> - case IEEE802154_ADDR_NONE: return 0; >>>> - case IEEE802154_ADDR_SHORT: return 2 + pan_len; >>>> - case IEEE802154_ADDR_LONG: return IEEE802154_ADDR_LEN + pan_len; >>>> - default: return -EINVAL; >>>> + case IEEE802154_ADDR_NONE: >>>> + return 0; >>>> + case IEEE802154_ADDR_SHORT: >>>> + return 2 + pan_len; >>>> + case IEEE802154_ADDR_LONG: >>>> + return IEEE802154_ADDR_LEN + pan_len; >>>> + default: >>>> + return -EINVAL; >>>> } >>>> } >>> I don't apply this one, because I don't see that this isn't invalid >>> according kernel coding styles. >>> >>> See Documentation/CodingStyle, there is a part about switch cases and an >>> example with your "identation". But the surrounding text describes that >>> we should have the indentation of case in the same like switch. >>> >>> There is not sentence about we can't do something like: >>> >>> switch (foo) { >>> case BAR: return foobar; >>> default: return barfoo; >>> } >>> >>> Also checkpatch doesn't say any warning about that. If you get patches >>> in to change "Documentation/CodingStyle" to add a part about after "case >>> FOOBAR" shuld always be a newline with indentation in the next level, >>> then I will apply it. >>> >>> But for now I don't see any issues according kernel codestyle. >>> >>> - Alex >> Please see >> :http://lxr.free-electrons.com/source/Documentation/CodingStyle#L38 >> > Yes, this is what I mean. This text describes only that a case should be > in the same indentation level like the switch. > > > > Maybe you can argument with: > > "Don't put multiple statements on a single line unless you have > something to hide:", but I don't see that the code hide something. It's > valid kernel codingstyle. > > - Alex
Ya i agree with you. Thanks -- Regards, Varka Bhadram. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ Linux-zigbee-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
