From patchwork Tue Jul 11 18:53:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 117546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4731623vqx; Sun, 9 Jul 2023 19:33:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlHC7ieGaOfYpufSwyrtt+n2XyEIW1RUCh+F4NRh5vRCA/Uu4XCxB0GbsAXVkxy9rJvpyIvm X-Received: by 2002:a17:906:649b:b0:993:f744:d230 with SMTP id e27-20020a170906649b00b00993f744d230mr4160299ejm.16.1688956400890; Sun, 09 Jul 2023 19:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688956400; cv=none; d=google.com; s=arc-20160816; b=KtHx82awIU3bPaTc1AcsJ2Z4dcC2m446+/AQSpaXw89u0VAHUUJoHrTW2pSpxVtDot IioUEPU4q/8YLPeYb7l2IejjQ5yxHILGyX+cNkx/W7wTRDZoyTeJe9oG1OHHahYZ237G 3dAOUVk4VmGgfuZmQK92aiJrG1bkdUmnBJXb5yPp7KvAAaQJY8g4swBGKZgpoE3Iixjq XjNnOX+yJMAqu67+rPLBp2lYL+JbbRRJ7T2zAxnCUlcgP2JOomUEsLgGzBSdOO7wUw6c SQ3nHY1q+splgJRndbg4XESG45eEj05eWX9mh+iWRU7AFEdyU/mWpIb9py6UmlF8MqQX crUQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ss8-20020a170907038800b009930d4e3185si7468917ejb.883.2023.07.09.19.32.53; Sun, 09 Jul 2023 19:33:20 -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 S230206AbjGJCXj (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=3A_kprobes=3A_Remove_unnecessary_=E2=80=98?= =?utf-8?q?0=E2=80=99_values?= 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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1770999146802667024 X-GMAIL-MSGID: 1770999146802667024 it is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming Acked-by: Masami Hiramatsu (Google) --- 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 */