From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [PATCH] block: make nr_iovecs unsigned in bio_alloc_bioset() To: Dan Carpenter References: <20170323102455.GA20154@mwanda> Cc: Ming Lei , Mike Christie , Kent Overstreet , Hannes Reinecke , Chaitanya Kulkarni , Mike Snitzer , Adrian Hunter , linux-block@vger.kernel.org, kernel-janitors@vger.kernel.org From: Jens Axboe Message-ID: <0a6f04c4-7006-397f-21ac-4e8b35363a8b@fb.com> Date: Thu, 23 Mar 2017 08:16:35 -0600 MIME-Version: 1.0 In-Reply-To: <20170323102455.GA20154@mwanda> Content-Type: text/plain; charset=windows-1252 List-ID: On 03/23/2017 04:24 AM, Dan Carpenter wrote: > There isn't a bug here, but Smatch is not smart enough to know that > "nr_iovecs" can't be negative so it complains about underflows. > Really, it's slightly cleaner to make this parameter unsigned. Applied, thanks Dan. -- Jens Axboe From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Date: Thu, 23 Mar 2017 14:16:35 +0000 Subject: Re: [PATCH] block: make nr_iovecs unsigned in bio_alloc_bioset() Message-Id: <0a6f04c4-7006-397f-21ac-4e8b35363a8b@fb.com> List-Id: References: <20170323102455.GA20154@mwanda> In-Reply-To: <20170323102455.GA20154@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: Ming Lei , Mike Christie , Kent Overstreet , Hannes Reinecke , Chaitanya Kulkarni , Mike Snitzer , Adrian Hunter , linux-block@vger.kernel.org, kernel-janitors@vger.kernel.org On 03/23/2017 04:24 AM, Dan Carpenter wrote: > There isn't a bug here, but Smatch is not smart enough to know that > "nr_iovecs" can't be negative so it complains about underflows. > Really, it's slightly cleaner to make this parameter unsigned. Applied, thanks Dan. -- Jens Axboe