Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp136991pxb; Tue, 9 Mar 2021 18:37:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxMRsYHMNa28dhbE8CDbrKbngNI2qEYcvcKEynID5HIqn/XKuwfNokzwHx/2d/Zko/9zq+ X-Received: by 2002:aa7:cb90:: with SMTP id r16mr694187edt.139.1615343830834; Tue, 09 Mar 2021 18:37:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615343830; cv=none; d=google.com; s=arc-20160816; b=FT0B8ETX6jJYUfLQ6MavsfpABQG8BFyb1/5NQaz2JzfLEUqLusabZpoQKV5+zbf5lM 6XDNL5l6dZBb2S4UZJw3vYMhXL5NxkAah2+4YLM1t1bqlbinflFOc8HD7P72KFy/nO/a rK3whjmVvoE+4AUSQIB4iXOahU6yqAu40vuuEy9JWcC/kEjXLXfD8AeVMTd+s4vI1D3o wwvWC/pPXkqzPRtXAHTI2amrmcHcdiRkHCv7AZsppCYQxjvdqB3MoiQIM/DfD4vb9Vuu 9RgsgNBL9bgbJ9kcc/lJ91d+8dnzH0wbE5JQ/jqRToNXdrvBt709DJ+zOt8AUxwSHMEP ysKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=fJ4H/l1NzRqMXv5jDbPoU94Lz+Wg/efJkEZSqqDinq4=; b=E01bZeXbQ10igj0t3fPJcP8SFgb4CKF/E/ztrp3A0MmKwG3wLFVCtWRVZdSMnQY+bo l5OaX4PuyRAOUCcghr77dh1pdsFkVy02EWOmG7iXUQq+guqtl/7iVwy3VXcoVS5IV//5 2OLTvDNLRdJTKqrLHB3DdkBsitS8Jrq86LrL0qwS1Jwjie1W+vZrqzdWdGe48zi9be6E va2400J/mf9h71rKw8NJq3APYrJq9NYTmVpHu9nRT8lP8jSulyybVgPvaoOiCJ9ET0Ki cxXtOF9xILJv1r2e84TIgqLNUIztGvq9Pn0M+CGVEp4MsKkXCy3HpQLxLjra/BZ92JP7 viWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si10791037edn.109.2021.03.09.18.36.48; Tue, 09 Mar 2021 18:37:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232174AbhCJCfu (ORCPT + 99 others); Tue, 9 Mar 2021 21:35:50 -0500 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:41265 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232043AbhCJCfh (ORCPT ); Tue, 9 Mar 2021 21:35:37 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0URB1F74_1615343728; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0URB1F74_1615343728) by smtp.aliyun-inc.com(127.0.0.1); Wed, 10 Mar 2021 10:35:34 +0800 From: Jiapeng Chong To: kuba@kernel.org Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] netdevsim: fib: Remove redundant code Date: Wed, 10 Mar 2021 10:35:27 +0800 Message-Id: <1615343727-96723-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warnings: ./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return "0" on line 889. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/netdevsim/fib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c index 46fb414..db794f9 100644 --- a/drivers/net/netdevsim/fib.c +++ b/drivers/net/netdevsim/fib.c @@ -871,8 +871,6 @@ static int nsim_fib6_event(struct nsim_fib_data *data, static int nsim_fib_event(struct nsim_fib_event *fib_event) { - int err = 0; - switch (fib_event->family) { case AF_INET: nsim_fib4_event(fib_event->data, &fib_event->fen_info, @@ -886,7 +884,7 @@ static int nsim_fib_event(struct nsim_fib_event *fib_event) break; } - return err; + return 0; } static int nsim_fib4_prepare_event(struct fib_notifier_info *info, -- 1.8.3.1