Re: [patch] bluetooth: hci_ll: clean up types a bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

* Dan Carpenter <dan.carpenter@xxxxxxxxxx> [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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux