From nobody Wed Apr 22 20:47:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g1B9n13Wyz6bHYy for ; Wed, 22 Apr 2026 20:47:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g1B9m5zRjz3YHT for ; Wed, 22 Apr 2026 20:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776890844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/u0rged0cn+FtLL4r8FRWV/d/5prYyROgDOo74CSnE=; b=eqCgCfLPk9k5ZwazdtZ0stosK6XFonKbs7qmffuWAy+UQiLpd5eR9sOkiC9ab+N+3J1myF aKORem9SkgBH5QwuJfcvOz9CSq/nNVztBBFL8jCpYn21j82Tl8t0VB9/9UvS4iEW0byauI uK7oZJaDM1LX63glp0vFFcxm3/LK4FegdimaSE11MnVIKMAzh5P4QU09ZL4f2erUJxE2MG qqhn7raNn/upXx6wCYZQHEU9qAbkvOQYu2ejMZzSnF1go98FMXBT0+yyUJmq2NJqJYymFS NjfoLnvO2VnRhQp6PLz0JP17SLmO349DlOANvluaw9clN1xH45kbZZul+/9nng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776890844; a=rsa-sha256; cv=none; b=blQm0Ag1XCdzutT0WJWlYMV/OqKiQDKvbzRthKVTV394StFEd4ecRCC5ymQBgrUo62t48Y 7hvUBzGHl85woujesvmHJubjBWuM2JdugW0LZB8cZM7RDTGsQuvQ+OmnDzg+huo8d/3nSg BGRyHmXDApdyEUP1CRCT+toBQvUQx28znEoJ7bGopB8Xuqm2RjpcqXvgqBGpdILixu9PNM hy0BZT2NTjPQ6TYiVaT+6NPvoBVhdm7dx8qBQC4EA6+DBlQSC25/aOeTR2PJ/m92RXJdhQ CqNy0Evq9JblMaEqIjScWWKwGgfsCwNrlZN3tP+ilmjvGDdB40rN9xzRTZIC+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776890844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/u0rged0cn+FtLL4r8FRWV/d/5prYyROgDOo74CSnE=; b=oPx1wmdgk1dsFr7/t2wmO6BH/Xe2GCxLgwgTteEHzYRxJ7sdjhH/zbWK2bkAYoIEiuye6a 8eGUENX5a/7t0DQXiX9oXS1OPnCJ0mOPq31CeJCn0/ge6nAHTxgembmI83D9xFS5v8O9/C SMWTl1QgDipRt9e+1+YOAd1VdQGR/cmioFbdBsm2cEjneWFmrH6pxLONEQOqGyGU7AWZzt kO+0p+2YInTMf6tjsII7do9tEvH+6SPFjpHTBf8Mt/LySmEp5qksIXP57mtKkMjOIFfrjZ 6KUED00IOYLrCKRTUf3fNbxL5LRUDJttLaaV0UgsynfPzY+cloJYYV0na9nyRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g1B9m5TXZzn5R for ; Wed, 22 Apr 2026 20:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25c20 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 22 Apr 2026 20:47:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron Subject: git: 1c641d0436e3 - main - linuxkpi: Move `ARRAY_SIZE` to List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c641d0436e377c57a767e37f56ce65253817d67 Auto-Submitted: auto-generated Date: Wed, 22 Apr 2026 20:47:24 +0000 Message-Id: <69e933dc.25c20.6854f16a@gitrepo.freebsd.org> The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=1c641d0436e377c57a767e37f56ce65253817d67 commit 1c641d0436e377c57a767e37f56ce65253817d67 Author: Jean-Sébastien Pédron AuthorDate: 2026-04-20 21:34:08 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2026-04-22 20:46:57 +0000 linuxkpi: Move `ARRAY_SIZE` to The DRM generic code started to import this header directly in Linux 6.12.x. Let's move the definition of `ARRAY_SIZE()` (the only thing that defines) to this header. Also, include from the same headers as Linux. This includes , so the change should not break anything. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56570 --- sys/compat/linuxkpi/common/include/linux/array_size.h | 17 +++++++++++++++++ sys/compat/linuxkpi/common/include/linux/kernel.h | 3 +-- sys/compat/linuxkpi/common/include/linux/kfifo.h | 1 + sys/compat/linuxkpi/common/include/linux/string.h | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/array_size.h b/sys/compat/linuxkpi/common/include/linux/array_size.h new file mode 100644 index 000000000000..ebfaeccc9536 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/array_size.h @@ -0,0 +1,17 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * All rights reserved. + */ + +#ifndef _LINUXKPI_LINUX_ARRAY_SIZE_H_ +#define _LINUXKPI_LINUX_ARRAY_SIZE_H_ + +#include + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +#endif /* _LINUXKPI_LINUX_ARRAY_SIZE_H_ */ diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 8caaf520fd3e..afbd9208a410 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -266,8 +267,6 @@ extern int linuxkpi_debug; }) #endif -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) - #define u64_to_user_ptr(val) ((void *)(uintptr_t)(val)) #define offsetofend(t, m) \ diff --git a/sys/compat/linuxkpi/common/include/linux/kfifo.h b/sys/compat/linuxkpi/common/include/linux/kfifo.h index b0d0c17f07e4..c8cea1226b3c 100644 --- a/sys/compat/linuxkpi/common/include/linux/kfifo.h +++ b/sys/compat/linuxkpi/common/include/linux/kfifo.h @@ -30,6 +30,7 @@ #include +#include #include #include diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index ad2b2fe7d377..ba6549804edc 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -31,6 +31,7 @@ #include +#include #include #include #include