lkml.org 
[lkml]   [2020]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] [v2] x86: apic: avoid -Wshadow warning in header
    From
    Date
    On 29/10/20 17:56, Arvind Sankar wrote:
    >> For those two just add:
    >> struct apic *apic = x86_system_apic;
    >> before all the assignments.
    >> Less churn and much better code.
    >>
    > Why would it be better code?
    >

    I think he means the compiler produces better code, because it won't
    read the global variable repeatedly. Not sure if that's true,(*) but I
    think I do prefer that version if Arnd wants to do that tweak.

    Paolo

    (*) if it is, it might also be due to Linux using -fno-strict-aliasing

    \
     
     \ /
      Last update: 2020-10-29 18:00    [W:3.744 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site