From patchwork Tue Jan 28 15:35:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kory Maincent X-Patchwork-Id: 13952655 X-Patchwork-Delegate: kuba@kernel.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 B71A61B2EF2; Tue, 28 Jan 2025 15:35:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738078556; cv=none; b=ouCqB+LWJq4bw14+lU+lnC1DGezRu6b7hx46SLPMDpQs02ianxs5we8egawNnR9lNg5bLM7Om3foJbuAFQm7I+ZsXQaHKhTkotKTglX2MonoQCigcaVNLDFFqx8xteuELwpn5c2n2DSrqEOABLokYzVznhegPADaN5MucYusjTQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738078556; c=relaxed/simple; bh=ET95UK2L7raus7pbcXHS9o+2t+fG8EpyB0NvOLP2q84=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ddZYtLfEN0TGh2DhBS/VjAHJ6yEDuN3yP1r2HYD4GgcrsZOO/jm1L+ZXyUhQm7t0yDDpD2YI5uoaxqIZYzF7F3Ol4U8cfj3sJGCEXaTsUXpKcM//bbAsbCNohCJ+zW8WF2exzjYl4qZP9bhnYI/i/ZoXvQRYpENR0IZtra5IJJg= 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=ezYjmSjU; arc=none smtp.client-ip=217.70.183.197 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="ezYjmSjU" Received: by mail.gandi.net (Postfix) with ESMTPSA id 150F2442EF; Tue, 28 Jan 2025 15:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1738078552; h=from:from: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=4rTxlV9K0ljWIiSCdZkHAjt43N+EaEEiWZA/fGnFRXk=; b=ezYjmSjUPHwxl8aMSM45Frhe8U/29RrynEHxawCjw8dFFy9MV9cAogIuZpe9wmTI06yHgZ K1xbclYmQSEqrbtHNVcg3fL/1N1gL1FIXk5b6fmjiHOB0SfiiH4HTgsQXsgfmVFuBfJbgU irOjRuOfPhRS/8H8b6RQCp/L/ux7yh+4m8TO/WdNQUmxffoyKMlOumAWS7VpndYqvWDOoN LNXfoH3l3pquYvxBCqGreBOFD85q4g0jKGo0vDU6oRzlQ54GKX4vL44oaGkXp2vPZHPDtc AJqyK64FvORGZef7rrXiJDhA1ceA6mU36Hk4VsQjlQY59bjHMFEH9vrhjTsAAg== From: Kory Maincent Date: Tue, 28 Jan 2025 16:35:47 +0100 Subject: [PATCH net 2/3] net: ethtool: tsconfig: Fix ts filters and types enums size check Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250128-fix_tsconfig-v1-2-87adcdc4e394@bootlin.com> References: <20250128-fix_tsconfig-v1-0-87adcdc4e394@bootlin.com> In-Reply-To: <20250128-fix_tsconfig-v1-0-87adcdc4e394@bootlin.com> To: Willem de Bruijn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Donald Hunter Cc: Thomas Petazzoni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Kory Maincent X-Mailer: b4 0.14.1 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpefmohhrhicuofgrihhntggvnhhtuceokhhorhihrdhmrghinhgtvghnthessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepvefgvdfgkeetgfefgfegkedugffghfdtffeftdeuteehjedtvdelvddvleehtdevnecukfhppeeltddrkeelrdduieefrdduvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledtrdekledrudeifedruddvjedphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomhepkhhorhihrdhmrghinhgtvghnthessghoohhtlhhinhdrtghomhdpnhgspghrtghpthhtohepuddupdhrtghpthhtohepkhhorhihrdhmrghinhgtvghnthessghoohhtlhhinhdrtghomhdprhgtphhtthhopegurghvvghmsegurghvvghmlhhofhhtrdhnvghtpdhrtghpthhtohephhhorhhmsheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepfihilhhlvghmuggvsghruhhijhhnrdhkvghrnhgvlhesghhmrghilhdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkv ghrnhgvlhdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtlhhinhdrtghomhdprhgtphhtthhopegvughumhgriigvthesghhoohhglhgvrdgtohhmpdhrtghpthhtohepkhhusggrsehkvghrnhgvlhdrohhrgh X-GND-Sasl: kory.maincent@bootlin.com X-Patchwork-Delegate: kuba@kernel.org Fix the size check for the hwtstamp_tx_types and hwtstamp_rx_filters enumerations. Align this check with the approach used in tsinfo for consistency and correctness. Signed-off-by: Kory Maincent Fixes: 6e9e2eed4f39 ("net: ethtool: Add support for tsconfig command to get/set hwtstamp config") --- net/ethtool/tsconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ethtool/tsconfig.c b/net/ethtool/tsconfig.c index 9188e088fb2f..2dc3a3b76615 100644 --- a/net/ethtool/tsconfig.c +++ b/net/ethtool/tsconfig.c @@ -294,8 +294,8 @@ static int ethnl_set_tsconfig(struct ethnl_req_info *req_base, struct nlattr **tb = info->attrs; int ret; - BUILD_BUG_ON(__HWTSTAMP_TX_CNT >= 32); - BUILD_BUG_ON(__HWTSTAMP_FILTER_CNT >= 32); + BUILD_BUG_ON(__HWTSTAMP_TX_CNT > 32); + BUILD_BUG_ON(__HWTSTAMP_FILTER_CNT > 32); if (!netif_device_present(dev)) return -ENODEV;