From nobody Fri Dec 19 17:36:27 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 BD3231EB182; Sat, 17 May 2025 10:02:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747476175; cv=none; b=SbU9VnkHrOd6T8qLHvsY7Zj2BzGgLt57K7s4n8BUo0E0l0fdfwkcGwwgPFGyjv2QloDWEjIfqFEkZZMEfG53okXgw1Pmm9m1tIuwNaPZ6RaODNSAPUZcPbiHvAl9fwOtHIg8n0RBExbIzXcA21mnD3QMNE6HiBmMga8VZw6rQrg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747476175; c=relaxed/simple; bh=q0j0Bfs7zwiJytBMzthiWNon1w1I7PeiVGiEmIlYUT4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=u6nXUJIGozCCmGqtUm8lVsMEk96EeZqp/JkICRFpZ1RXwTy+BDfK0pbHPLQAbk3mfMHIE354NaGpvE4v4UMrx/+EwNdUrjnOAyCjXNWa2BNch+1EzMVJQCHnjSoDwSS8+l4e0bmGYYXVyy+un/1XVk/WrAsZPUuvovudeOeUM5o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BGSsqVK/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XyGnk8JU; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BGSsqVK/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XyGnk8JU" Date: Sat, 17 May 2025 10:02:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1747476171; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XduIRBNT2QD90RnJEwNohJTTWhf+VRBiL3gaonsS9sc=; b=BGSsqVK/nEAkPpx664tRWVqUPRKCTqNeLn0zl+dWHtnaIdmBy5d3/cYYJeSr51F/3HFNyi 0a1UXN8LSOClbVkipdI06u7ABvPIkF0y9TwHk+2fKhFpW17jf0e3kROUd2qEZVVH/DVn7i Cbthe3htD2q+H1suNnyKTpRi7fdP3sZ/60jwzV1QhWdbt/PxofkTe5AsdQkeJxKB+5MU69 f7Jji+ZSbUfJDm1Ujr99He3R3INEgiedIFP8iGfrS9eYJ+k3ALqSzaU4KnlXBBVHCIXF5w K0bmoXQ5DUgGNTVinkaMxO8qZu1d5A2LID8CloJmkTWQDhDAYkXuOBRikbjSeQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1747476171; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XduIRBNT2QD90RnJEwNohJTTWhf+VRBiL3gaonsS9sc=; b=XyGnk8JUj5ds9QW3xk2NBGZIrB56fdIICnWmcCogckUFCttIWbc/Cysmd3xwt0vEOGEzua SSbFjP7qoun6pTDA== From: "tip-bot2 for Dave Martin" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cache] x86/resctrl: Prefer alloc(sizeof(*foo)) idiom in rdt_init_fs_context() Cc: Dave Martin , James Morse , "Borislav Petkov (AMD)" , Fenghua Yu , Reinette Chatre , Peter Newman , Shaopeng Tan , Amit Singh Tomar , Shanker Donthineni , Babu Moger , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20250515165855.31452-22-james.morse@arm.com> References: <20250515165855.31452-22-james.morse@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <174747617069.406.1427994519026728610.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cache branch of tip: Commit-ID: df3dc0efcc01d6aae8ebd3e479fe0d55f894854b Gitweb: https://git.kernel.org/tip/df3dc0efcc01d6aae8ebd3e479fe0d55f= 894854b Author: Dave Martin AuthorDate: Thu, 15 May 2025 16:58:51=20 Committer: Borislav Petkov (AMD) CommitterDate: Fri, 16 May 2025 14:33:56 +02:00 x86/resctrl: Prefer alloc(sizeof(*foo)) idiom in rdt_init_fs_context() rdt_init_fs_context() sizes a typed allocation using an explicit sizeof(type) expression, which checkpatch.pl complains about. Since this code is about to be factored out and made generic, this is a good opportunity to fix the code to size the allocation based on the target pointer instead, to reduce the chance of future mis- maintenance. Fix it. No functional change. Signed-off-by: Dave Martin Signed-off-by: James Morse Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Fenghua Yu Reviewed-by: Reinette Chatre Tested-by: Fenghua Yu Tested-by: Peter Newman Tested-by: Shaopeng Tan Tested-by: Amit Singh Tomar # arm64 Tested-by: Shanker Donthineni # arm64 Tested-by: Babu Moger Tested-by: Tony Luck Link: https://lore.kernel.org/20250515165855.31452-22-james.morse@arm.com --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/r= esctrl/rdtgroup.c index 02c5f62..ace86b6 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -2951,7 +2951,7 @@ static int rdt_init_fs_context(struct fs_context *fc) { struct rdt_fs_context *ctx; =20 - ctx =3D kzalloc(sizeof(struct rdt_fs_context), GFP_KERNEL); + ctx =3D kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) return -ENOMEM;