Commit 41fef0ee7b8f3fe3f3dd2ddc9b170f3d88bce595
Committed by
David S. Miller
1 parent
c800578510
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 40 additions and 8 deletions Side-by-side Diff
include/net/xfrm.h
... | ... | @@ -648,14 +648,46 @@ |
648 | 648 | extern void xfrm_audit_state_icvfail(struct xfrm_state *x, |
649 | 649 | struct sk_buff *skb, u8 proto); |
650 | 650 | #else |
651 | -#define xfrm_audit_policy_add(x, r, a, se, s) do { ; } while (0) | |
652 | -#define xfrm_audit_policy_delete(x, r, a, se, s) do { ; } while (0) | |
653 | -#define xfrm_audit_state_add(x, r, a, se, s) do { ; } while (0) | |
654 | -#define xfrm_audit_state_delete(x, r, a, se, s) do { ; } while (0) | |
655 | -#define xfrm_audit_state_replay_overflow(x, s) do { ; } while (0) | |
656 | -#define xfrm_audit_state_notfound_simple(s, f) do { ; } while (0) | |
657 | -#define xfrm_audit_state_notfound(s, f, sp, sq) do { ; } while (0) | |
658 | -#define xfrm_audit_state_icvfail(x, s, p) do { ; } while (0) | |
651 | + | |
652 | +static inline void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, | |
653 | + u32 auid, u32 ses, u32 secid) | |
654 | +{ | |
655 | +} | |
656 | + | |
657 | +static inline void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, | |
658 | + u32 auid, u32 ses, u32 secid) | |
659 | +{ | |
660 | +} | |
661 | + | |
662 | +static inline void xfrm_audit_state_add(struct xfrm_state *x, int result, | |
663 | + u32 auid, u32 ses, u32 secid) | |
664 | +{ | |
665 | +} | |
666 | + | |
667 | +static inline void xfrm_audit_state_delete(struct xfrm_state *x, int result, | |
668 | + u32 auid, u32 ses, u32 secid) | |
669 | +{ | |
670 | +} | |
671 | + | |
672 | +static inline void xfrm_audit_state_replay_overflow(struct xfrm_state *x, | |
673 | + struct sk_buff *skb) | |
674 | +{ | |
675 | +} | |
676 | + | |
677 | +static inline void xfrm_audit_state_notfound_simple(struct sk_buff *skb, | |
678 | + u16 family) | |
679 | +{ | |
680 | +} | |
681 | + | |
682 | +static inline void xfrm_audit_state_notfound(struct sk_buff *skb, u16 family, | |
683 | + __be32 net_spi, __be32 net_seq) | |
684 | +{ | |
685 | +} | |
686 | + | |
687 | +static inline void xfrm_audit_state_icvfail(struct xfrm_state *x, | |
688 | + struct sk_buff *skb, u8 proto) | |
689 | +{ | |
690 | +} | |
659 | 691 | #endif /* CONFIG_AUDITSYSCALL */ |
660 | 692 | |
661 | 693 | static inline void xfrm_pol_hold(struct xfrm_policy *policy) |