Re: [PATCH net-next v5 20/21] rocker: make checkpatch -f clean
From: Jiri Pirko <jiri@resnulli.us>
Date: 2015-05-05 18:13:27
Tue, May 05, 2015 at 07:45:47PM CEST, joe@perches.com wrote:
On Tue, 2015-05-05 at 10:34 -0700, sfeldma@gmail.com wrote:quoted
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.quoted
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c[]quoted
@@ -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 :/