Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5639815rdb; Sun, 31 Dec 2023 09:48:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHBgEiUycMS1L4ZAURCLLa1EqU4GsAmR9+FWJCM1dei8+W6Y496F/SYP3DaZVbWgd4F+gI X-Received: by 2002:a05:6512:376e:b0:50e:5a6a:a6bf with SMTP id z14-20020a056512376e00b0050e5a6aa6bfmr5371697lft.20.1704044927738; Sun, 31 Dec 2023 09:48:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704044927; cv=none; d=google.com; s=arc-20160816; b=vo/3wiKoQLTbxzEFOPO1LO1UIE2z2V6B6f/Omdiwu7CCftcNmJnkI4SY7ADn0zkeIz Qx7HgJuL/gSm5rh+DlOF8ZMC0YqFLBg1H20P+U+ipsxLlxUJiabbHcqOIZKTtcDPGDcP eMy3sR4AqcWeMmQ355GnzH/aCRREGL8efd4aNsnxnKlmj1zA4uFmGGA+BSjFCuGU2gLC slB5xHEY3l867ZyT0TTwkVfFJm3g1kj0cZpfBpllArnn0MCBpqQFHriTZPp/BcMXg8cF wX+7LBGSgq8N2KTaBW+i4T2kN348dvuldoWf49ZCPB4TIwijqwKGUIgt3C97hk/LO2f+ xzrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=mSn3Btt562YvsGcmMPUhIqJPHZq3G85b2IOUD5grvGc=; fh=DdOJvwknMOETb7U5MhJXXB2PrP85TzaM/5h2KxSJnwo=; b=Bj79ZqnWTv04buHS/0tXl7PUAC+7KT8MFtJN9bR1Y+ts81AmxmaJWGGhLXAGkQ9aU3 SkmyrT4gg25HXbgAFmsiNYxbSrw6HSnpgEKnuEXVnSsqt9byem2ZuNuNpXjsOdrFuNOS AuKF7nOH7Fk+k4J8UwSuy2tQzq+nfPWLC+d8i3Zh0WHiY6tflyJBatSs+84OUYPbKkRT Kzmeqjki25C1HRe2tfasOCTxw+X6oaQfRS02hFTcfEbS/lbUoiFr7qj35W6epNR4KJAE HrckCfg3wNxEeXvDReb9v8mVvKzLEZIZgyuXGIhYhsrTt6qcEhcnVKS0457mJZ6+S/dm nR5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=ZsebrwNL; spf=pass (google.com: domain of linux-kernel+bounces-13769-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13769-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z2-20020a05640235c200b0055491f8b19esi7501843edc.122.2023.12.31.09.48.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 09:48:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13769-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=ZsebrwNL; spf=pass (google.com: domain of linux-kernel+bounces-13769-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13769-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7D4F71F21B32 for ; Sun, 31 Dec 2023 17:48:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F28059475; Sun, 31 Dec 2023 17:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="ZsebrwNL" X-Original-To: linux-kernel@vger.kernel.org Received: from mout.web.de (mout.web.de [212.227.15.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FB298F57; Sun, 31 Dec 2023 17:48:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1704044892; x=1704649692; i=markus.elfring@web.de; bh=DxIaqkFvyCP4q3o29hYuSHbxCSE+JDd8CW1vm0ANeu4=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=ZsebrwNLwowD6n33dhC0GiBXR9OauHocAJjcGlzGMjGmYSO/pTVzUOU6XyosUoMF JqfGtcFR9+Fp0NlG1IOnrvV9T6xF7kN1yz1+xhytd6hjAOoBOE+s86ybPEPB/EBSw 29fJsCkopionzu9JIQmJWsHyZN3YyTH97xY7faCFlk/ljwaiQ5n/rtnS5bEDkIVkW GCiDfTE/82OCDMuMYOOV/77hVo4haUwYIIUvBsRvJK8ZWWtj2sabkrwPusXNiY/Ge QiVcAQ/8Yh/uV528tPOgZ+Ruh70t9/Nt5duRpXGoevQbJJH3Pj7qrbebddwWrelSX OGcDcEHDIxtTf0+8Bw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.90.95]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MxHUC-1r08g81Ptg-00xmWS; Sun, 31 Dec 2023 18:48:12 +0100 Message-ID: Date: Sun, 31 Dec 2023 18:48:11 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: =?UTF-8?Q?=5BPATCH_4/4=5D_netlink=3A_Move_an_assignment_for_the_var?= =?UTF-8?B?aWFibGUg4oCcY2JfbXV0ZXjigJ0gaW4gX19uZXRsaW5rX2tlcm5lbF9jcmVhdGUo?= =?UTF-8?Q?=29?= Content-Language: en-GB From: Markus Elfring To: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, Anjali Kulkarni , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Kuniyuki Iwashima , Paolo Abeni , Simon Horman Cc: LKML References: <90679f69-951c-47b3-b86f-75fd9fde3da3@web.de> In-Reply-To: <90679f69-951c-47b3-b86f-75fd9fde3da3@web.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:CQ9qMA/8hempdUNkAURlBEHPPhumiz+JPok0x077qDtK1n4Nn4M 7e3Lq5moDaSVvvQmgPV1lD0bo/wZg2XRLt3vyiFHR5tvjWoDlmHkF2a4K+y+RLBSGuYX0NJ fsdQj9DNkVgA4UJeQdFSvXOmIUIDKGnf3qXsZ2H056HJM4IW/NMObVOU39TEsi/olm/0WDp sWUO3HS9ALwHQje3yWOOA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:04G/Mo8NypI=;ESAuPWEakwRUjaQfehxGcf2D2Vk 3begh/m05m7c7+oZ4sh68mPFNhtQV1WG3aXHBMfTiv6JHCFqLkIwgSXzkpBm1oyCduIuLH6Jt +RHlWub3yeOHJ+cnTpUgj8r6re7OlKfr8yIXsO1+LiCAfGswpSECXu4q24rItiEKrviaWiCmi rBctdCqP+1Tm7KXDuuPITAy4IAjZC8HNeFgei+mRISl0ISooRsM/Oan96iXML6L2JVPjbGicJ jJ8OZB0Ucu7qLn+fpZFk7lFLW7BVVQhACxwkt6X8vwewY0FdoNBfkTIv8l7oAfR6AWfkfwHYC 2R/Gf4fHyQ74lYM/KhjX1UTkStDhT1xx2PdBRRp9q4MPh4eJqgFkK2xoxAsdT8vvYqRwbFCM4 fGLgt3SjMhjIjRiawzhEowB9ppvNmVuilooi9Wx6dWmT/uVcM+Xq9Rdyi2MA8knPprmezd/tZ ZjLC5NN4HeRPNBHf+UNRyv50+VSu4zMLC0BA/1FP0YazhDq1bVqqdebrp/RWwS/+ZOqihCTfG rhqhxDd5Tlw1iaoab1lfRpGh+F7d/UVSOpmUn+uM02IeAyMQoo92tZnSBxqFw9LV9PsczX2nL QTuEbqxrpn1ukn3H+ezUgh28yIwAb4LPzbSPGz8HKEkQHiEQHf8ElH5aZjYIaISl8blcILsBF MFoKSztGoIszzodIQDENpVvaM4qTB8sV1cL+WfPMchmJTWCzcH/uh7DB7+kGzQ/CCWFqmjYSG qGvOdD5BvC9v8Izin4IH4gDkEAfsqBGsoYx7qOL8NvJL8RpeW4UPDHHERTaLFfnPh+u8XYZPg 4LyCEOPqQbJ0cBIdCtDAx878ohZN8Q3iCtutSUC7WeZVI8Si4B9so9a8lmJ3aBdRoZsDQYQN7 URNGLtvS9OtyAIxWXBY5s0rmEfmKB+IsEonZUoAWa5nOOtcQAlVGUF8uwnXOZIYytPsofO7Rh lnxJBJALSR7ayDmPgtuLX5qr3Ro= From: Markus Elfring Date: Sun, 31 Dec 2023 18:16:26 +0100 Move one assignment for the variable =E2=80=9Ccb_mutex=E2=80=9D closer to = the place where this pointer is used. Signed-off-by: Markus Elfring =2D-- net/netlink/af_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index cfddc9c6a376..12a0b6f8be19 100644 =2D-- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -2019,7 +2019,7 @@ __netlink_kernel_create(struct net *net, int unit, s= truct module *module, struct sock *sk; struct netlink_sock *nlk; struct listeners *listeners; - struct mutex *cb_mutex =3D cfg ? cfg->cb_mutex : NULL; + struct mutex *cb_mutex; /* Serialize data processing with callbacks */ unsigned int groups; BUG_ON(!nl_table); @@ -2030,6 +2030,7 @@ __netlink_kernel_create(struct net *net, int unit, s= truct module *module, if (sock_create_lite(PF_NETLINK, SOCK_DGRAM, unit, &sock)) return NULL; + cb_mutex =3D (cfg ? cfg->cb_mutex : NULL); if (__netlink_create(net, sock, cb_mutex, unit, 1) < 0) goto out_sock_release_nosk; =2D- 2.43.0