Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1332394lqp; Mon, 15 Apr 2024 03:20:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfVD6sIvrJl4HNdmrlQqSA+vNoR8NwJ0h6I/2eHbSn//9m5rZnf9ho2HM0GINK6jtWJksDaqe+I9HbBNneeL1wHgkJZ6zizRNOZuPdpA== X-Google-Smtp-Source: AGHT+IHgMOgmWKVnjA98SgctVWR0ta4dtFyo74xLBmNTninMlSPZwyI6yZ3Q0gUArqhz2gyvd5Ge X-Received: by 2002:a05:6a21:1644:b0:1a9:c436:c904 with SMTP id no4-20020a056a21164400b001a9c436c904mr6524616pzb.10.1713176435743; Mon, 15 Apr 2024 03:20:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713176435; cv=pass; d=google.com; s=arc-20160816; b=M6f0bdnKec2ytjnWbloN3gBsyoH+74v50IBAYB5Tv3QGqT2Oec2N4ho94URXKYeNh7 AZlVMiU5kAuYl1kO/rVc6MPtKzhfHZxhTiTe6F4FpNITGN9i/ZSMu3+bOqQXub/fxiet dQynA2+pmM9BBw7B4B1QyUy8MFPOyO7cQfWPuysbZXWFjOrOciKUMhZnqoii6REhwL/N DN2eNaa3sYvijhLYM6uefA1nAPQvPaSIKxLWiE8SSt0keTrHZgueIAV/JbjOuQcmvO28 myKgjgfR9lFUalLiIX2V5o+LqUgRKW+GuOVqLaCh03+JMx3IxQXDGr1s0csunEY4YYSn EfjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=1VeaZhWuUD8Ysa5lVV98I5AI4utNfG57wGz27uAVfQM=; fh=BlB5Za30ygtYW98eTP/jcmaPf/QPblQjD1TLdbRGRZM=; b=c7CAiARHAx5FmHLheI7GbjuIw40t7HG0XVwA0P4Aj2jKtwK4RjpGvqDwAiNI0UfsXo RniuvofNJkpGftnw+csA1aLmYOnzJZMIHwa7X+JA7lFoaogjLlom0nL/i7fqeI907VJd 6yHj73eLpPUGRBWCWzHMyW6R/4J9+aFMPsozShJSQgeFY+Zn8G3L4sd81cWa1aoeNaUV ZoBrI0wHqjF9edsHbF23Gw1P+f5ZXDgmPufDKYVq5mJ/FW2E1Vw+JL2wPuw49J7HKScj 3FOgfxPv+tQJgYIlsnDAh0FJAAKMjM1sj8t3texW/fe/hZMHV0z0rbmj+EEGqH0UXbSA /mMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-144903-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144903-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g11-20020a056a0023cb00b006eadffbe8d6si7995972pfc.339.2024.04.15.03.20.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 03:20:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144903-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-kernel+bounces-144903-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144903-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6C39B2816AC for ; Mon, 15 Apr 2024 10:20:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A9214D5A3; Mon, 15 Apr 2024 10:20:29 +0000 (UTC) Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id C18A247A7F for ; Mon, 15 Apr 2024 10:20:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713176429; cv=none; b=d76hehkBBMnjQdA11BhtMrbq/CtacsyGvlnS2SMEopKPghnXuKATwhi5aawnCGMSOiOpzVyvFaJyMzZrMrXXETneRPtBzP6Ov1mlC3WfDF6UIpIIgHHpQbl8rQHwnSi0HSTJrNTvuKorG3+bN9hNPD8rQpKyXoo1tISPT0eU2a0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713176429; c=relaxed/simple; bh=3yLCoqFgS93V9qcg7dJGqj52LfDzK5camlXV1LZWd6Y=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=Zd8Z3kFogPjC1ZHDKrz6Hh/iAPXZNNwGkxOmsSV+qkqbxDYgFEvFEm/qfba1J/WetgvT0V4rMQ8KRMevj4fQRHQ69weyTrDth/cIeyhHfVAZu2BUge7HvT4T5KPDS8a/l6R+i4FRPok0snmL2E7mdokEg6b+ZfHzyOBTG10NB0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 75A91601A216C; Mon, 15 Apr 2024 18:20:16 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: gregkh@linuxfoundation.org, tj@kernel.org Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?UTF-8?q?kernfs:=20mount:=20Remove=20unnecessary=20?= =?UTF-8?q?=E2=80=98NULL=E2=80=99=20values=20from=20knparent?= Date: Mon, 15 Apr 2024 18:20:09 +0800 Message-Id: <20240415102009.9926-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit knparent is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- fs/kernfs/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 0c93cad0f0aca..d38bc7aeb598c 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -206,7 +206,7 @@ struct dentry *kernfs_node_dentry(struct kernfs_node *kn, struct super_block *sb) { struct dentry *dentry; - struct kernfs_node *knparent = NULL; + struct kernfs_node *knparent; BUG_ON(sb->s_op != &kernfs_sops); -- 2.18.2