Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2145362rwb; Sat, 8 Oct 2022 03:06:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4lhTJKlYmXQlhji9VyFwkXL2CN5vS5Rz8CdEwS/OmwiqcFbptWEmfs78XfFeJqWEoBE31i X-Received: by 2002:a17:90a:c782:b0:202:c73e:5488 with SMTP id gn2-20020a17090ac78200b00202c73e5488mr20663002pjb.202.1665223562583; Sat, 08 Oct 2022 03:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665223562; cv=none; d=google.com; s=arc-20160816; b=RFyex7uSs1Sx3QUU/yRPHV7SJ+Gfr9oAqoztWvfVWdARbMx5YLNpfpORb9SNIfUnCr vuP8PeF3DBpvsdC461RgD3cYugm+Kw+qWG+NyXR9cOswG58iE7Py+7whv66hUWU0H9Ym 3w0eyrhOwfmC3iJoMQE6y3/HCxkEwKG3MAl0GGLaGeRtOuAVJAKqC/3N31Cw7o0pevud CmSd97s4p76KdwLwkXzve+d9ZmL4Jd+RPFxspiuYOE0ZzRIBONfJRTk4hUX45RCE6E6S 5KBZm5HjYgniF7ix6ztoUc5kU+1zJSgXC/Lfpu7Pe6/WFjrUTpVSWryI5SvOpdZ6XoXc AmJA== 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=zrcj4NUaXq0oDRvhcbQRI4Amv3DtUegCpert259P8Q8=; b=AEnNewoEAUzDQqcwnlApTN80q6i7su8j+GS1Fih3sGsUVr3r8aR+Xx38xSh9X/yKc9 IgFJ6cWwmFVoa4qnihEO8JlJuIrJ2NM0RF0O2azSiQLMsNNLQQpOXwyctvMShlK+4qb6 AqLq0hXYThaWCJtPJAXWiJgQ/IjOktebpyD2on+z5/e2uttlQe1Cn6qMlStVM1niS8Hj 2IUNyFtv+5qeGwsrzvSKjuEwqvOXxMUcQeejVujzSS9UzAlo11GRy8wmqatIKS1NM0Vj WFA6CbMiN1L42407ayYOPWze0IEq+snHXfJaHb3hkycDSQODXExwIq8ynAln8mFRWJQg Mo3A== 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 e8-20020a17090301c800b001780ba6c694si5743522plh.35.2022.10.08.03.05.50; Sat, 08 Oct 2022 03:06:02 -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 S229841AbiJHJaj (ORCPT + 99 others); Sat, 8 Oct 2022 05:30:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbiJHJaf (ORCPT ); Sat, 8 Oct 2022 05:30:35 -0400 Received: from mail.nfschina.com (mail.nfschina.com [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1B1D39FEA; Sat, 8 Oct 2022 02:30:33 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id C39721E80D9B; Sat, 8 Oct 2022 17:24:45 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SpyDjpNCVfDe; Sat, 8 Oct 2022 17:24:43 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id C98C21E80D72; Sat, 8 Oct 2022 17:24:42 +0800 (CST) From: Li zeming To: mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?proc:=20Remove=20unnecessary=20=E2=80=98NULL?= =?UTF-8?q?=E2=80=99=20and=20'0'=20values?= Date: Sat, 8 Oct 2022 17:30:26 +0800 Message-Id: <20221008093026.4952-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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 Remove unnecessary initialization assignments, which are used after the assignment. Signed-off-by: Li zeming --- fs/proc/proc_sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 021e83fe831f..5fc367f0044a 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -694,7 +694,7 @@ static bool proc_sys_fill_cache(struct file *file, struct dentry *child, *dir = file->f_path.dentry; struct inode *inode; struct qstr qname; - ino_t ino = 0; + ino_t ino; unsigned type = DT_UNKNOWN; qname.name = table->procname; @@ -1246,7 +1246,7 @@ static bool get_links(struct ctl_dir *dir, static int insert_links(struct ctl_table_header *head) { struct ctl_table_set *root_set = &sysctl_table_root.default_set; - struct ctl_dir *core_parent = NULL; + struct ctl_dir *core_parent; struct ctl_table_header *links; int err; -- 2.18.2