• Jon Paul Maloy's avatar
    tipc: simplify include dependencies · a6bf70f7
    Jon Paul Maloy authored
    When we try to add new inline functions in the code, we sometimes
    run into circular include dependencies.
    
    The main problem is that the file core.h, which really should be at
    the root of the dependency chain, instead is a leaf. I.e., core.h
    includes a number of header files that themselves should be allowed
    to include core.h. In reality this is unnecessary, because core.h does
    not need to know the full signature of any of the structs it refers to,
    only their type declaration.
    
    In this commit, we remove all dependencies from core.h towards any
    other tipc header file.
    
    As a consequence of this change, we can now move the function
    tipc_own_addr(net) from addr.c to addr.h, and make it inline.
    
    There are no functional changes in this commit.
    Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
    Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a6bf70f7
socket.c 72.5 KB