Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp124871pxf; Wed, 10 Mar 2021 02:05:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyK/hwZLKVVu6W3woS0ihtKLS1MwPmoqzRXObJN43cfhyDrfdT+rn1n3fWU1MaN6yFDAvPZ X-Received: by 2002:a17:906:8614:: with SMTP id o20mr2732172ejx.386.1615370733366; Wed, 10 Mar 2021 02:05:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615370733; cv=none; d=google.com; s=arc-20160816; b=hjiQA2npV3wJGP09+QEAAZ2X7FXGOp/r0XwspImzqnALinG7PcHts7pi2orwoU2XDF QZSVgaRTE+jTIrHBx9vDfTIRS0oqx5oEcsYSK9695Pz1Yp1/iZUN3dvYbQwf5Eq3c56u b3kDPgK7g8l4eGI4i153LQzBL3xsgbUcJ1Nv1J0qqC4O1Nj7HWIns6Q+zyHxyxYZZUgV oPf1rpWVWvVxXTFPetA59mlfV9OVEczRjyi2HoA8FFBDCyTbwSJLPQpudCY/tGNcqyaG QquqRxUNHeobKaXfH04cSnpV/7e4RFk5qFPeE538zzuku6Vmb/KSoqB6kEaLKa0bn6n9 +t/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ieduxatBKUrPjGdVkc7/0qqVIY7beKmebjG/5/jERa8=; b=JxUMvG1rPOhW/F4FQCZ1deuYATNRzueiVJ+XipFT6l5uHj2tYaKo06wSJaBgcTglde ZyCtoKu/Unu+2je08ehIwULkXScASBDecZ2oBls+JoitjB6KdsSIi08MkXGBJ7TnyDlu DwRrF6UQHA83TM/QO0ixIfOpxMjRDBlg0aSnSwT3eiU7xGzweb/dQaNcH0o36ibNl6Om pkoquadQ1V9k3znhMVGkooyWtxsai83cNdLdoqDJCRypmX2FiNrzJWH09Qu72kxZCWJ2 mYRrtMiyaR03d+RfrlRTFj/q8LBFI0FuBc3Fz/CHuhziCVBy6amja+i1bpSU++IHY6pX 8Iaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=dO0JUpSG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq23si11138402ejb.498.2021.03.10.02.05.07; Wed, 10 Mar 2021 02:05:33 -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; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=dO0JUpSG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231622AbhCJKCG (ORCPT + 99 others); Wed, 10 Mar 2021 05:02:06 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45271 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbhCJKBq (ORCPT ); Wed, 10 Mar 2021 05:01:46 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 098A25C0143; Wed, 10 Mar 2021 05:01:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 10 Mar 2021 05:01:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ieduxa tBKUrPjGdVkc7/0qqVIY7beKmebjG/5/jERa8=; b=dO0JUpSGJXBbbbKeyFDNJO OF49Q3BEsMvY1T4Mg+W7Z9nRdIZITv641ZagxW/sCg2toMIWCOnlnLRwQK7eAMqJ w8ngeTvXxGpaRqClzFBIs2XypUISFVyFaAMC7+TGAsEhtuDduofVgUSW25jme9ml FX1CbbaQSKeuFIt2Qj7a5MxYLTugfGBbAc6yceF49NeKbw0EOI/aXOewU1aNWauk SwENz3P2K37PXTsC4y5U9AscTAEP00VCAuRuoCCLe9t1y/Nu46HTViNpICJPH6gX kPsK7YPUGlsdL7Mr4IfcPxjkgSOnVPYdVCzqy0GcyeXczUdnGul5XJ1ISLDVocSg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddukedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedtffekkeefudffveegueejffejhfetgfeuuefgvedtieehudeuueekhfduheel teenucfkphepkeegrddvvdelrdduheefrdeggeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: from localhost (igld-84-229-153-44.inter.net.il [84.229.153.44]) by mail.messagingengine.com (Postfix) with ESMTPA id BF4411080064; Wed, 10 Mar 2021 05:01:44 -0500 (EST) Date: Wed, 10 Mar 2021 12:01:41 +0200 From: Ido Schimmel To: Jiapeng Chong Cc: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] netdevsim: fib: Remove redundant code Message-ID: References: <1615343727-96723-1-git-send-email-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1615343727-96723-1-git-send-email-jiapeng.chong@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 10, 2021 at 10:35:27AM +0800, Jiapeng Chong wrote: > 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) Can you change to 'static void' ? > { > - 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 >