]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: eliminate code duplication in media layer
authorYing Xue <ying.xue@windriver.com>
Wed, 11 Dec 2013 04:45:43 +0000 (20:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Dec 2013 05:17:43 +0000 (00:17 -0500)
commit9448152c1276de1d7d1c7ddf0d3f152764410d96
tree57e491fae1ead5a0c587c1085266dbdbb9d30f45
parent88de837f2cedd494e2095d5f2d156d882f8297ff
tipc: eliminate code duplication in media layer

Currently TIPC supports two L2 media types, Ethernet and Infiniband.
Because both these media are accessed through the common net_device API,
several functions in the two media adaptation files turn out to be
fully or almost identical, leading to unnecessary code duplication.

In this commit we extract this common code from the two media files
and move them to the generic bearer.c. Additionally, we change
the function names to reflect their real role: to access L2 media,
irrespective of type.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Cc: Patrick McHardy <kaber@trash.net>
Reviewed-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/bearer.c
net/tipc/bearer.h
net/tipc/eth_media.c
net/tipc/ib_media.c