lkml.org 
[lkml]   [2022]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 17/29] sit: use min
    Date
    From: kernel test robot <lkp@intel.com>

    commit 284fda1eff8a8b27d2cafd7dc8fb423d13720f21 upstream.

    Opportunity for min()

    Generated by: scripts/coccinelle/misc/minmax.cocci

    CC: Denis Efremov <efremov@linux.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: kernel test robot <lkp@intel.com>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/ipv6/sit.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/ipv6/sit.c
    +++ b/net/ipv6/sit.c
    @@ -310,7 +310,7 @@ static int ipip6_tunnel_get_prl(struct i

    rcu_read_lock();

    - ca = t->prl_count < cmax ? t->prl_count : cmax;
    + ca = min(t->prl_count, cmax);

    if (!kp) {
    /* We don't try hard to allocate much memory for

    \
     
     \ /
      Last update: 2022-07-05 14:01    [W:4.151 / U:0.384 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site