On 01/13/2013 01:41 PM, Borislav Petkov wrote:
>> diff --git a/arch/x86/boot/compressed/cmdline.c 
>> b/arch/x86/boot/compressed/cmdline.c
>> index b4c913c..bffd73b 100644
>> --- a/arch/x86/boot/compressed/cmdline.c
>> +++ b/arch/x86/boot/compressed/cmdline.c
>> @@ -17,6 +17,8 @@ static unsigned long get_cmd_line_ptr(void)
>>  {
>>      unsigned long cmd_line_ptr = real_mode->hdr.cmd_line_ptr;
>>  
>> +    cmd_line_ptr |= (u64)real_mode->ext_cmd_line_ptr << 32;
>> +
>>      return cmd_line_ptr;
>>  }
> 
> On 32-bit, this unsigned long cmd_line_ptr is 4 bytes and the OR doesn't
> have any effect on the final result. You probably want to do:
> 
> #ifdef CONFIG_64BIT
>       cmd_line_ptr |= (u64)real_mode->ext_cmd_line_ptr << 32;
> #endif
> 
> right?
> 

Actually, on 32 bits the compiler will simply drop the statement on the
floor, no #ifdef required.  If gcc outputs a warning we should do
something about it, otherwise we can just plain ignore it.

        -hpa


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to