lkml.org 
[lkml]   [2014]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.10 29/41] xen-netback: remove pointless clause from if statement
    Date
    3.10-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Paul Durrant <Paul.Durrant@citrix.com>

    [ Upstream commit 0576eddf24df716d8570ef8ca11452a9f98eaab2 ]

    This patch removes a test in start_new_rx_buffer() that checks whether
    a copy operation is less than MAX_BUFFER_OFFSET in length, since
    MAX_BUFFER_OFFSET is defined to be PAGE_SIZE and the only caller of
    start_new_rx_buffer() already limits copy operations to PAGE_SIZE or less.

    Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
    Cc: Ian Campbell <ian.campbell@citrix.com>
    Cc: Wei Liu <wei.liu2@citrix.com>
    Cc: Sander Eikelenboom <linux@eikelenboom.it>
    Reported-By: Sander Eikelenboom <linux@eikelenboom.it>
    Tested-By: Sander Eikelenboom <linux@eikelenboom.it>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/xen-netback/netback.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/drivers/net/xen-netback/netback.c
    +++ b/drivers/net/xen-netback/netback.c
    @@ -347,8 +347,8 @@ static bool start_new_rx_buffer(int offs
    * into multiple copies tend to give large frags their
    * own buffers as before.
    */
    - if ((offset + size > MAX_BUFFER_OFFSET) &&
    - (size <= MAX_BUFFER_OFFSET) && offset && !head)
    + BUG_ON(size > MAX_BUFFER_OFFSET);
    + if ((offset + size > MAX_BUFFER_OFFSET) && offset && !head)
    return true;

    return false;



    \
     
     \ /
      Last update: 2014-04-11 20:41    [W:4.025 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site