From nobody Fri Jun 12 18:34:57 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB890391508 for ; Wed, 13 May 2026 11:04:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778670243; cv=none; b=TvvTEieJIgHSoCtu6hIIbxfLxzEtLgWZlw2dJ15r6Dp6/VlZXvjzVMeeCy95VSrYptSBf3r6d4dN/bnxd1a6A2N2S0ZGQjzUUR9IvU9nU1vHjpKNqdxGY8CvY+JLWx/EFPifQEeONtgDGBzOBGJfHk+7ejKt7EBqHWLmVNhC6kk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778670243; c=relaxed/simple; bh=K7BijF+4pvSiGwWbTjUVNO5a0o+ZiWOZ+bBEO/RlWLI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Yi+V6Gp6TlY3FVB6UALTlB/G0/r2bOvxEdxZRynPwjxGrMshyOhppFCklsbyJxxiixl29dUIp+PlF+FuN9pt+Ys7USVmwmUsaVM9vbRqIOPkddCQ0rh6P1uRi/jO0u4XfQMbgp2O/+M5dFKF+qo2JbJ+0LR4RFg1HnOm103wYBc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linbit.com; spf=pass smtp.mailfrom=linbit.com; dkim=pass (2048-bit key) header.d=linbit-com.20251104.gappssmtp.com header.i=@linbit-com.20251104.gappssmtp.com header.b=d9xXK0UK; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linbit.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linbit-com.20251104.gappssmtp.com header.i=@linbit-com.20251104.gappssmtp.com header.b="d9xXK0UK" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-44a044cb827so5275751f8f.0 for ; Wed, 13 May 2026 04:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20251104.gappssmtp.com; s=20251104; t=1778670239; x=1779275039; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=WPoijdvfyfbhp5R8nin4PeEtMV5ISfc/KYpiYJU2YHg=; b=d9xXK0UKYNwWlzfPIU4GpMJFiJsAqkdDE4l7ypQ3Pxs0Iv7k/uRCNRqxitsKODHG2V OXN4rl02qC1f/bVfB7kN6wWrRndANC4emnf9wiU54mgcGpDibYAcIUCik0TFgPUfixXr tSQDD8Lv4HRHomCt+Id/5N72Vu+aX+FWCgjLt8/tQlt6HSN3x40VRrW5TPdW7Lbhr8W+ wES9SnY3We0XU0CxBOuj0b3mzTee0FFp7gCtnq5vgAt2lLDtYK5gjIx/DJpp5K6+R6SX b1LJv1D1/4D8aM8efWrOhhKuR1FjMDOAoetEGGf0Go/KDoiOgs/livHZt6yL7V6jY7b6 PQ+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778670239; x=1779275039; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WPoijdvfyfbhp5R8nin4PeEtMV5ISfc/KYpiYJU2YHg=; b=LGixnuIV9Z1jDPc8HOAM1HjTiKTmJUfC+PiE84oQTBPio9macXeJTaUKEH/eMfyT+3 Qc1tv+f8gwF/G7bjcXulrAOIdKrSQfOKeA/2Oqra5LFWYk6PiNnSvOZygvflkfF58lbi 2PMgjSB3NrK7WUzh7Nwwju8VG0Q3OsAPLfsus5sTelVzd2f70fPzZ/nazRh5j37hPtPD mSXPrXpJUS8U7HBZellmzDrkmbCPhjB3pg5ZgscI5latn9ekp5/xB1iToXixvXjEdc9q RaBrBm+wTyHbo6GeiT/S0gRXWRsnfzppgtME+S9xwNFyJmXCREBpXq3QjnLNVrXSjuT5 bIEA== X-Forwarded-Encrypted: i=1; AFNElJ/f2WQ6bWtaVbz2IXZanupY7G1Al7zzuMASXGEISiINVTN+iLff4b+gMkNQtqJ877k2JkYCNSbwntx9Vew=@vger.kernel.org X-Gm-Message-State: AOJu0YxXUaG2veZ80eDgXyw5/uDjQWcnOTqbdKH3JE0sbU/EeA4gq9wP IA8t1cNcdP8Vj/CFesyRcYm8gxjgM2gJmIcy7IMSQfG+Nhpbb6e4Pu9Zp7tvrKxQuc4= X-Gm-Gg: Acq92OEeqqu0d8IHkwqlEny/rAJ7Dp4VnXcgSu0LXJV5hQfOuZ0HIszS11ZRcOEafHY fJtJq8sSdMulMa6Q83QKQvDqyiskGpSVdr9ewGYDaRCGfRuXcl8fXVIXSfro3vS2+RfFlCOHFEb ZmLPfiP347koctj3wkdR6jY3WKtgANqG3b+A/0ObhnikjyL+8EQNbLSY1UG6wiF49s/j6fwj37o u7A5XIkKlNzlPGQS5Ztaup71WN3M4rLVWLP//mJ9eOhRBUbhAWb+JhEh8N3z17OJ2xZBsmFSuQX lgS32esicV0nwkV14mKGh58KKtFiZ03LEzJAOPJE3uKGOQJPRRQyUoM0hCYd2BduDMzNXSo48Sw c7QGvMygqY3kJ1VCMrUxrvl3VtdxfjKVk26+3ou2eESAbLAKTEw6sIuRkCsqB2TfLPr2Qn6rBm3 22uLYus1w4ymwF17Lrf+K7QHWr5WHGSbpseibcJ6XDYaQWFdPsAnx6mzw+EYmfk0gHa6Hy8mIRD L/sHy2XmkB/4t7pqGArsg== X-Received: by 2002:a05:6000:220b:b0:43d:762e:76ba with SMTP id ffacd0b85a97d-45c79586f68mr4008555f8f.17.1778670238975; Wed, 13 May 2026 04:03:58 -0700 (PDT) Received: from localhost.localdomain (h082218028181.host.wavenet.at. [82.218.28.181]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45491bae13csm38469217f8f.29.2026.05.13.04.03.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 04:03:58 -0700 (PDT) From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= To: Jens Axboe Cc: drbd-dev@lists.linux.dev, linux-kernel@vger.kernel.org, Lars Ellenberg , Philipp Reisner , linux-block@vger.kernel.org, =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= , kernel test robot Subject: [PATCH] drbd: clean up UAPI headers Date: Wed, 13 May 2026 13:03:42 +0200 Message-ID: <20260513110343.3170338-1-christoph.boehmwalder@linbit.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Commit b1798910fc7f ("drbd: move UAPI headers to include/uapi/linux/") broke compilation on targets without a hosted libc: ./usr/include/linux/drbd.h:18:10: fatal error: sys/types.h: No such file or directory The underlying issue is that there were some constructs left over in those headers that don't belong in uapi. Drop the __KERNEL__-gated split in drbd.h. The !__KERNEL__ branch pulls in , and for symbols that the header does not actually reference; they were carried over from when this lived in include/linux/. Replace and the entire #ifdef block with the standard UAPI combo + , which provides __u32/__u64/__s32 and __{LITTLE,BIG}_ENDIAN_BITFIELD in both kernel and userspace contexts. drbd_limits.h references some enum values and the DRBD_PROT_C define from drbd.h, but does not include it. Add the missing include while we're here. Drop the unprefixed DEBUG_RANGE_CHECK from drbd_limits.h. It has no in-kernel users and pollutes the userspace namespace. Switch the drbd.h and drbd_limits.h include guards to the _UAPI_LINUX_* convention already used by drbd_genl.h. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202605101346.V2wwJqv1-lkp@int= el.com/ Fixes: b1798910fc7f ("drbd: move UAPI headers to include/uapi/linux/") Signed-off-by: Christoph B=C3=B6hmwalder --- include/uapi/linux/drbd.h | 28 +++------------------------- include/uapi/linux/drbd_limits.h | 8 ++++---- 2 files changed, 7 insertions(+), 29 deletions(-) diff --git a/include/uapi/linux/drbd.h b/include/uapi/linux/drbd.h index 5d4d677cf1ad..cf1ec3eb872f 100644 --- a/include/uapi/linux/drbd.h +++ b/include/uapi/linux/drbd.h @@ -11,32 +11,10 @@ =20 =20 */ -#ifndef DRBD_H -#define DRBD_H -#include - -#ifdef __KERNEL__ +#ifndef _UAPI_LINUX_DRBD_H +#define _UAPI_LINUX_DRBD_H #include #include -#else -#include -#include -#include - -/* Although the Linux source code makes a difference between - generic endianness and the bitfields' endianness, there is no - architecture as of Linux-2.6.24-rc4 where the bitfields' endianness - does not match the generic endianness. */ - -#if __BYTE_ORDER =3D=3D __LITTLE_ENDIAN -#define __LITTLE_ENDIAN_BITFIELD -#elif __BYTE_ORDER =3D=3D __BIG_ENDIAN -#define __BIG_ENDIAN_BITFIELD -#else -# error "sorry, weird endianness on this box" -#endif - -#endif =20 enum drbd_io_error_p { EP_PASS_ON, /* FIXME should the better be named "Ignore"? */ @@ -432,4 +410,4 @@ enum drbd_state_info_bcast_reason { SIB_SYNC_PROGRESS =3D 5, }; =20 -#endif +#endif /* _UAPI_LINUX_DRBD_H */ diff --git a/include/uapi/linux/drbd_limits.h b/include/uapi/linux/drbd_lim= its.h index a72a102d1ca7..acefe84bc602 100644 --- a/include/uapi/linux/drbd_limits.h +++ b/include/uapi/linux/drbd_limits.h @@ -11,10 +11,10 @@ * feedback about nonsense settings for certain configurable values. */ =20 -#ifndef DRBD_LIMITS_H -#define DRBD_LIMITS_H 1 +#ifndef _UAPI_LINUX_DRBD_LIMITS_H +#define _UAPI_LINUX_DRBD_LIMITS_H =20 -#define DEBUG_RANGE_CHECK 0 +#include =20 #define DRBD_MINOR_COUNT_MIN 1U #define DRBD_MINOR_COUNT_MAX 255U @@ -248,4 +248,4 @@ #define DRBD_RS_DISCARD_GRANULARITY_DEF 0U /* disabled by default */ #define DRBD_RS_DISCARD_GRANULARITY_SCALE '1' /* bytes */ =20 -#endif +#endif /* _UAPI_LINUX_DRBD_LIMITS_H */ base-commit: 8098eeb693c4cc4e774c62fbd4875197cb5578ce --=20 2.53.0