• Alex Elder's avatar
    net: ipa: count actual work done in gsi_channel_poll() · c80c4a1e
    Alex Elder authored
    There is an off-by-one problem in gsi_channel_poll().  The count of
    transactions completed is incremented each time through the loop
    *before* determining whether there is any more work to do.  As a
    result, if we exit the loop early the counter its value is one more
    than the number of transactions actually processed.
    
    Instead, increment the count after processing, to ensure it reflects
    the number of processed transactions.  The result is more naturally
    described as a for loop rather than a while loop, so change that.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    c80c4a1e
gsi.c 64.2 KB