From: Sasha Levin <sashal@kernel.org>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: gregkh@linuxfoundation.org, masahiroy@kernel.org, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] kbuild: Disable -Wpointer-to-enum-cast" failed to apply to 4.19-stable tree
Date: Mon, 23 Mar 2020 12:36:43 -0400 [thread overview]
Message-ID: <20200323163643.GW4189@sasha-vm> (raw)
In-Reply-To: <20200323153427.GA40380@ubuntu-m2-xlarge-x86>
On Mon, Mar 23, 2020 at 08:34:27AM -0700, Nathan Chancellor wrote:
>On Mon, Mar 23, 2020 at 03:28:48PM +0100, gregkh@linuxfoundation.org wrote:
>>
>> The patch below does not apply to the 4.19-stable tree.
>> If someone wants it applied there, or to any other stable or longterm
>> tree, then please email the backport, including the original git commit
>> id to <stable@vger.kernel.org>.
>>
>> thanks,
>>
>> greg k-h
>>
>> ------------------ original commit in Linus's tree ------------------
>>
>> From 82f2bc2fcc0160d6f82dd1ac64518ae0a4dd183f Mon Sep 17 00:00:00 2001
>> From: Nathan Chancellor <natechancellor@gmail.com>
>> Date: Wed, 11 Mar 2020 12:41:21 -0700
>> Subject: [PATCH] kbuild: Disable -Wpointer-to-enum-cast
>>
>> Clang's -Wpointer-to-int-cast deviates from GCC in that it warns when
>> casting to enums. The kernel does this in certain places, such as device
>> tree matches to set the version of the device being used, which allows
>> the kernel to avoid using a gigantic union.
>>
>> https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L428
>> https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L402
>> https://elixir.bootlin.com/linux/v5.5.8/source/include/linux/mod_devicetable.h#L264
>>
>> To avoid a ton of false positive warnings, disable this particular part
>> of the warning, which has been split off into a separate diagnostic so
>> that the entire warning does not need to be turned off for clang. It
>> will be visible under W=1 in case people want to go about fixing these
>> easily and enabling the warning treewide.
>>
>> Cc: stable@vger.kernel.org
>> Link: https://github.com/ClangBuiltLinux/linux/issues/887
>> Link: https://github.com/llvm/llvm-project/commit/2a41b31fcdfcb67ab7038fc2ffb606fd50b83a84
>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>>
>> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
>> index ecddf83ac142..ca08f2fe7c34 100644
>> --- a/scripts/Makefile.extrawarn
>> +++ b/scripts/Makefile.extrawarn
>> @@ -48,6 +48,7 @@ KBUILD_CFLAGS += -Wno-initializer-overrides
>> KBUILD_CFLAGS += -Wno-format
>> KBUILD_CFLAGS += -Wno-sign-compare
>> KBUILD_CFLAGS += -Wno-format-zero-length
>> +KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
>> endif
>>
>> endif
>>
>
>Attached is a backport that should work for 4.4 through 4.19.
Queued up, thanks!
--
Thanks,
Sasha
prev parent reply other threads:[~2020-03-23 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 14:28 FAILED: patch "[PATCH] kbuild: Disable -Wpointer-to-enum-cast" failed to apply to 4.19-stable tree gregkh
2020-03-23 15:34 ` Nathan Chancellor
2020-03-23 16:36 ` Sasha Levin [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=20200323163643.GW4189@sasha-vm \
--to=sashal@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=masahiroy@kernel.org \
--cc=natechancellor@gmail.com \
--cc=stable@vger.kernel.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