X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsctp%2Fassociola.c;h=1a2ac8b4a01d0bd8a0f56dd1822276a7535b961e;hb=da7238bfbc1c5267bb3c9a79e03b6c296839a07e;hp=a4a86a23e6fc53135226204db717719a0c37efb3;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/net/sctp/associola.c b/net/sctp/associola.c index a4a86a23e..1a2ac8b4a 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -142,9 +142,9 @@ struct sctp_association *sctp_association_init(struct sctp_association *asoc, * socket values. */ asoc->max_retrans = sp->assocparams.sasoc_asocmaxrxt; - asoc->rto_initial = MSECS_TO_JIFFIES(sp->rtoinfo.srto_initial); - asoc->rto_max = MSECS_TO_JIFFIES(sp->rtoinfo.srto_max); - asoc->rto_min = MSECS_TO_JIFFIES(sp->rtoinfo.srto_min); + asoc->rto_initial = msecs_to_jiffies(sp->rtoinfo.srto_initial); + asoc->rto_max = msecs_to_jiffies(sp->rtoinfo.srto_max); + asoc->rto_min = msecs_to_jiffies(sp->rtoinfo.srto_min); asoc->overall_error_count = 0; @@ -170,7 +170,7 @@ struct sctp_association *sctp_association_init(struct sctp_association *asoc, asoc->max_init_attempts = sp->initmsg.sinit_max_attempts; asoc->max_init_timeo = - MSECS_TO_JIFFIES(sp->initmsg.sinit_max_init_timeo); + msecs_to_jiffies(sp->initmsg.sinit_max_init_timeo); /* Allocate storage for the ssnmap after the inbound and outbound * streams have been negotiated during Init. @@ -271,7 +271,7 @@ struct sctp_association *sctp_association_init(struct sctp_association *asoc, asoc->need_ecne = 0; - asoc->assoc_id = (sctp_assoc_t)-1; + asoc->assoc_id = (sctp_assoc_t)-1L; /* Assume that peer would support both address types unless we are * told otherwise. @@ -374,9 +374,9 @@ static void sctp_association_destroy(struct sctp_association *asoc) sctp_endpoint_put(asoc->ep); sock_put(asoc->base.sk); - if ((int)asoc->assoc_id != -1) { + if ((long)asoc->assoc_id != -1L) { spin_lock_bh(&sctp_assocs_id_lock); - idr_remove(&sctp_assocs_id, (int)asoc->assoc_id); + idr_remove(&sctp_assocs_id, (long)asoc->assoc_id); spin_unlock_bh(&sctp_assocs_id_lock); } @@ -507,7 +507,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, /* Initialize the peer's heartbeat interval based on the * sock configured value. */ - peer->hb_interval = MSECS_TO_JIFFIES(sp->paddrparam.spp_hbinterval); + peer->hb_interval = msecs_to_jiffies(sp->paddrparam.spp_hbinterval); /* Set the path max_retrans. */ peer->max_retrans = asoc->max_retrans;