aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-05-04 00:03:01 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-04 00:03:01 -0400
commit41fef0ee7b8f3fe3f3dd2ddc9b170f3d88bce595 (patch)
treead828bea28e07bc5b9bc41cc40ec681e811171af /include/net
parentc8005785102e5b67ecf213f06a3d6c001f6f8cb4 (diff)
xfrm: convert empty xfrm_audit_* macros to functions
it removes these warnings when CONFIG_AUDITSYSCALL is unset: net/xfrm/xfrm_user.c: In function 'xfrm_add_sa': net/xfrm/xfrm_user.c:412: warning: unused variable 'sid' net/xfrm/xfrm_user.c:411: warning: unused variable 'sessionid' net/xfrm/xfrm_user.c:410: warning: unused variable 'loginuid' net/xfrm/xfrm_user.c: In function 'xfrm_del_sa': net/xfrm/xfrm_user.c:485: warning: unused variable 'sid' net/xfrm/xfrm_user.c:484: warning: unused variable 'sessionid' net/xfrm/xfrm_user.c:483: warning: unused variable 'loginuid' net/xfrm/xfrm_user.c: In function 'xfrm_add_policy': net/xfrm/xfrm_user.c:1132: warning: unused variable 'sid' net/xfrm/xfrm_user.c:1131: warning: unused variable 'sessionid' net/xfrm/xfrm_user.c:1130: warning: unused variable 'loginuid' net/xfrm/xfrm_user.c: In function 'xfrm_get_policy': net/xfrm/xfrm_user.c:1382: warning: unused variable 'sid' net/xfrm/xfrm_user.c:1381: warning: unused variable 'sessionid' net/xfrm/xfrm_user.c:1380: warning: unused variable 'loginuid' net/xfrm/xfrm_user.c: In function 'xfrm_add_pol_expire': net/xfrm/xfrm_user.c:1620: warning: unused variable 'sid' net/xfrm/xfrm_user.c:1619: warning: unused variable 'sessionid' net/xfrm/xfrm_user.c:1618: warning: unused variable 'loginuid' net/xfrm/xfrm_user.c: In function 'xfrm_add_sa_expire': net/xfrm/xfrm_user.c:1658: warning: unused variable 'sid' net/xfrm/xfrm_user.c:1657: warning: unused variable 'sessionid' net/xfrm/xfrm_user.c:1656: warning: unused variable 'loginuid' Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/xfrm.h48
1 files changed, 40 insertions, 8 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index d1350bcccb03..2933d7474a79 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -648,14 +648,46 @@ extern void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family,
648extern void xfrm_audit_state_icvfail(struct xfrm_state *x, 648extern void xfrm_audit_state_icvfail(struct xfrm_state *x,
649 struct sk_buff *skb, u8 proto); 649 struct sk_buff *skb, u8 proto);
650#else 650#else
651#define xfrm_audit_policy_add(x, r, a, se, s) do { ; } while (0) 651
652#define xfrm_audit_policy_delete(x, r, a, se, s) do { ; } while (0) 652static inline void xfrm_audit_policy_add(struct xfrm_policy *xp, int result,
653#define xfrm_audit_state_add(x, r, a, se, s) do { ; } while (0) 653 u32 auid, u32 ses, u32 secid)
654#define xfrm_audit_state_delete(x, r, a, se, s) do { ; } while (0) 654{
655#define xfrm_audit_state_replay_overflow(x, s) do { ; } while (0) 655}
656#define xfrm_audit_state_notfound_simple(s, f) do { ; } while (0) 656
657#define xfrm_audit_state_notfound(s, f, sp, sq) do { ; } while (0) 657static inline void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result,
658#define xfrm_audit_state_icvfail(x, s, p) do { ; } while (0) 658 u32 auid, u32 ses, u32 secid)
659{
660}
661
662static inline void xfrm_audit_state_add(struct xfrm_state *x, int result,
663 u32 auid, u32 ses, u32 secid)
664{
665}
666
667static inline void xfrm_audit_state_delete(struct xfrm_state *x, int result,
668 u32 auid, u32 ses, u32 secid)
669{
670}
671
672static inline void xfrm_audit_state_replay_overflow(struct xfrm_state *x,
673 struct sk_buff *skb)
674{
675}
676
677static inline void xfrm_audit_state_notfound_simple(struct sk_buff *skb,
678 u16 family)
679{
680}
681
682static inline void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family,
683 __be32 net_spi, __be32 net_seq)
684{
685}
686
687static inline void xfrm_audit_state_icvfail(struct xfrm_state *x,
688 struct sk_buff *skb, u8 proto)
689{
690}
659#endif /* CONFIG_AUDITSYSCALL */ 691#endif /* CONFIG_AUDITSYSCALL */
660 692
661static inline void xfrm_pol_hold(struct xfrm_policy *policy) 693static inline void xfrm_pol_hold(struct xfrm_policy *policy)