From: Chuck Lever Date: Mon, 14 Apr 2008 16:27:45 +0000 (-0400) Subject: SUNRPC: Use unsigned index when looping over arrays X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=50c8bb13eaaf345caf2e7966667ba1d3e4d68af2;p=linux-beck.git SUNRPC: Use unsigned index when looping over arrays Clean up: Suppress a harmless compiler warning in the RPC server related to array indices. ARRAY_SIZE() returns a size_t, so use unsigned type for a loop index when looping over arrays. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields --- diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index e7b716c76366..bf46186ddf9f 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -534,8 +534,9 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size) static void svc_release_buffer(struct svc_rqst *rqstp) { - int i; - for (i=0; irq_pages); i++) + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(rqstp->rq_pages); i++) if (rqstp->rq_pages[i]) put_page(rqstp->rq_pages[i]); }