patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / net / sctp / associola.c
index a4a86a2..1a2ac8b 100644 (file)
@@ -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;