Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34749642rwd; Sun, 9 Jul 2023 19:47:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZxA1hCdGXMbx0sTQ/A8k2cEjxeH6eMvrN0OjVGUjs8N/Eo1FcJ+iDWljO/H6vYHiOENoW X-Received: by 2002:a05:6512:524:b0:4fb:a0f1:f8b8 with SMTP id o4-20020a056512052400b004fba0f1f8b8mr7943995lfc.63.1688957226498; Sun, 09 Jul 2023 19:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688957226; cv=none; d=google.com; s=arc-20160816; b=qEi4kI2PblMZx7F8FLUmeC68jTpD+M+FRLu+YtpjsGUmvJ1MV3v2lch4bHCTAAhUHd 13ZAFongHgWnwR3rD8lbTPc+/OFhvHHu05wjPlklXdXLRsYtKSzh7JLdy//mL6Mj5vIb fzCYHQUgOrfWDLJUYyTA+bOpk4WfSVBvAvdSHX+B1Gms9Nx4gtBP2UxmJihfNb4HGsk2 YkplKC4iWm0JiNReHjbuFup9yYyYBZMd/TVXVB976bmXCocxBs8Tjq3UhPyrwQQ3QdLZ Pec2xu8ZDZuOvQ414e/3v/qcXzyhuGNuu231Il3xvl0kdpDvbJTzNPg4mQAt83adCKRC r3XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=0VPF3WuvvtTeUc7c7pGe83uYsJLoTwIOJMiKvAY8QPM=; fh=5vsyQhQBOy5P55jhpgRv4HLjYzaCpDjzKAT1xZVazAM=; b=NNZr3xPPHpJdp/w99XR/OicJjuE51l8Fjyu4cbfo1amMQqGcIEFZPbDNR1+uJF6K63 QR+pLRHEQbR3wubUB0TLm7TzRGA882WPkq3j24aRgJNQN0SRpA/zd0HkZvPEWqj5NPoV gS91zyfnqVjwl5T4jSTm6bAZ0qTfYOBXA5m06t2CvUtN7+kF35cQMS2jTipy+Hp18sX8 UFm43uvlAJl97MLJUMYWlxnv5AKRIlMnI7uGKnVKxX68YX2epA9y7B0qxegUsr7U6xAD Kju9liqn9A0XO8hLSOz1mrBl5geaXsCw3wyM+yHXAyM3NBjt/h/QxKHs0Exa+/XiUU+n 19bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rn6-20020a170906d92600b009930253bc63si8252053ejb.1024.2023.07.09.19.46.42; Sun, 09 Jul 2023 19:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230205AbjGJCXj (ORCPT + 99 others); Sun, 9 Jul 2023 22:23:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjGJCXi (ORCPT ); Sun, 9 Jul 2023 22:23:38 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 47256103; Sun, 9 Jul 2023 19:23:37 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 1DE22602824AF; Mon, 10 Jul 2023 10:23:16 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: naveen.n.rao@linux.ibm.com, anil.s.keshavamurthy@intel.com, davem@davemloft.net, mhiramat@kernel.org Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?kernel:=20kprobes:=20Remove=20unnecessary=20?= =?UTF-8?q?=E2=80=980=E2=80=99=20values?= Date: Wed, 12 Jul 2023 02:53:53 +0800 Message-Id: <20230711185353.3218-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RCVD_IN_DNSWL_BLOCKED,RDNS_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org it is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/kprobes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 00e177de91cc..83e6f76fca04 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1072,7 +1072,7 @@ static int kprobe_ftrace_enabled; static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops, int *cnt) { - int ret = 0; + int ret; lockdep_assert_held(&kprobe_mutex); @@ -1110,7 +1110,7 @@ static int arm_kprobe_ftrace(struct kprobe *p) static int __disarm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops, int *cnt) { - int ret = 0; + int ret; lockdep_assert_held(&kprobe_mutex); @@ -2692,7 +2692,7 @@ void kprobe_free_init_mem(void) static int __init init_kprobes(void) { - int i, err = 0; + int i, err; /* FIXME allocate the probe table, currently defined statically */ /* initialize all list heads */ -- 2.18.2