aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/structs.h
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2005-10-07 02:46:04 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-08 18:00:57 -0400
commitdd0fc66fb33cd610bc1a5db8a5e232d34879b4d7 (patch)
tree51f96a9db96293b352e358f66032e1f4ff79fafb /include/net/sctp/structs.h
parent3b0e77bd144203a507eb191f7117d2c5004ea1de (diff)
[PATCH] gfp flags annotations - part 1
- added typedef unsigned int __nocast gfp_t; - replaced __nocast uses for gfp flags with gfp_t - it gives exactly the same warnings as far as sparse is concerned, doesn't change generated code (from gcc point of view we replaced unsigned int with typedef) and documents what's going on far better. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r--include/net/sctp/structs.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 994009bbe3b4..9c385b6417c7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -446,7 +446,7 @@ struct sctp_ssnmap {
446}; 446};
447 447
448struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, 448struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
449 unsigned int __nocast gfp); 449 gfp_t gfp);
450void sctp_ssnmap_free(struct sctp_ssnmap *map); 450void sctp_ssnmap_free(struct sctp_ssnmap *map);
451void sctp_ssnmap_clear(struct sctp_ssnmap *map); 451void sctp_ssnmap_clear(struct sctp_ssnmap *map);
452 452
@@ -947,7 +947,7 @@ struct sctp_transport {
947}; 947};
948 948
949struct sctp_transport *sctp_transport_new(const union sctp_addr *, 949struct sctp_transport *sctp_transport_new(const union sctp_addr *,
950 unsigned int __nocast); 950 gfp_t);
951void sctp_transport_set_owner(struct sctp_transport *, 951void sctp_transport_set_owner(struct sctp_transport *,
952 struct sctp_association *); 952 struct sctp_association *);
953void sctp_transport_route(struct sctp_transport *, union sctp_addr *, 953void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
@@ -1095,10 +1095,10 @@ void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port);
1095void sctp_bind_addr_free(struct sctp_bind_addr *); 1095void sctp_bind_addr_free(struct sctp_bind_addr *);
1096int sctp_bind_addr_copy(struct sctp_bind_addr *dest, 1096int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
1097 const struct sctp_bind_addr *src, 1097 const struct sctp_bind_addr *src,
1098 sctp_scope_t scope, unsigned int __nocast gfp, 1098 sctp_scope_t scope, gfp_t gfp,
1099 int flags); 1099 int flags);
1100int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, 1100int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
1101 unsigned int __nocast gfp); 1101 gfp_t gfp);
1102int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); 1102int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
1103int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, 1103int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
1104 struct sctp_sock *); 1104 struct sctp_sock *);
@@ -1108,9 +1108,9 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,
1108 struct sctp_sock *opt); 1108 struct sctp_sock *opt);
1109union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, 1109union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp,
1110 int *addrs_len, 1110 int *addrs_len,
1111 unsigned int __nocast gfp); 1111 gfp_t gfp);
1112int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, 1112int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len,
1113 __u16 port, unsigned int __nocast gfp); 1113 __u16 port, gfp_t gfp);
1114 1114
1115sctp_scope_t sctp_scope(const union sctp_addr *); 1115sctp_scope_t sctp_scope(const union sctp_addr *);
1116int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope); 1116int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope);
@@ -1239,7 +1239,7 @@ static inline struct sctp_endpoint *sctp_ep(struct sctp_ep_common *base)
1239} 1239}
1240 1240
1241/* These are function signatures for manipulating endpoints. */ 1241/* These are function signatures for manipulating endpoints. */
1242struct sctp_endpoint *sctp_endpoint_new(struct sock *, unsigned int __nocast); 1242struct sctp_endpoint *sctp_endpoint_new(struct sock *, gfp_t);
1243void sctp_endpoint_free(struct sctp_endpoint *); 1243void sctp_endpoint_free(struct sctp_endpoint *);
1244void sctp_endpoint_put(struct sctp_endpoint *); 1244void sctp_endpoint_put(struct sctp_endpoint *);
1245void sctp_endpoint_hold(struct sctp_endpoint *); 1245void sctp_endpoint_hold(struct sctp_endpoint *);
@@ -1260,7 +1260,7 @@ int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t,
1260 struct sctp_chunk **err_chunk); 1260 struct sctp_chunk **err_chunk);
1261int sctp_process_init(struct sctp_association *, sctp_cid_t cid, 1261int sctp_process_init(struct sctp_association *, sctp_cid_t cid,
1262 const union sctp_addr *peer, 1262 const union sctp_addr *peer,
1263 sctp_init_chunk_t *init, unsigned int __nocast gfp); 1263 sctp_init_chunk_t *init, gfp_t gfp);
1264__u32 sctp_generate_tag(const struct sctp_endpoint *); 1264__u32 sctp_generate_tag(const struct sctp_endpoint *);
1265__u32 sctp_generate_tsn(const struct sctp_endpoint *); 1265__u32 sctp_generate_tsn(const struct sctp_endpoint *);
1266 1266
@@ -1723,7 +1723,7 @@ static inline struct sctp_association *sctp_assoc(struct sctp_ep_common *base)
1723 1723
1724struct sctp_association * 1724struct sctp_association *
1725sctp_association_new(const struct sctp_endpoint *, const struct sock *, 1725sctp_association_new(const struct sctp_endpoint *, const struct sock *,
1726 sctp_scope_t scope, unsigned int __nocast gfp); 1726 sctp_scope_t scope, gfp_t gfp);
1727void sctp_association_free(struct sctp_association *); 1727void sctp_association_free(struct sctp_association *);
1728void sctp_association_put(struct sctp_association *); 1728void sctp_association_put(struct sctp_association *);
1729void sctp_association_hold(struct sctp_association *); 1729void sctp_association_hold(struct sctp_association *);
@@ -1739,7 +1739,7 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
1739 const union sctp_addr *laddr); 1739 const union sctp_addr *laddr);
1740struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *, 1740struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *,
1741 const union sctp_addr *address, 1741 const union sctp_addr *address,
1742 const unsigned int __nocast gfp, 1742 const gfp_t gfp,
1743 const int peer_state); 1743 const int peer_state);
1744void sctp_assoc_del_peer(struct sctp_association *asoc, 1744void sctp_assoc_del_peer(struct sctp_association *asoc,
1745 const union sctp_addr *addr); 1745 const union sctp_addr *addr);
@@ -1764,10 +1764,10 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *, unsigned);
1764void sctp_assoc_set_primary(struct sctp_association *, 1764void sctp_assoc_set_primary(struct sctp_association *,
1765 struct sctp_transport *); 1765 struct sctp_transport *);
1766int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, 1766int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *,
1767 unsigned int __nocast); 1767 gfp_t);
1768int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, 1768int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
1769 struct sctp_cookie*, 1769 struct sctp_cookie*,
1770 unsigned int __nocast gfp); 1770 gfp_t gfp);
1771 1771
1772int sctp_cmp_addr_exact(const union sctp_addr *ss1, 1772int sctp_cmp_addr_exact(const union sctp_addr *ss1,
1773 const union sctp_addr *ss2); 1773 const union sctp_addr *ss2);