linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Jiri Slaby <jirislaby@kernel.org>,
	llvm@lists.linux.dev, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH] Revert "linux/types.h: remove unnecessary __bitwise__"
Date: Wed, 25 May 2022 09:46:38 -0500	[thread overview]
Message-ID: <20220525144638.293934-1-helgaas@kernel.org> (raw)

From: Bjorn Helgaas <bhelgaas@google.com>

This reverts commit c724c866bb70cb8c607081a26823a1f0ebde4387.

Jiri Slaby reported that c724c866bb70 ("linux/types.h: remove unnecessary
__bitwise__") broke userspace, including open-iscsi, because it uses
__bitwise__.

Restore the __bitwise__ definition.

Link: https://lore.kernel.org/r/b5c0a68d-8387-4909-beea-f70ab9e6e3d5@kernel.org
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 include/uapi/linux/types.h  | 5 +++--
 tools/include/linux/types.h | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h
index c4dc597f3dcf..2415d5dcb5d3 100644
--- a/include/uapi/linux/types.h
+++ b/include/uapi/linux/types.h
@@ -21,10 +21,11 @@
 
 /* sparse defines __CHECKER__; see Documentation/dev-tools/sparse.rst */
 #ifdef __CHECKER__
-#define __bitwise	__attribute__((bitwise))
+#define __bitwise__ __attribute__((bitwise))
 #else
-#define __bitwise
+#define __bitwise__
 #endif
+#define __bitwise __bitwise__
 
 typedef __u16 __bitwise __le16;
 typedef __u16 __bitwise __be16;
diff --git a/tools/include/linux/types.h b/tools/include/linux/types.h
index 051fdeaf2670..5908e58c3598 100644
--- a/tools/include/linux/types.h
+++ b/tools/include/linux/types.h
@@ -43,10 +43,11 @@ typedef __u8  u8;
 typedef __s8  s8;
 
 #ifdef __CHECKER__
-#define __bitwise	__attribute__((bitwise))
+#define __bitwise__ __attribute__((bitwise))
 #else
-#define __bitwise
+#define __bitwise__
 #endif
+#define __bitwise __bitwise__
 
 #define __force
 #define __user
-- 
2.25.1


             reply	other threads:[~2022-05-25 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 14:46 Bjorn Helgaas [this message]
2022-05-25 16:02 ` [PATCH] Revert "linux/types.h: remove unnecessary __bitwise__" Linus Torvalds
2022-05-26  9:00   ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220525144638.293934-1-helgaas@kernel.org \
    --to=helgaas@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=corbet@lwn.net \
    --cc=jirislaby@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mst@redhat.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).