[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 May 2015 20:13:21 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Joe Perches <joe@...ches.com>
Cc: sfeldma@...il.com, netdev@...r.kernel.org,
roopa@...ulusnetworks.com, linux@...ck-us.net,
f.fainelli@...il.com, sridhar.samudrala@...el.com,
ronen.arad@...el.com, andrew@...n.ch, simon.horman@...ronome.com
Subject: Re: [PATCH net-next v5 20/21] rocker: make checkpatch -f clean
Tue, May 05, 2015 at 07:45:47PM CEST, joe@...ches.com wrote:
>On Tue, 2015-05-05 at 10:34 -0700, sfeldma@...il.com wrote:
>> Well almost clean: ignore the CHECKs for space after cast operator.
>
>I think, because this uses relatively long identifiers,
>that you might as well ignore > 80 column lines length
>warnings.
>
>> diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
>[]
>> @@ -1418,9 +1418,10 @@ static int rocker_event_link_change(struct rocker *rocker,
>> if (!attrs[ROCKER_TLV_EVENT_LINK_CHANGED_PPORT] ||
>> !attrs[ROCKER_TLV_EVENT_LINK_CHANGED_LINKUP])
>> return -EIO;
>> - port_number =
>> - rocker_tlv_get_u32(attrs[ROCKER_TLV_EVENT_LINK_CHANGED_PPORT]) - 1;
>> - link_up = rocker_tlv_get_u8(attrs[ROCKER_TLV_EVENT_LINK_CHANGED_LINKUP]);
>> + port_number = rocker_tlv_get_u32(
>> + attrs[ROCKER_TLV_EVENT_LINK_CHANGED_PPORT]) - 1;
>> + link_up = rocker_tlv_get_u8(
>> + attrs[ROCKER_TLV_EVENT_LINK_CHANGED_LINKUP]);
>
>These would probably be better on single lines.
I agree. Let this be on single line.
>
>Maybe it'd be OK to avoid the rocker_tlv_ prefix
I'd like to have that prefix.
>and/or add a helper macro/define for the
> rocker_tlv_<foo>(attrs[ROCKER_TLV_<BAR>
>style to shorten the line length.
Not sure about the macros, they obfuscate things :/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists