1. 20 Oct, 2021 4 commits
  2. 18 Oct, 2021 3 commits
  3. 15 Oct, 2021 26 commits
  4. 12 Oct, 2021 3 commits
  5. 07 Oct, 2021 1 commit
    • Lucas De Marchi's avatar
      drm/i915: remove IS_ACTIVE · 1a839e01
      Lucas De Marchi authored
      When trying to bring IS_ACTIVE to linux/kconfig.h I thought it wouldn't
      provide much value just encapsulating it in a boolean context. So I also
      added the support for handling undefined macros as the IS_ENABLED()
      counterpart. However the feedback received from Masahiro Yamada was that
      it is too ugly, not providing much value. And just wrapping in a boolean
      context is too dumb - we could simply open code it.
      
      As detailed in commit babaab2f ("drm/i915: Encapsulate kconfig
      constant values inside boolean predicates"), the IS_ACTIVE macro was
      added to workaround a compilation warning. However after checking again
      our current uses of IS_ACTIVE it turned out there is only
      1 case in which it triggers a warning in clang (due
      -Wconstant-logical-operand) and 2 in smatch. All the others
      can simply use the shorter version, without wrapping it in any macro.
      
      So here I'm dialing all the way back to simply removing the macro. That
      single case hit by clang can be changed to make the constant come first,
      so it doesn't think it's mask:
      
      	-       if (context && CONFIG_DRM_I915_FENCE_TIMEOUT)
      	+       if (CONFIG_DRM_I915_FENCE_TIMEOUT && context)
      
      As talked with Dan Carpenter, that logic will be added in smatch as
      well, so it will also stop warning about it.
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211005171728.3147094-1-lucas.demarchi@intel.com
      1a839e01
  6. 06 Oct, 2021 1 commit
  7. 05 Oct, 2021 1 commit
  8. 04 Oct, 2021 1 commit
    • Nathan Chancellor's avatar
      drm/i915: Clean up disabled warnings · 4b2437f6
      Nathan Chancellor authored
      i915 enables a wider set of warnings with '-Wall -Wextra' then disables
      several with cc-disable-warning. If an unknown flag gets added to
      KBUILD_CFLAGS when building with clang, all subsequent calls to
      cc-{disable-warning,option} will fail, meaning that all of these
      warnings do not get disabled [1].
      
      A separate series will address the root cause of the issue by not adding
      these flags when building with clang [2]; however, the symptom of these
      extra warnings appearing can be addressed separately by just removing
      the calls to cc-disable-warning, which makes the build ever so slightly
      faster because the compiler does not need to be called as much before
      building.
      
      The following warnings are supported by GCC 4.9 and clang 10.0.1, which
      are the minimum supported versions of these compilers so the call to
      cc-disable-warning is not necessary. Masahiro cleaned this up for the
      reset of the kernel in commit 4c8dd95a ("kbuild: add some extra
      warning flags unconditionally").
      
      * -Wmissing-field-initializers
      * -Wsign-compare
      * -Wtype-limits
      * -Wunused-parameter
      
      -Wunused-but-set-variable was implemented in clang 13.0.0 and
      -Wframe-address was implemented in clang 12.0.0 so the
      cc-disable-warning calls are kept for these two warnings.
      
      Lastly, -Winitializer-overrides is clang's version of -Woverride-init,
      which is disabled for the specific files that are problematic. clang
      added a compatibility alias in clang 8.0.0 so -Winitializer-overrides
      can be removed.
      
      [1]: https://lore.kernel.org/r/202108210311.CBtcgoUL-lkp@intel.com/
      [2]: https://lore.kernel.org/r/20210824022640.2170859-1-nathan@kernel.org/Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210914194944.4004260-1-nathan@kernel.org
      4b2437f6