Powered by Linux
Re: [PATCH] check_ida_alloc: Add a new check to spot invalid conversion from ida_simple_get() — Semantic Matching Tool

Re: [PATCH] check_ida_alloc: Add a new check to spot invalid conversion from ida_simple_get()

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

 



On Thu, Jun 09, 2022 at 10:33:40PM +0200, Christophe JAILLET wrote:
> The 'max' parameter of ida_alloc_max() and ida_alloc_range() is not
> interpreted as it was in the deprecated ida_simple_get().
> 
> The 'max' value in the new functions is inclusive but it was exclusive
> before. So, in older code, this parameter was often a power of 2, such as
> 1 << 16, so that the maximum possible value was 0xffff.
> 
> Now a power of 2 value is spurious.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> Most of the code is stolen from smatch_power_of_two.c
> ---

Thanks, applied!

regards,
dan carpenter




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux