]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tipc: rename media/msg related definitions
authorErik Hugne <erik.hugne@ericsson.com>
Fri, 27 Feb 2015 07:56:57 +0000 (08:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2015 23:18:48 +0000 (18:18 -0500)
The TIPC_MEDIA_ADDR_SIZE and TIPC_MEDIA_ADDR_OFFSET names
are misleading, as they actually define the size and offset of
the whole media info field and not the address part. This patch
does not have any functional changes.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/bearer.h
net/tipc/eth_media.c
net/tipc/ib_media.c
net/tipc/msg.h

index 6b17795ff8bc309d70628c07566dc455e638614a..1a233271d1b59cbe86d8e67a687b99dca17d70ea 100644 (file)
@@ -50,7 +50,7 @@
  * - the field's actual content and length is defined per media
  * - remaining unused bytes in the field are set to zero
  */
-#define TIPC_MEDIA_ADDR_SIZE   32
+#define TIPC_MEDIA_INFO_SIZE   32
 #define TIPC_MEDIA_TYPE_OFFSET 3
 
 /*
@@ -76,7 +76,7 @@ struct tipc_node_map {
  * @broadcast: non-zero if address is a broadcast address
  */
 struct tipc_media_addr {
-       u8 value[TIPC_MEDIA_ADDR_SIZE];
+       u8 value[TIPC_MEDIA_INFO_SIZE];
        u8 media_id;
        u8 broadcast;
 };
index 5e1426f1751f146cf3350983e9d0c04d218da850..085d3a07e565958f723abd507db05c71d8b02d8c 100644 (file)
@@ -53,7 +53,7 @@ static int tipc_eth_addr2str(struct tipc_media_addr *addr,
 /* Convert from media address format to discovery message addr format */
 static int tipc_eth_addr2msg(char *msg, struct tipc_media_addr *addr)
 {
-       memset(msg, 0, TIPC_MEDIA_ADDR_SIZE);
+       memset(msg, 0, TIPC_MEDIA_INFO_SIZE);
        msg[TIPC_MEDIA_TYPE_OFFSET] = TIPC_MEDIA_TYPE_ETH;
        memcpy(msg + ETH_ADDR_OFFSET, addr->value, ETH_ALEN);
        return 0;
index 8522eef9c136bc25d39e166b32dfc459881d77c9..e8c16718e3faea3bf4983f12f2f5fc5c289175eb 100644 (file)
@@ -57,7 +57,7 @@ static int tipc_ib_addr2str(struct tipc_media_addr *a, char *str_buf,
 /* Convert from media address format to discovery message addr format */
 static int tipc_ib_addr2msg(char *msg, struct tipc_media_addr *addr)
 {
-       memset(msg, 0, TIPC_MEDIA_ADDR_SIZE);
+       memset(msg, 0, TIPC_MEDIA_INFO_SIZE);
        memcpy(msg, addr->value, INFINIBAND_ALEN);
        return 0;
 }
index 9ace47f44a69ed3000c6739aee55fbf30b04081c..c1cc8d7a5d52b7cdb5963e1ab70323398faf0a14 100644 (file)
@@ -76,7 +76,7 @@ struct plist;
 
 #define MAX_MSG_SIZE (MAX_H_SIZE + TIPC_MAX_USER_MSG_SIZE)
 
-#define TIPC_MEDIA_ADDR_OFFSET 5
+#define TIPC_MEDIA_INFO_OFFSET 5
 
 /**
  * TIPC message buffer code
@@ -688,7 +688,7 @@ static inline void msg_set_redundant_link(struct tipc_msg *m, u32 r)
 
 static inline char *msg_media_addr(struct tipc_msg *m)
 {
-       return (char *)&m->hdr[TIPC_MEDIA_ADDR_OFFSET];
+       return (char *)&m->hdr[TIPC_MEDIA_INFO_OFFSET];
 }
 
 /*