Skip to content

Instantly share code, notes, and snippets.

@nathanchance
Created March 6, 2020 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanchance/767cccf4d093c1342e1994083518815e to your computer and use it in GitHub Desktop.
Save nathanchance/767cccf4d093c1342e1994083518815e to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index 86035d866f2c..a0c6c91abc9f 100644
--- a/Makefile
+++ b/Makefile
@@ -748,6 +748,9 @@ KBUILD_CFLAGS += -Wno-tautological-compare
# source of a reference will be _MergedGlobals and not on of the whitelisted names.
# See modpost pattern 2
KBUILD_CFLAGS += -mno-global-merge
+# clang's -Wpointer-to-int-cast warns when casting to enums, which does not match GCC.
+# Disable this warning because it is very noisy across the kernel and serves no real purpose.
+KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
else
# These warnings generated too much noise in a regular build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment