From: Daniele Di Proietto Date: Mon, 3 Feb 2014 22:08:29 +0000 (-0800) Subject: openvswitch: avoid cast-qual warning in vport_priv X-Git-Tag: v3.16-rc1~27^2~201^2~9 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=07dc0602c5976cfc36ccffe5c6d73234f204d585;p=~emulex%2Finfiniband.git openvswitch: avoid cast-qual warning in vport_priv This function must cast a const value to a non const value. By adding an uintptr_t cast the warning is suppressed. To avoid the cast (proper solution) several function signatures must be changed. Signed-off-by: Daniele Di Proietto Signed-off-by: Jesse Gross --- diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h index 3e12940985a..8d721e62f38 100644 --- a/net/openvswitch/vport.h +++ b/net/openvswitch/vport.h @@ -172,7 +172,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); } /**