• Chen, Kenneth W's avatar
    [IA64] tidy up return value of ip_fast_csum · 6dbfc19b
    Chen, Kenneth W authored
    While working on implementing csum_ipv6_magic, I noticed that current
    version of ip_fast_csum will potentially return bits above "unsigned
    short" as 1.  While no harm is done right now because all call sites
    will chop off the upper bits when it uses the return value.  However,
    this is still dangerous and buggy.  Here is a patch to enforce that the
    function really returns unsigned short in the native register format.
    
    The fix is free as there are plenty open slot to add one more asm instruction.
    Signed-off-by: default avatarKen Chen <kenneth.w.chen@intel.com>
    Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
    6dbfc19b
ip_fast_csum.S 2.59 KB