[linux-yocto] [PATCH 03/29] openvswitch: avoid cast-qual warning in vport_priv
zhe.he at windriver.com
zhe.he at windriver.com
Wed Aug 20 22:50:43 PDT 2014
From: Daniele Di Proietto <daniele.di.proietto at gmail.com>
commit 07dc0602c5976cfc36ccffe5c6d73234f204d585 upstream
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 <daniele.di.proietto at gmail.com>
Signed-off-by: Jesse Gross <jesse at nicira.com>
Signed-off-by: He Zhe <zhe.he at windriver.com>
---
net/openvswitch/vport.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
index 3e12940..8d721e6 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);
}
/**
--
1.9.1
More information about the linux-yocto
mailing list