linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Bjorn Helgaas <helgaas@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	llvm@lists.linux.dev,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] Revert "linux/types.h: remove unnecessary __bitwise__"
Date: Thu, 26 May 2022 11:00:54 +0200	[thread overview]
Message-ID: <ef79f546-0d10-f603-ccbe-789ed021943c@kernel.org> (raw)
In-Reply-To: <CAHk-=whk=ygWsxt=1HhndCwjtXdga9sPmkxFGby5PJWRk5yx9Q@mail.gmail.com>

On 25. 05. 22, 18:02, Linus Torvalds wrote:
> On Wed, May 25, 2022 at 7:46 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
>>
>> 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.
> 
> Hmm.
> 
> Presumably it's only the uapi case that actually wants to re-instate it.
> 
> And I'd rather make that "__bitwise__" case explicitly special, with a
> comment about why it exists when the kernel itself doesn't use it.
> 
> IOW, rather than the revert, maybe something like the below
> (whitespace-damaged) instead?
> 
> Jiri, does something like this work for you?

Yes, thanks.

> ---
>   include/uapi/linux/types.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h
> index c4dc597f3dcf..308433be33c2 100644
> --- a/include/uapi/linux/types.h
> +++ b/include/uapi/linux/types.h
> @@ -26,6 +26,9 @@
>   #define __bitwise
>   #endif
> 
> +/* The kernel doesn't use this legacy form, but user space does */
> +#define __bitwise__ __bitwise
> +
>   typedef __u16 __bitwise __le16;
>   typedef __u16 __bitwise __be16;
>   typedef __u32 __bitwise __le32;


-- 
js
suse labs

      reply	other threads:[~2022-05-26  9:01 UTC|newest]

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

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=ef79f546-0d10-f603-ccbe-789ed021943c@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=corbet@lwn.net \
    --cc=helgaas@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).