Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp129138pxf; Wed, 10 Mar 2021 23:13:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgQrXngHzOhziORQzuimizgzcmX419C5H1aoWFKNCzMQ99fk23VuMQC72a2Fke85kWdqu0 X-Received: by 2002:a17:907:20c7:: with SMTP id qq7mr1659482ejb.528.1615446836820; Wed, 10 Mar 2021 23:13:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615446836; cv=none; d=google.com; s=arc-20160816; b=ziet3vEina9RCfzIxyaj8WfdihH0wfQzbB3BQjAB2E0a0tG5QtRleavX2XeQ98WVFF 8L7XychlKpb/shkSMZ0z7+y6L06ur+F9U1uXXnS3Qbol0K3dLNB8sNgfjxuzDt9tnlhN eGIJ7s4CIHZJJv1qZWZlZOxqMNY2Eg4X9opXx+dGqjsqMLVHEUuCzgGWJRHaTHT1SwOQ yp/nNDArVSe0lqTjCKavmf3l5YHCxth3t99NjMvOce3gtABfO4VtpDb7rPBvy4aeay2D 50I9cskPDtM0YSbVNZGsu0EjfpKGubCUEtPFPybSyWda6VX/4PeepTMd6h0fUscebhGN iE3w== 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=eczxlnWpvlIDyDe13PnRiY7ZtLXZutQDVrkmHqp5W4A=; b=WmsLI4KAeuwGt4+FtDyVC/1QELmjtF8Lnum+D2aQkiXiveWUN+Va0DqlnPIxbp8563 voVI2Fq80dp2Zg68vvzEtlh9wog5z4jHWPDkJ5cH4UDXN2IgeEFmPJLsyxXxRkueDKKd IlZVbCyzTtjMtipTv+nwhQnZbUxp0wkrHEZMHiKywOoU15QeTTlrWFAyrBD+JCnu+mCx +gNYrIfVDhH1htpZSQLJVUsj6KvhvcT+uMIdBV76f3IOIAUCvhgJfzBk+HiPLJEXkjc1 kF/KkEi3wSdhBglpWneUbR7uJdhnCV+rjvSZCFeY8DEq7u85WcD53Nbb2oY44C1somHp nKhw== 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 d26si665294edz.20.2021.03.10.23.13.34; Wed, 10 Mar 2021 23:13:56 -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 S231655AbhCKHLd (ORCPT + 99 others); Thu, 11 Mar 2021 02:11:33 -0500 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:52660 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232056AbhCKHLM (ORCPT ); Thu, 11 Mar 2021 02:11:12 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R891e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0URQUgGY_1615446664; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0URQUgGY_1615446664) by smtp.aliyun-inc.com(127.0.0.1); Thu, 11 Mar 2021 15:11:10 +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 v2] netdevsim: fib: Remove redundant code Date: Thu, 11 Mar 2021 15:11:01 +0800 Message-Id: <1615446661-67765-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 --- Changes in v2: - Modify the function type to void. drivers/net/netdevsim/fib.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c index 46fb414..3ca0f54 100644 --- a/drivers/net/netdevsim/fib.c +++ b/drivers/net/netdevsim/fib.c @@ -869,10 +869,8 @@ static int nsim_fib6_event(struct nsim_fib_data *data, return err; } -static int nsim_fib_event(struct nsim_fib_event *fib_event) +static void 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, @@ -885,8 +883,6 @@ static int nsim_fib_event(struct nsim_fib_event *fib_event) nsim_fib6_event_fini(&fib_event->fib6_event); break; } - - return err; } static int nsim_fib4_prepare_event(struct fib_notifier_info *info, -- 1.8.3.1