lkml.org 
[lkml]   [2017]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 2/8] platform/x86: dell-smbios: Introduce a WMI-ACPI interface
Date
On Saturday 30 September 2017 02:51:27 Darren Hart wrote:
> > +DELL SMBIOS DRIVER
> > +M: Pali Rohár <pali.rohar@gmail.com>
> > +M: Mario Limonciello <mario.limonciello@dell.com>
> > +S: Maintained
> > +F: drivers/platform/x86/dell-smbios.*
>
> Pali, do you agree with this?

Yes, no problem.

> > -static int __init dell_smbios_init(void)
> > +static int dell_smbios_wmi_probe(struct wmi_device *wdev)
> > +{
> > + /* no longer need the SMI page */
> > + free_page((unsigned long)buffer);
> > +
> > + /* WMI buffer should be 32k */
> > + buffer = (void *)__get_free_pages(GFP_KERNEL, 3);
>
> Assuming PAGE_SIZE here (I know, this driver, this architecture,
> etc...). But, please use get_order() to determine number of pages
> from a linear size:
>
> __get_free_pages(GFP_KERNEL, get_order(32768));

I agree that specifying size (instead of count) explicitly lead to more
readable code.

--
Pali Rohár
pali.rohar@gmail.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-09-30 09:15    [W:0.079 / U:3.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site