• Alex Elder's avatar
    net: ipa: don't reuse variable names · 9eefd2fb
    Alex Elder authored
    In ipa_endpoint_init_hdr(), as well as ipa_endpoint_init_hdr_ext(),
    a top-level automatic variable named "offset" is used to represent
    the offset of a register.
    
    However, deeper within each of those functions is *another*
    definition of a local variable with the same name, representing
    something else.  Scoping rules ensure the result is what was
    intended, but this variable name reuse is bad practice and makes
    the code confusing.
    
    Fix this by naming the inner variable "off".  Use "off" instead of
    "checksum_offset" in ipa_endpoint_init_cfg() for consistency.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    9eefd2fb
ipa_endpoint.c 53.7 KB