• Fernando Luis Vzquez Cao's avatar
    [PATCH] Replace local_save_flags+local_irq_disable with · 2b94ab2f
    Fernando Luis Vzquez Cao authored
    The combination of "local_save_flags" and "local_irq_disable" seems to be
    equivalent to "local_irq_save" (see code snips below). Consequently, replace
    occurrences of local_save_flags+local_irq_disable with local_irq_save.
    
    * local_irq_save
    #define raw_local_irq_save(flags) \
                    do { (flags) = __raw_local_irq_save(); } while (0)
    
    static inline unsigned long __raw_local_irq_save(void)
    {
            unsigned long flags = __raw_local_save_flags();
    
            raw_local_irq_disable();
    
            return flags;
    }
    
    * local_save_flags
    #define raw_local_save_flags(flags) \
                    do { (flags) = __raw_local_save_flags(); } while (0)
    Signed-off-by: default avatarFernando Vazquez <fernando@intellilink.co.jp>
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    2b94ab2f
genapic_flat.c 4.39 KB