

net/sctp/sm_make_chunk.c: In function `sctp_process_init':
net/sctp/sm_make_chunk.c:1850: warning: comparison between pointer and integer
*** Warning: "idr_full" [net/sctp/sctp.ko] undefined!


---

 25-akpm/lib/idr.c                |    1 +
 25-akpm/net/sctp/sm_make_chunk.c |   11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff -puN net/sctp/sm_make_chunk.c~idr-overflow-fixes-fix net/sctp/sm_make_chunk.c
--- 25/net/sctp/sm_make_chunk.c~idr-overflow-fixes-fix	2004-05-07 22:41:29.736990384 -0700
+++ 25-akpm/net/sctp/sm_make_chunk.c	2004-05-07 22:41:29.743989320 -0700
@@ -1834,7 +1834,7 @@ int sctp_process_init(struct sctp_associ
 	/* Allocate storage for the negotiated streams if it is not a temporary 	 * association.
 	 */
 	if (!asoc->temp) {
-		sctp_assoc_t assoc_id;
+		int assoc_id;
 
 		asoc->ssnmap = sctp_ssnmap_new(asoc->c.sinit_max_instreams,
 					       asoc->c.sinit_num_ostreams, gfp);
@@ -1845,17 +1845,16 @@ int sctp_process_init(struct sctp_associ
 			if (unlikely(!idr_pre_get(&sctp_assocs_id, gfp)))
 				goto clean_up;
 			spin_lock_bh(&sctp_assocs_id_lock);
-			assoc_id = (sctp_assoc_t)idr_get_new(&sctp_assocs_id,
-							     (void *)asoc);
-			if ((assoc_id == -1) && idr_full(&sctp_assocs_id)) {
+			assoc_id = idr_get_new(&sctp_assocs_id, (void *)asoc);
+			if (assoc_id == -1 && idr_full(&sctp_assocs_id)) {
 				spin_unlock_bh(&sctp_assocs_id_lock);
 				goto clean_up;
 			}
 
 			spin_unlock_bh(&sctp_assocs_id_lock);
-		} while (unlikely((int)assoc_id == -1));
+		} while (unlikely(assoc_id == -1));
 
-		asoc->assoc_id = assoc_id;
+		asoc->assoc_id = (sctp_assoc_t)assoc_id;
 	}
 
 	/* ADDIP Section 4.1 ASCONF Chunk Procedures
diff -puN lib/idr.c~idr-overflow-fixes-fix lib/idr.c
--- 25/lib/idr.c~idr-overflow-fixes-fix	2004-05-07 22:41:29.738990080 -0700
+++ 25-akpm/lib/idr.c	2004-05-07 22:41:29.743989320 -0700
@@ -286,6 +286,7 @@ int idr_full(struct idr *idp)
 	return ((idp->layers >= MAX_LEVEL)
 		&& (idp->top->bitmap == TOP_LEVEL_FULL));
 }
+EXPORT_SYMBOL(idr_full);
 
 int idr_get_new(struct idr *idp, void *ptr)
 {

_
