File tree Expand file tree Collapse file tree 6 files changed +20
-8
lines changed Expand file tree Collapse file tree 6 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ always-$(CONFIG_DRM_HEADER_TEST) += \
245245quiet_cmd_hdrtest = HDRTEST $(patsubst % .hdrtest,% .h,$@ )
246246 cmd_hdrtest = \
247247 $(CC ) $(c_flags ) -fsyntax-only -x c /dev/null -include $< -include $< ; \
248- PYTHONDONTWRITEBYTECODE=1 $(KERNELDOC ) -none $(if $(CONFIG_WERROR )$(CONFIG_DRM_WERROR ) ,-Werror) $< ; \
248+ PYTHONDONTWRITEBYTECODE=1 $(PYTHON3 ) $( KERNELDOC ) -none $(if $(CONFIG_WERROR )$(CONFIG_DRM_WERROR ) ,-Werror) $< ; \
249249 touch $@
250250
251251$(obj ) /% .hdrtest : $(src ) /% .h FORCE
Original file line number Diff line number Diff line change @@ -413,7 +413,7 @@ obj-$(CONFIG_DRM_I915_GVT_KVMGT) += kvmgt.o
413413#
414414# Enable locally for CONFIG_DRM_I915_WERROR=y. See also scripts/Makefile.build
415415ifdef CONFIG_DRM_I915_WERROR
416- cmd_checkdoc = PYTHONDONTWRITEBYTECODE=1 $(KERNELDOC ) -none -Werror $<
416+ cmd_checkdoc = PYTHONDONTWRITEBYTECODE=1 $(PYTHON3 ) $( KERNELDOC ) -none -Werror $<
417417endif
418418
419419# header test
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ always-$(CONFIG_DRM_HEADER_TEST) += \
1111quiet_cmd_hdrtest = HDRTEST $(patsubst % .hdrtest,% .h,$@ )
1212 cmd_hdrtest = \
1313 $(CC ) $(c_flags ) -fsyntax-only -x c /dev/null -include $< -include $< ; \
14- PYTHONDONTWRITEBYTECODE=1 $(KERNELDOC ) -none $(if $(CONFIG_WERROR )$(CONFIG_DRM_WERROR ) ,-Werror) $< ; \
14+ PYTHONDONTWRITEBYTECODE=1 $(PYTHON3 ) $( KERNELDOC ) -none $(if $(CONFIG_WERROR )$(CONFIG_DRM_WERROR ) ,-Werror) $< ; \
1515 touch $@
1616
1717$(obj ) /% .hdrtest : $(src ) /% .h FORCE
Original file line number Diff line number Diff line change @@ -250,10 +250,9 @@ struct ftrace_likely_data {
250250/*
251251 * GCC does not warn about unused static inline functions for -Wunused-function.
252252 * Suppress the warning in clang as well by using __maybe_unused, but enable it
253- * for W=1 build. This will allow clang to find unused functions. Remove the
254- * __inline_maybe_unused entirely after fixing most of -Wunused-function warnings.
253+ * for W=2 build. This will allow clang to find unused functions.
255254 */
256- #ifdef KBUILD_EXTRA_WARN1
255+ #ifdef KBUILD_EXTRA_WARN2
257256#define __inline_maybe_unused
258257#else
259258#define __inline_maybe_unused __maybe_unused
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ else ifeq ($(KBUILD_CHECKSRC),2)
167167endif
168168
169169ifneq ($(KBUILD_EXTRA_WARN),)
170- cmd_checkdoc = PYTHONDONTWRITEBYTECODE=1 $(KERNELDOC) -none $(KDOCFLAGS) \
170+ cmd_checkdoc = PYTHONDONTWRITEBYTECODE=1 $(PYTHON3) $( KERNELDOC) -none $(KDOCFLAGS) \
171171 $(if $(findstring 2, $(KBUILD_EXTRA_WARN)), -Wall) \
172172 $<
173173endif
Original file line number Diff line number Diff line change @@ -102,11 +102,24 @@ vmlinux: vmlinux.unstripped FORCE
102102# modules.builtin.modinfo
103103# ---------------------------------------------------------------------------
104104
105+ # .modinfo in vmlinux.unstripped is aligned to 8 bytes for compatibility with
106+ # tools that expect vmlinux to have sufficiently aligned sections but the
107+ # additional bytes used for padding .modinfo to satisfy this requirement break
108+ # certain versions of kmod with
109+ #
110+ # depmod: ERROR: kmod_builtin_iter_next: unexpected string without modname prefix
111+ #
112+ # Strip the trailing padding bytes after extracting .modinfo to comply with
113+ # what kmod expects to parse.
114+ quiet_cmd_modules_builtin_modinfo = GEN $@
115+ cmd_modules_builtin_modinfo = $(cmd_objcopy); \
116+ sed -i 's/\x00\+$$/\x00/g' $@
117+
105118OBJCOPYFLAGS_modules.builtin.modinfo := -j .modinfo -O binary
106119
107120targets += modules.builtin.modinfo
108121modules.builtin.modinfo: vmlinux.unstripped FORCE
109- $(call if_changed,objcopy )
122+ $(call if_changed,modules_builtin_modinfo )
110123
111124# modules.builtin
112125# ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments