From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.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 6612F3CF67F for ; Wed, 15 Apr 2026 13:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776261531; cv=none; b=JSzUPgQW8+zOXjcf3WUOsGqSeE5yqE5FoPhWQ8hWlA7k7Sr4psFWQM14lr0/tHs6P7NMlMNkxiMx6/aOGC89AqrolCvVDdZz/DdgMAbhjfplgX4ntKTRHxl0P5bbwOCQTA6YPasz0cxVS55kgT+Y+JqtC9jhbEER2JdpZeebWYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776261531; c=relaxed/simple; bh=KVm/tY6w+kdunUTwYx4U3wsMo7hGZxtExa/KLaQ8Wy4=; h=Mime-Version:Content-Type:Date:Message-Id:From:Subject:Cc:To: References:In-Reply-To; b=N6ty/IQeklhpj7ZkdTFj4W0zwYJhgiHwEvKOtUsUBi8Wz5Gh+YnvG5HSrZsvFhmybpd9gfWRSWOwraJ/FSjktOBC/ALOh7xS+4iT9/L0tLSGwG1kVuU2bd/VKKbvdH4MbGoHxYur7kqPvNIwsw0Y45Ar2Kf17dxptD0POHAXheM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=JwHIk7+i; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="JwHIk7+i" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 525F54E42A02; Wed, 15 Apr 2026 13:58:47 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 1FE5260420; Wed, 15 Apr 2026 13:58:47 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id DA56610451B91; Wed, 15 Apr 2026 15:58:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1776261526; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=HcMqybTHU4A+1EvWFs8Urw2JMl9qnbaqkhl2nSKP1eo=; b=JwHIk7+iZvW41zELSnd+KWdw/2oqDrjnzPzebytKbS0L25EAXY2w3t3x4dvvYrF4u6Odhk DD+9v6htXT5ptk7v1lcVKXgJiaVcsExfPgyOvjxEWj0c4b4SCLQkbQ3pLq3C1raWAGpc3o lMsF20nBTh9CbJnjFxt8nWpO4rFjzo8RJcSrvuYlUdyQ1Va3WCRIdxGt0oBCWze1wbAO5f 6rV+DYMrqr+OgNbZKNIvdB91oSOGecL6XeOmDL6+FYAybPrZMKFrH8P6nsONs/sb/C+DNW v/PYVgl4hhvO3QiuH3MxmCg1mOskOqQxz04b92tKdH/MDgFhMDHACRt1IgkfmA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 15 Apr 2026 15:58:40 +0200 Message-Id: From: =?utf-8?q?Th=C3=A9o_Lebrun?= Subject: Re: [PATCH net-next v2 09/14] net: macb: change caps helpers signatures Cc: "Nicolas Ferre" , "Claudiu Beznea" , "Andrew Lunn" , "David S. Miller" , "Eric Dumazet" , "Paolo Abeni" , "Richard Cochran" , "Russell King" , "Paolo Valerio" , "Conor Dooley" , "Nicolai Buchwitz" , "Vladimir Kondratiev" , "Gregory CLEMENT" , =?utf-8?q?Beno=C3=AEt_Monin?= , "Tawfik Bayouk" , "Thomas Petazzoni" , "Maxime Chevallier" , , To: "Jakub Kicinski" X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260410-macb-context-v2-0-af39f71d40b6@bootlin.com> <20260410-macb-context-v2-9-af39f71d40b6@bootlin.com> <20260413174716.39915c92@kernel.org> In-Reply-To: <20260413174716.39915c92@kernel.org> X-Last-TLS-Session-Version: TLSv1.3 Hello Jakub, On Tue Apr 14, 2026 at 2:47 AM CEST, Jakub Kicinski wrote: > On Fri, 10 Apr 2026 21:51:57 +0200 Th=C3=A9o Lebrun wrote: >> For parallel MACB context to start become a reality, many functions will >> soon not have access to `struct macb *bp`. Those will still have access >> to caps through ctx->info->caps. >>=20 >> Change all caps helpers signatures, from taking `struct macb *bp` to >> taking `u32 caps`. > > Subjectively I feel like this is a slight loss of type safety. > Someone may pass the wrong u32 and compiler will not help? Agreed. We can solve that using our new `struct macb` subset called `struct macb_info`. It contains the caps and is available from both bp and ctx. So it will be one of: macb_is_gem(bp->info) macb_is_gem(ctx->info) No more obscure u32 argument. Thanks, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com