• Sam Bobroff's avatar
    powerpc/eeh: Clarify arguments to eeh_reset_device() · 5fd13460
    Sam Bobroff authored
    It is currently difficult to understand the behaviour of
    eeh_reset_device() due to the way it's parameters are used. In
    particular, when 'bus' is NULL, it's value is still necessary so the
    same value is looked up again locally under a different name
    ('frozen_bus') but behaviour is changed.
    
    To clarify this, add a new parameter 'driver_eeh_aware', and have the
    caller set it when it would have passed NULL for 'bus' and always pass
    a value for 'bus'. Then change any test that was on 'bus' to one on
    '!driver_eeh_aware' and replace uses of 'frozen_bus' with 'bus'.
    
    Also update the function's comment.
    
    This should not change behaviour.
    Signed-off-by: default avatarSam Bobroff <sam.bobroff@au1.ibm.com>
    Reviewed-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    5fd13460
eeh_driver.c 28 KB