From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753438Ab3ETKN2 (ORCPT ); Mon, 20 May 2013 06:13:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46182 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752108Ab3ETKN1 (ORCPT ); Mon, 20 May 2013 06:13:27 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <5199AFC9.8050607@asianux.com> References: <5199AFC9.8050607@asianux.com> To: Chen Gang Cc: dhowells@redhat.com, james.l.morris@oracle.com, Rusty Russell , dmitry.kasatkin@intel.com, andriy.shevchenko@linux.intel.com, Andrew Morton , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] lib/mpi/mpicoder.c: looping issue, need stop when equal to zero, found by 'EXTRA_FLAGS=-W'. Date: Mon, 20 May 2013 11:13:17 +0100 Message-ID: <14484.1369044797@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chen Gang wrote: > For 'while' looping, need stop when 'nbytes == 0', or will cause issue. > ('nbytes' is size_t which is always bigger or equal than zero). > > The related warning: (with EXTRA_CFLAGS=-W) > lib/mpi/mpicoder.c:40:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Acked-by: David Howells