diff options
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 5027b83f1cc0..1ef29c74d85e 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -46,6 +46,8 @@ | |||
46 | * be incorporated into the next SCTP release. | 46 | * be incorporated into the next SCTP release. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
50 | |||
49 | #include <linux/module.h> | 51 | #include <linux/module.h> |
50 | #include <linux/init.h> | 52 | #include <linux/init.h> |
51 | #include <linux/netdevice.h> | 53 | #include <linux/netdevice.h> |
@@ -707,8 +709,7 @@ static int sctp_ctl_sock_init(void) | |||
707 | &init_net); | 709 | &init_net); |
708 | 710 | ||
709 | if (err < 0) { | 711 | if (err < 0) { |
710 | printk(KERN_ERR | 712 | pr_err("Failed to create the SCTP control socket\n"); |
711 | "SCTP: Failed to create the SCTP control socket.\n"); | ||
712 | return err; | 713 | return err; |
713 | } | 714 | } |
714 | return 0; | 715 | return 0; |
@@ -798,7 +799,7 @@ static void sctp_inet_skb_msgname(struct sk_buff *skb, char *msgname, int *len) | |||
798 | static int sctp_inet_af_supported(sa_family_t family, struct sctp_sock *sp) | 799 | static int sctp_inet_af_supported(sa_family_t family, struct sctp_sock *sp) |
799 | { | 800 | { |
800 | /* PF_INET only supports AF_INET addresses. */ | 801 | /* PF_INET only supports AF_INET addresses. */ |
801 | return (AF_INET == family); | 802 | return AF_INET == family; |
802 | } | 803 | } |
803 | 804 | ||
804 | /* Address matching with wildcards allowed. */ | 805 | /* Address matching with wildcards allowed. */ |
@@ -1206,7 +1207,7 @@ SCTP_STATIC __init int sctp_init(void) | |||
1206 | __get_free_pages(GFP_ATOMIC, order); | 1207 | __get_free_pages(GFP_ATOMIC, order); |
1207 | } while (!sctp_assoc_hashtable && --order > 0); | 1208 | } while (!sctp_assoc_hashtable && --order > 0); |
1208 | if (!sctp_assoc_hashtable) { | 1209 | if (!sctp_assoc_hashtable) { |
1209 | printk(KERN_ERR "SCTP: Failed association hash alloc.\n"); | 1210 | pr_err("Failed association hash alloc\n"); |
1210 | status = -ENOMEM; | 1211 | status = -ENOMEM; |
1211 | goto err_ahash_alloc; | 1212 | goto err_ahash_alloc; |
1212 | } | 1213 | } |
@@ -1220,7 +1221,7 @@ SCTP_STATIC __init int sctp_init(void) | |||
1220 | sctp_ep_hashtable = (struct sctp_hashbucket *) | 1221 | sctp_ep_hashtable = (struct sctp_hashbucket *) |
1221 | kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL); | 1222 | kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL); |
1222 | if (!sctp_ep_hashtable) { | 1223 | if (!sctp_ep_hashtable) { |
1223 | printk(KERN_ERR "SCTP: Failed endpoint_hash alloc.\n"); | 1224 | pr_err("Failed endpoint_hash alloc\n"); |
1224 | status = -ENOMEM; | 1225 | status = -ENOMEM; |
1225 | goto err_ehash_alloc; | 1226 | goto err_ehash_alloc; |
1226 | } | 1227 | } |
@@ -1239,7 +1240,7 @@ SCTP_STATIC __init int sctp_init(void) | |||
1239 | __get_free_pages(GFP_ATOMIC, order); | 1240 | __get_free_pages(GFP_ATOMIC, order); |
1240 | } while (!sctp_port_hashtable && --order > 0); | 1241 | } while (!sctp_port_hashtable && --order > 0); |
1241 | if (!sctp_port_hashtable) { | 1242 | if (!sctp_port_hashtable) { |
1242 | printk(KERN_ERR "SCTP: Failed bind hash alloc."); | 1243 | pr_err("Failed bind hash alloc\n"); |
1243 | status = -ENOMEM; | 1244 | status = -ENOMEM; |
1244 | goto err_bhash_alloc; | 1245 | goto err_bhash_alloc; |
1245 | } | 1246 | } |
@@ -1248,8 +1249,7 @@ SCTP_STATIC __init int sctp_init(void) | |||
1248 | INIT_HLIST_HEAD(&sctp_port_hashtable[i].chain); | 1249 | INIT_HLIST_HEAD(&sctp_port_hashtable[i].chain); |
1249 | } | 1250 | } |
1250 | 1251 | ||
1251 | printk(KERN_INFO "SCTP: Hash tables configured " | 1252 | pr_info("Hash tables configured (established %d bind %d)\n", |
1252 | "(established %d bind %d)\n", | ||
1253 | sctp_assoc_hashsize, sctp_port_hashsize); | 1253 | sctp_assoc_hashsize, sctp_port_hashsize); |
1254 | 1254 | ||
1255 | /* Disable ADDIP by default. */ | 1255 | /* Disable ADDIP by default. */ |
@@ -1290,8 +1290,7 @@ SCTP_STATIC __init int sctp_init(void) | |||
1290 | 1290 | ||
1291 | /* Initialize the control inode/socket for handling OOTB packets. */ | 1291 | /* Initialize the control inode/socket for handling OOTB packets. */ |
1292 | if ((status = sctp_ctl_sock_init())) { | 1292 | if ((status = sctp_ctl_sock_init())) { |
1293 | printk (KERN_ERR | 1293 | pr_err("Failed to initialize the SCTP control sock\n"); |
1294 | "SCTP: Failed to initialize the SCTP control sock.\n"); | ||
1295 | goto err_ctl_sock_init; | 1294 | goto err_ctl_sock_init; |
1296 | } | 1295 | } |
1297 | 1296 | ||