mlxsw: item: Make src arg of memcpy_to helper const
authorJiri Pirko <jiri@mellanox.com>
Fri, 16 Oct 2015 12:01:26 +0000 (14:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Oct 2015 14:15:12 +0000 (07:15 -0700)
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/item.h

index ffd55d030ce28dbf902f6990a0dfb7f96b08a766..5a5e737d52bf9e91a8b6cd9692c4d733976d9a0b 100644 (file)
@@ -176,7 +176,7 @@ static inline void __mlxsw_item_memcpy_from(char *buf, char *dst,
        memcpy(dst, &buf[item->offset], item->size.bytes);
 }
 
-static inline void __mlxsw_item_memcpy_to(char *buf, char *src,
+static inline void __mlxsw_item_memcpy_to(char *buf, const char *src,
                                          struct mlxsw_item *item)
 {
        memcpy(&buf[item->offset], src, item->size.bytes);
@@ -374,7 +374,7 @@ mlxsw_##_type##_##_cname##_##_iname##_memcpy_from(char *buf, char *dst)             \
        __mlxsw_item_memcpy_from(buf, dst, &__ITEM_NAME(_type, _cname, _iname));\
 }                                                                              \
 static inline void                                                             \
-mlxsw_##_type##_##_cname##_##_iname##_memcpy_to(char *buf, char *src)          \
+mlxsw_##_type##_##_cname##_##_iname##_memcpy_to(char *buf, const char *src)    \
 {                                                                              \
        __mlxsw_item_memcpy_to(buf, src, &__ITEM_NAME(_type, _cname, _iname));  \
 }