X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Fvport.h;h=18b723ee8068421e2693710ec4b6d90c40c4b47f;hb=5de43a606c949dbb74272d5b09627ddd5f64b06b;hp=2cf2b183bca936081eebfe46c010d13b261276e2;hpb=c31964ce3a27bcbc7457346c8d14aa0e83ab72c8;p=sliver-openvswitch.git diff --git a/datapath/vport.h b/datapath/vport.h index 2cf2b183b..18b723ee8 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -173,7 +173,7 @@ void ovs_vport_deferred_free(struct vport *vport); */ static inline void *vport_priv(const struct vport *vport) { - return (u8 *)vport + ALIGN(sizeof(struct vport), VPORT_ALIGN); + return (u8 *)(uintptr_t)vport + ALIGN(sizeof(struct vport), VPORT_ALIGN); } /** @@ -186,9 +186,9 @@ static inline void *vport_priv(const struct vport *vport) * the result of a hash table lookup. @priv must point to the start of the * private data area. */ -static inline struct vport *vport_from_priv(const void *priv) +static inline struct vport *vport_from_priv(void *priv) { - return (struct vport *)(priv - ALIGN(sizeof(struct vport), VPORT_ALIGN)); + return (struct vport *)((u8 *)priv - ALIGN(sizeof(struct vport), VPORT_ALIGN)); } void ovs_vport_receive(struct vport *, struct sk_buff *,