lkml.org 
[lkml]   [2018]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v13 2/6] x86/boot: Introduce get_acpi_rsdp() to parse RSDP in cmdline from KEXEC
On Thu, Dec 13, 2018 at 08:29:50PM +0100, Borislav Petkov wrote:
> On Thu, Dec 13, 2018 at 02:25:30PM -0500, Masayoshi Mizuma wrote:
> > > + len = cmdline_find_option("acpi_rsdp", val, MAX_ADDRESS_LENGTH+1);
> >
> > sizeof() is better here.
> >
> > len = cmdline_find_option("acpi_rsdp", val, sizeof(var));
>
> Why is it better?
>
> That makes you go look for the "val" variable and see what it's size is.
> MAX_ADDRESS_LENGTH+1 is OTOH explicit.

Ah, thanks, make sense.

- Masa

\
 
 \ /
  Last update: 2018-12-13 20:38    [W:0.098 / U:3.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site