diff mbox

[v2] kvm: x86: mmu: Add cast to negated bitmasks in update_permission_bitmask()

Message ID 3b61527dd119e0ab1025e9e36f666e74a336b180.camel@perches.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joe Perches June 25, 2018, 5:50 p.m. UTC
On Mon, 2018-06-25 at 10:35 -0700, Matthias Kaehlcke wrote:
> Some other instances of the warning that have been addressed are:
> commit 644d87dccdc69cf79834a72ed0c889580d6af32a
> commit e2a5dca753d1cdc3212519023ed8a13e13f5495b
> commit dae1a432ab1fe79ae53129ededeaece35a2dc14d
> commit d1600401faad4bc186bfdb291d8af644465e20bd
> commit a45463cbf3f9dcdae683033c256f50bded513d6a
 
I think all these implicit conversion warnings are senseless
and should really be silenced by setting them only to be
output at W=3 with all the other non-static and generally
unnecessary signed/unsigned conversions

---
 scripts/Makefile.extrawarn | 1 +
 1 file changed, 1 insertion(+)

Comments

Nick Desaulniers June 25, 2018, 7:05 p.m. UTC | #1
On Mon, Jun 25, 2018 at 1:50 PM Joe Perches <joe@perches.com> wrote:
>
> On Mon, 2018-06-25 at 10:35 -0700, Matthias Kaehlcke wrote:
> > Some other instances of the warning that have been addressed are:
> > commit 644d87dccdc69cf79834a72ed0c889580d6af32a
> > commit e2a5dca753d1cdc3212519023ed8a13e13f5495b
> > commit dae1a432ab1fe79ae53129ededeaece35a2dc14d
> > commit d1600401faad4bc186bfdb291d8af644465e20bd
> > commit a45463cbf3f9dcdae683033c256f50bded513d6a
>
> I think all these implicit conversion warnings are senseless
> and should really be silenced by setting them only to be
> output at W=3 with all the other non-static and generally
> unnecessary signed/unsigned conversions
>
> ---
>  scripts/Makefile.extrawarn | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index 8d5357053f86..9b1d0d59e8d0 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -46,6 +46,7 @@ warning-2 += $(call cc-option, -Wunused-macros)
>  warning-3 := -Wbad-function-cast
>  warning-3 += -Wcast-qual
>  warning-3 += -Wconversion
> +warning-3 += $(call cc-option -Wconstant-conversion)
>  warning-3 += -Wpacked
>  warning-3 += -Wpadded
>  warning-3 += -Wpointer-arith

I prefer that to turning off the warning outright.
diff mbox

Patch

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 8d5357053f86..9b1d0d59e8d0 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -46,6 +46,7 @@  warning-2 += $(call cc-option, -Wunused-macros)
 warning-3 := -Wbad-function-cast
 warning-3 += -Wcast-qual
 warning-3 += -Wconversion
+warning-3 += $(call cc-option -Wconstant-conversion)
 warning-3 += -Wpacked
 warning-3 += -Wpadded
 warning-3 += -Wpointer-arith