From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: "Gustavo F. Padovan" Date: Thu, 29 Sep 2011 16:28:47 -0300 From: Gustavo Padovan To: Dan Carpenter Cc: Marcel Holtmann , linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch] bluetooth: hci_ll: clean up types a bit Message-ID: <20110929192847.GD2605@joana> References: <20110926061412.GA11832@elgon.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20110926061412.GA11832@elgon.mountain> List-ID: Hi Dan, * Dan Carpenter [2011-09-26 09:14:12 +0300]: > I'm doing an audit of places where min_t() casting truncates a > variable such as: > len = min_t(unsigned int, ll->rx_count, count); > Here ll->rx_count is unsigned long, but we cast it to unsigned int > and lose the significant bits. > > Looking at the code ->rx_count is never more than 256 so we could > just make it an int. Where is this 256 maximum? I'm not seeing it? Gustavo