net: xfrm: xfrm_policy: silence compiler warning
authorYing Xue <ying.xue@windriver.com>
Wed, 8 Jan 2014 02:26:39 +0000 (10:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jan 2014 03:45:26 +0000 (22:45 -0500)
Fix below compiler warning:

net/xfrm/xfrm_policy.c:1644:12: warning: ‘xfrm_dst_alloc_copy’ defined but not used [-Wunused-function]

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_policy.c

index b390446..e205c4b 100644 (file)
@@ -1641,6 +1641,7 @@ free_dst:
        goto out;
 }
 
+#ifdef CONFIG_XFRM_SUB_POLICY
 static int xfrm_dst_alloc_copy(void **target, const void *src, int size)
 {
        if (!*target) {
@@ -1652,6 +1653,7 @@ static int xfrm_dst_alloc_copy(void **target, const void *src, int size)
        memcpy(*target, src, size);
        return 0;
 }
+#endif
 
 static int xfrm_dst_update_parent(struct dst_entry *dst,
                                  const struct xfrm_selector *sel)