Re: [RESEND][PATCH v1] ACPI / property: Switch to bitmap_zalloc()

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

 



On Thu, Aug 30, 2018 at 02:08:39PM +0300, Andy Shevchenko wrote:
> Switch to bitmap_zalloc() to show clearly what we are allocating.
> Besides that it returns pointer of bitmap type instead of opaque void *.
> 

Please, ignore this, I forgot to add Lukas tag. I sent v2.

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/acpi/x86/apple.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/x86/apple.c b/drivers/acpi/x86/apple.c
> index 51b4cf9f25da..bb1984f6c9fe 100644
> --- a/drivers/acpi/x86/apple.c
> +++ b/drivers/acpi/x86/apple.c
> @@ -62,7 +62,7 @@ void acpi_extract_apple_properties(struct acpi_device *adev)
>  	if (!numprops)
>  		goto out_free;
>  
> -	valid = kcalloc(BITS_TO_LONGS(numprops), sizeof(long), GFP_KERNEL);
> +	valid = bitmap_zalloc(numprops, GFP_KERNEL);
>  	if (!valid)
>  		goto out_free;
>  
> @@ -137,5 +137,5 @@ void acpi_extract_apple_properties(struct acpi_device *adev)
>  
>  out_free:
>  	ACPI_FREE(props);
> -	kfree(valid);
> +	bitmap_free(valid);
>  }
> -- 
> 2.18.0
> 

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux