netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Daniele Di Proietto
	<daniele.di.proietto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH net-next 03/12] openvswitch: avoid cast-qual warning in vport_priv
Date: Fri, 16 May 2014 14:07:30 -0700	[thread overview]
Message-ID: <1400274459-56304-4-git-send-email-jesse@nicira.com> (raw)
In-Reply-To: <1400274459-56304-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

From: Daniele Di Proietto <daniele.di.proietto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
 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

  parent reply	other threads:[~2014-05-16 21:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 21:07 [GIT net-next] Open vSwitch Jesse Gross
     [not found] ` <1400274459-56304-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-05-16 21:07   ` [PATCH net-next 01/12] openvswitch: use const in some local vars and casts Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 02/12] openvswitch: avoid warnings in vport_from_priv Jesse Gross
2014-05-16 21:07   ` Jesse Gross [this message]
2014-05-16 21:07   ` [PATCH net-next 04/12] openvswitch: Added (unsigned long long) cast in printf Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 05/12] openvswitch: Use net_ratelimit in OVS_NLERR Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 06/12] openvswitch: flow_netlink: Use pr_fmt to OVS_NLERR output Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 07/12] openvswitch: Use ether_addr_copy Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 08/12] openvswitch: Remove 5-tuple optimization Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 09/12] openvswitch: Per NUMA node flow stats Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 10/12] openvswitch: Fix output of SCTP mask Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 11/12] openvswitch: Use TCP flags in the flow key for stats Jesse Gross
2014-05-16 21:07   ` [PATCH net-next 12/12] net/openvswitch: Use with RCU_INIT_POINTER(x, NULL) in vport-gre.c Jesse Gross
2014-05-16 21:22   ` [GIT net-next] Open vSwitch David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400274459-56304-4-git-send-email-jesse@nicira.com \
    --to=jesse-l0m0p4e3n4lqt0dzr+alfa@public.gmane.org \
    --cc=daniele.di.proietto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).