Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5638595rdb; Sun, 31 Dec 2023 09:44:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7YfsGOx7iPqmWSQAcnkldqoZutQUpp1syEYkWExBb9oIWyrEHLah5523SGoiZ/GRPAoyq X-Received: by 2002:ac8:5885:0:b0:425:7bf2:2088 with SMTP id t5-20020ac85885000000b004257bf22088mr26205993qta.20.1704044689030; Sun, 31 Dec 2023 09:44:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704044689; cv=none; d=google.com; s=arc-20160816; b=M8K2euisNi0jdZRduyW75mVKbhzmuwWzBl//iUnW45sefzGYGd9jVt9sS8f0CXErg0 fFoKoaSB037x3UblIUoxy9EtG/HxlvDp7dxOb7TIxJduL8txdzpm7UWy4XpDjWeqGxKh OrcnxhA7SVE+qGbvRRZ0RH+zbtqXSZngm3rkIC/HbBRThXaSvAbB/PABB6eGIOAEV9Q5 rkv/Hdm60Hp6UQ+4QGIDxQADf/Ftxa4KbjWtLMrc2CunH+RWVf8aU2d0y7HJsUOezXK5 3DZtJ8UCvm8osVS5a3pBFGXn4w52tdle7mC4mGJiEhKyIPODfRhpbzIm+HKAD8x4AgTk N9lg== 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=/9kDCmUm6b/g2UdxuCNbplWx0PPVANV2oWTMtomOynU=; fh=DdOJvwknMOETb7U5MhJXXB2PrP85TzaM/5h2KxSJnwo=; b=OdvZg7o0kqemuXoFRFJzIFA8RNkzC8kMsF5yKIMDedK393jUcsoy1VvGI8Uznny0ns bruT3T2M7SXGbVk/ZXleNBbfv/VNnA6FrPkhsIrXcOwlGSQw5p7GFf//ohcYh22ikQ7r 9hyete6Q9u8K0oDIik26RHj8hDy0dEMmWXynG3XIcxFUsysban87IIXnu66x8HNkmR6T ArEzfoYjggftV+2CtOPcffM93JuEUvm4iB9x3r5oaOenMnHw/1gJlLWhSdrjCmI1OQCZ tTBeW7rNKAxcQZ/QOiaNQr1Zm5VwNTVcBP0MOnktha0VwZrKWgIGOmT700jJiwuqMMlZ ws/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b="ZICg/2x8"; spf=pass (google.com: domain of linux-kernel+bounces-13766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y13-20020a05622a164d00b0042617bd355dsi22893792qtj.725.2023.12.31.09.44.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 09:44:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b="ZICg/2x8"; spf=pass (google.com: domain of linux-kernel+bounces-13766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13766-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7CCA71C217A1 for ; Sun, 31 Dec 2023 17:44:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B69C79470; Sun, 31 Dec 2023 17:44:34 +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="ZICg/2x8" X-Original-To: linux-kernel@vger.kernel.org Received: from mout.web.de (mout.web.de [212.227.15.4]) (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 212468F57; Sun, 31 Dec 2023 17:44:31 +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=1704044654; x=1704649454; i=markus.elfring@web.de; bh=aLRR7U3/AFWimf4oVCx2OhgMuy/xKWfmXx3IC9naGIo=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=ZICg/2x8jB8G+KIct6nZM1VB7yYS8bZKI8uVBgjZDgsHINnA996adoD4Yb6O60kS f0g96Di7aDn+W/3ehNB0jrfNgrsWQTOE8+weRlUJrbbU8BeKbrrvc9HzUZLy5m2P8 WZILEv8b6f0sFodSLEhxztGhYr52mRXldwyRb27UBZYlLt9AyG5+bq8GiOBYoP/m4 U870N9NZd7T5TVgckvKpJum8Eqc4qzqfySSe6qokoQQRQPWqiKLQvBp3IKDt2/KZA PUhIwVQLrjJiDv4kKMEN8e7ZWm2LkKmig5xL5bywy2yQpnRW76SU2/Y+Tdp6ClZPj wUojxS92Rv5ST+hiaw== 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 1MGgJK-1rOvng17Cs-00EAuA; Sun, 31 Dec 2023 18:44:14 +0100 Message-ID: <223a61e9-f826-4f37-b514-ca6ed53b1269@web.de> Date: Sun, 31 Dec 2023 18:44:13 +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_2/4=5D_netlink=3A_Move_an_assignment_for_the_var?= =?UTF-8?B?aWFibGUg4oCcc2vigJ0gaW4gX19uZXRsaW5rX2tlcm5lbF9jcmVhdGUoKQ==?= 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:ksyD/iMiLeEsohqK+0cCAC5fthmh8rU3GpZGbK03fzCSWClI94G 37s9Zn3bmBCTEv2pCWiDkyKTTAnUFupLBgaHD123O7VIh+wUSyNdMhI8snA5lb7pOIJe0+8 CqUxbtM0vaAbEPtiBLJPNs1KNBKH1fJGNBUgeGPKqOZHjZtGdoEf24MwaFrJRCHVVHc+ewh FM6JFRq1R3r+r3aTKOBwQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3vJBw6+nSHY=;FCw8Qqfha8upD8QrqFMCGDHpOeM FSFOuMqokXOUCvUYgZJDBwafuX59T1/hLY9Ibp6QO9aoqKI1xx+OA2urVj3EsmcWwQUnhOYle hsuamEAQPRDwNJAliMPJlF9PWoXvK33c9YXHffLpMpRfSyua0Jm4Zdq7ha1s5EMvp9OHmryyL EUscDbvHLIREli8RVjqi0hyNnN3z06nyRyYTkN3IHSjW6WZhM70TewhcSiS2lxbgdKdJLx7KE JKrtAQSTfKpwAo/lid9EanpneMSuJhFxKeWdUH/kyVT3rjdgtW6lIKdcBYRY7H6udc8p9pqjP KNQRtnVrpSlMQ8puURlQHiAeaVc7VN+DICpeDs2YEYJwCseyHoGyXhgZBB7cwb9EK6Ey37Jqx BSFGFZXyC5xGpU6lyR8JB4zuKXM6wRnzfayoU3dwO7DrGpkV22Gn85S2edDsfVd2kNqcht4X/ zm9/LMdF3KNhFCzBpSGu+FW/ZWuc0lEiKxpg4USsXAeTKDDWlXnfnlpfCJJy3YX7mMrqIOV8E jQex9+H/lrvt2XXv02msanXiB5FytV/vH7CreghlX1Bmxk1eqA+2wx1IxLCh4eMAJ07H4BDNf kCzE7CIQ6fkxa4TzXhnhTD0uY2UYUTlvIuAIetCmYHWcPvycjI/+lgVTjEdIkpAxMBzORr4j/ i663RPem2oGSHsZODzXYempljTIE4B9IXFnpSYCm/bOAiLzPYVwtRd2e3M4OfQtSP7If0v4db At2Se17pX2eBoj31ID5mtd1MiNNQ7034+rPmcTXNeQqf0sKYmFpxCgEPmEmOIDk7uW2ef8ZnA M7xKK4PCxMjhSBZYjbwmhpPdaH6DHDk6RsOPj+CuPsdx8yZFuJPlh78Hkz+LewzcYbAr4tkrP Yu/mHhZXugcOtmg6aGmtukzpL+lE0SrYIp4J7KrK0o+fJ1+YTsWCkHpSy5MaNajG3oGBfrpmd W7MQUw== From: Markus Elfring Date: Sun, 31 Dec 2023 17:36:50 +0100 Move one assignment for the variable =E2=80=9Csk=E2=80=9D closer to the pl= ace where this pointer is used. Signed-off-by: Markus Elfring =2D-- net/netlink/af_netlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index c3f88015cacf..b71d9c21d15b 100644 =2D-- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -2033,8 +2033,6 @@ __netlink_kernel_create(struct net *net, int unit, s= truct module *module, if (__netlink_create(net, sock, cb_mutex, unit, 1) < 0) goto out_sock_release_nosk; - sk =3D sock->sk; - if (!cfg || cfg->groups < 32) groups =3D 32; else @@ -2044,6 +2042,7 @@ __netlink_kernel_create(struct net *net, int unit, s= truct module *module, if (!listeners) goto out_netlink_release_sock; + sk =3D sock->sk; sk->sk_data_ready =3D netlink_data_ready; if (cfg && cfg->input) nlk_sk(sk)->netlink_rcv =3D cfg->input; =2D- 2.43.0