From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 625AC375F9E for ; Fri, 19 Jun 2026 11:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781868892; cv=none; b=Tmt8HBmPiMaJ3V1oHmsHDh0j9AglVAjfKKyXKRvsG/AfM2kQksIoJO+iA2cyHpiCs0b9HG2ZI1hkx5+A3i6H+DXuJlyRYOPMYC3xIG3q0UotL2o7IKh2A9fZs5ODFdxXktiZ1mNJpRigbeXwPW3dZvW19ooq7F8dTF7lIVVA7JE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781868892; c=relaxed/simple; bh=zobXfJQ0oadXWe4qAzK4yaxBIExgKm12mK5RCpgnRQo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n7N89r/wkFknv37SqBenTN/WUr+gqFfqc2OZJrO368lGTfu/Io3fjqr/tnVIO6sbwVE9X9cFTZDnOlQV327Wz53qxf5PJZlAcgMP0OSDj+8fuJX9RnGRZgX/75wth/zXpRRwXAEMV5LWaKs+Ku1xBeSQWd79C4bK3GFhlGW5Dgw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=COSyp12Y; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="COSyp12Y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781868887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/LPUTRA+IGIJCyo/KlENFHGYqvH1hQJwrQEIsdwxnnc=; b=COSyp12YpDyctxlAZCQI91YfaICA9lbUuE1tYbF29TEU2vftQRO+Xnnsz/LfG/UKn3/Abf q6pWGV0Z6YGGW8NabBk9XxJ52qfI2Yu4DrGOxActRRLuqb13r18cbAeT9CfwNbZfMslcOF w8pT6q9zWUFE+AtoJFpXc0VfvJZcoJI= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-207-hKSw8AKYMw2LGr4SNYt46w-1; Fri, 19 Jun 2026 07:34:46 -0400 X-MC-Unique: hKSw8AKYMw2LGr4SNYt46w-1 X-Mimecast-MFC-AGG-ID: hKSw8AKYMw2LGr4SNYt46w_1781868885 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E8D59180AC55; Fri, 19 Jun 2026 11:34:44 +0000 (UTC) Received: from thuth-p1g4.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C7FEB1800599; Fri, 19 Jun 2026 11:34:42 +0000 (UTC) From: Thomas Huth To: Yury Norov Cc: Rasmus Villemoes , linux-kernel@vger.kernel.org Subject: [PATCH] bitmap: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files Date: Fri, 19 Jun 2026 13:34:41 +0200 Message-ID: <20260619113441.146717-1-thuth@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 From: Thomas Huth While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize now on the __ASSEMBLER__ macro that is provided by the compilers. This is a completely mechanical patch (done with a simple "sed -i" statement). Signed-off-by: Thomas Huth --- Note: This patch has been split from an earlier patch of mine to ease reviewing. include/linux/bitmap.h | 4 ++-- include/linux/bits.h | 6 +++--- tools/include/linux/bits.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index b007d54a9036a..8854acf77869a 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -2,7 +2,7 @@ #ifndef __LINUX_BITMAP_H #define __LINUX_BITMAP_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include #include @@ -894,6 +894,6 @@ void bitmap_write(unsigned long *map, unsigned long value, #define bitmap_set_value8(map, value, start) \ bitmap_write(map, value, start, BITS_PER_BYTE) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __LINUX_BITMAP_H */ diff --git a/include/linux/bits.h b/include/linux/bits.h index a40cc861b3a7c..b7509f15718e6 100644 --- a/include/linux/bits.h +++ b/include/linux/bits.h @@ -17,7 +17,7 @@ * position @h. For example * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__) /* * Missing asm support @@ -75,7 +75,7 @@ #define BIT_U32(nr) BIT_TYPE(u32, nr) #define BIT_U64(nr) BIT_TYPE(u64, nr) -#else /* defined(__ASSEMBLY__) */ +#else /* defined(__ASSEMBLER__) */ /* * BUILD_BUG_ON_ZERO is not available in h files included from asm files, @@ -84,6 +84,6 @@ #define GENMASK(h, l) __GENMASK(h, l) #define GENMASK_ULL(h, l) __GENMASK_ULL(h, l) -#endif /* !defined(__ASSEMBLY__) */ +#endif /* !defined(__ASSEMBLER__) */ #endif /* __LINUX_BITS_H */ diff --git a/tools/include/linux/bits.h b/tools/include/linux/bits.h index a40cc861b3a7c..b7509f15718e6 100644 --- a/tools/include/linux/bits.h +++ b/tools/include/linux/bits.h @@ -17,7 +17,7 @@ * position @h. For example * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLER__) /* * Missing asm support @@ -75,7 +75,7 @@ #define BIT_U32(nr) BIT_TYPE(u32, nr) #define BIT_U64(nr) BIT_TYPE(u64, nr) -#else /* defined(__ASSEMBLY__) */ +#else /* defined(__ASSEMBLER__) */ /* * BUILD_BUG_ON_ZERO is not available in h files included from asm files, @@ -84,6 +84,6 @@ #define GENMASK(h, l) __GENMASK(h, l) #define GENMASK_ULL(h, l) __GENMASK_ULL(h, l) -#endif /* !defined(__ASSEMBLY__) */ +#endif /* !defined(__ASSEMBLER__) */ #endif /* __LINUX_BITS_H */ -- 2.54.0