On Thu, Aug 2, 2018 at 3:04 PM, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > Switch to bitmap_zalloc() to show clearly what we are allocating. > Besides that it returns pointer of bitmap type instead of opaque void *. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > --- > > - requires immutable branch [1] to be pulled first > [1]: git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git ib/4.17-bitmap I don't really think that this is super-important, so I'd rather wait for the Dmitry's branch to be merged before applying this. Please resend at that time. > > 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); > } > -- -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html