From nobody Fri Apr 3 06:28:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A0A1C3168F6; Tue, 17 Feb 2026 22:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771367124; cv=none; b=KeTvCLDaJNGoaHe/5ttpSgZtbJG89/Ot4jGjPxtG1eYFnCpCN3UAz0NmKmsa3g6NOu0MqGHZYZFfud3k1EIAAoieojtWJefC9Cal+Ane6+85Jj7MlmYH0KEH3JSf4wHP03Er8SJPLE174MGyMt+Ro+Wkcn03U6YVsVXYTLL9a4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771367124; c=relaxed/simple; bh=0G2Wu+ork4b43/V01ieIEc5auZF0HDjfDOooAbQRvMM=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=EUh1YefRn1eKUdemgT9InFwYKGpO5GxmDB8y1QuL5izBNa5AERwu2Sw/iTpRhP3cpPKDVn9nFeQ6MraPSm6ilQk2ASCu8/49742KYBrijg+61wyrKiW6hYho2yaNo3tN6C21CN5xs1NeHiEAzE859tDLGBqfLVtn2Lz1ksy4/rQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fAlsSxkx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fAlsSxkx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 068F6C4CEF7; Tue, 17 Feb 2026 22:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771367124; bh=0G2Wu+ork4b43/V01ieIEc5auZF0HDjfDOooAbQRvMM=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=fAlsSxkx3sLN1/XXD48wAPoUeZ0r4sVnEKY6+VKVBhuy8RpHRmSEhRe1lkt3tEyNg /LedgzgSS5NGp9xE1W4+i8YlIXKztRgomPnxA6O1Y8Hs4jCoq99BVs/SR5C5u4HnVb P2ZXY0mZiuwY4TTKJZJxgNFw5awwgws+M0zZSh88lotDKrc9F1fiOWaIyHlYTPzNg7 EP/dCOHKOPpP6eYrPGOCx41xRRMXNOnW2Ed3zk0w3ewO5EO+QAYnMvDJ3TPtHdoG3m vPZ9gIHqLZWWYtx5eszqFFrUhdiRsWiGpt/ivPwPLArGm7UA/bsLJguqAIcJVIMmfY mno9B+KD0ipJw== Message-ID: <0f7f4ffa-1465-4c54-8d3d-e9b551136669@kernel.org> Date: Tue, 17 Feb 2026 23:25:20 +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: [PATCH RFC 01/10] IB/core: Prepare for immutable device groups From: Heiner Kallweit To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Jason Gunthorpe , Leon Romanovsky , Alexandre Belloni Cc: driver-core@lists.linux.dev, Linux Kernel Mailing List , linux-rdma@vger.kernel.org, linux-rtc@vger.kernel.org References: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org> Content-Language: en-US In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org> Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This prepares for making struct device member groups a constant array. No functional change intended. Signed-off-by: Heiner Kallweit Acked-by: Leon Romanovsky --- drivers/infiniband/core/device.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/dev= ice.c index 1174ab7da62..f967ad534fc 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -565,15 +565,14 @@ static void rdma_init_coredev(struct ib_core_device *= coredev, */ BUILD_BUG_ON(offsetof(struct ib_device, coredev.dev) !=3D offsetof(struct ib_device, dev)); - - coredev->dev.class =3D &ib_class; - coredev->dev.groups =3D dev->groups; - /* * Don't expose hw counters outside of the init namespace. */ if (!is_full_dev && dev->hw_stats_attr_index) - coredev->dev.groups[dev->hw_stats_attr_index] =3D NULL; + dev->groups[dev->hw_stats_attr_index] =3D NULL; + + coredev->dev.class =3D &ib_class; + coredev->dev.groups =3D dev->groups; =20 device_initialize(&coredev->dev); coredev->owner =3D dev; --=20 2.53.0