Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kbuild updates from Michal Marek:
- Make <modname>-m in makefiles work like <modname>-y and fix the
fallout
- Minor genksyms fix
- Fix race with make -j install modules_install
- Move -Wsign-compare from make W=1 to W=2
- Other minor fixes

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Demote 'sign-compare' warning to W=2
Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially
kbuild: Do not run modules_install and install in paralel
genksyms: Handle string literals with spaces in reference files
fixdep: constify strrcmp arguments
ath10k: Fix build with CONFIG_THERMAL=m
Revert "drm: Hack around CONFIG_AGP=m build failures"
kbuild: Allow to specify composite modules with modname-m
staging/ad7606: Actually build the interface modules

+35 -20
+7 -1
Makefile
··· 495 495 endif 496 496 endif 497 497 endif 498 + # install and module_install need also be processed one by one 499 + ifneq ($(filter install,$(MAKECMDGOALS)),) 500 + ifneq ($(filter modules_install,$(MAKECMDGOALS)),) 501 + mixed-targets := 1 502 + endif 503 + endif 498 504 499 505 ifeq ($(mixed-targets),1) 500 506 # =========================================================================== ··· 1265 1259 @echo ' firmware_install- Install all firmware to INSTALL_FW_PATH' 1266 1260 @echo ' (default: $$(INSTALL_MOD_PATH)/lib/firmware)' 1267 1261 @echo ' dir/ - Build all files in dir and below' 1268 - @echo ' dir/file.[oisS] - Build specified target only' 1262 + @echo ' dir/file.[ois] - Build specified target only' 1269 1263 @echo ' dir/file.lst - Build specified mixed source/assembly target only' 1270 1264 @echo ' (requires a recent binutils and recent build (System.map))' 1271 1265 @echo ' dir/file.ko - Build module including final link'
-2
drivers/gpu/drm/Makefile
··· 21 21 drm-$(CONFIG_OF) += drm_of.o 22 22 drm-$(CONFIG_AGP) += drm_agpsupport.o 23 23 24 - drm-y += $(drm-m) 25 - 26 24 drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_probe_helper.o \ 27 25 drm_plane_helper.o drm_dp_mst_topology.o drm_atomic_helper.o 28 26 drm_kms_helper-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
+1 -1
drivers/misc/ibmasm/ibmasm.h
··· 211 211 void ibmasmfs_add_sp(struct service_processor *sp); 212 212 213 213 /* uart */ 214 - #ifdef CONFIG_SERIAL_8250 214 + #if IS_ENABLED(CONFIG_SERIAL_8250) 215 215 void ibmasm_register_uart(struct service_processor *sp); 216 216 void ibmasm_unregister_uart(struct service_processor *sp); 217 217 #else
+1 -1
drivers/net/wireless/ath/ath10k/thermal.h
··· 36 36 int temperature; 37 37 }; 38 38 39 - #ifdef CONFIG_THERMAL 39 + #if IS_REACHABLE(CONFIG_THERMAL) 40 40 int ath10k_thermal_register(struct ath10k *ar); 41 41 void ath10k_thermal_unregister(struct ath10k *ar); 42 42 void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
+2 -2
drivers/staging/iio/adc/Kconfig
··· 23 23 ADC driver. 24 24 25 25 To compile this driver as a module, choose M here: the 26 - module will be called ad7606_iface_parallel. 26 + module will be called ad7606_parallel. 27 27 28 28 config AD7606_IFACE_SPI 29 29 tristate "spi interface support" ··· 34 34 ADC driver. 35 35 36 36 To compile this driver as a module, choose M here: the 37 - module will be called ad7606_iface_spi. 37 + module will be called ad7606_spi. 38 38 39 39 config AD7780 40 40 tristate "Analog Devices AD7780 and similar ADCs driver"
+3 -4
drivers/staging/iio/adc/Makefile
··· 2 2 # Makefile for industrial I/O ADC drivers 3 3 # 4 4 5 - ad7606-y := ad7606_core.o 6 - ad7606-$(CONFIG_IIO_BUFFER) += ad7606_ring.o 7 - ad7606-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o 8 - ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o 5 + ad7606-y := ad7606_core.o ad7606_ring.o 6 + obj-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o 7 + obj-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o 9 8 obj-$(CONFIG_AD7606) += ad7606.o 10 9 11 10 obj-$(CONFIG_AD7780) += ad7780.o
+4
drivers/staging/iio/adc/ad7606_core.c
··· 559 559 regulator_disable(st->reg); 560 560 return ERR_PTR(ret); 561 561 } 562 + EXPORT_SYMBOL_GPL(ad7606_probe); 562 563 563 564 int ad7606_remove(struct iio_dev *indio_dev, int irq) 564 565 { ··· 576 575 577 576 return 0; 578 577 } 578 + EXPORT_SYMBOL_GPL(ad7606_remove); 579 579 580 580 void ad7606_suspend(struct iio_dev *indio_dev) 581 581 { ··· 588 586 gpio_set_value(st->pdata->gpio_stby, 0); 589 587 } 590 588 } 589 + EXPORT_SYMBOL_GPL(ad7606_suspend); 591 590 592 591 void ad7606_resume(struct iio_dev *indio_dev) 593 592 { ··· 603 600 ad7606_reset(st); 604 601 } 605 602 } 603 + EXPORT_SYMBOL_GPL(ad7606_resume); 606 604 607 605 MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); 608 606 MODULE_DESCRIPTION("Analog Devices AD7606 ADC");
+1 -1
drivers/usb/chipidea/otg_fsm.h
··· 62 62 /* SSEND time before SRP */ 63 63 #define TB_SSEND_SRP (1500) /* minimum 1.5 sec, section:5.1.2 */ 64 64 65 - #ifdef CONFIG_USB_OTG_FSM 65 + #if IS_ENABLED(CONFIG_USB_OTG_FSM) 66 66 67 67 int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci); 68 68 int ci_otg_fsm_work(struct ci_hdrc *ci);
+1 -1
fs/logfs/logfs.h
··· 485 485 #endif 486 486 487 487 /* dev_mtd.c */ 488 - #ifdef CONFIG_MTD 488 + #if IS_ENABLED(CONFIG_MTD) 489 489 int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr); 490 490 #else 491 491 static inline int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr)
+6 -2
scripts/Makefile.build
··· 372 372 # <composite-object>-objs := <list of .o files> 373 373 # or 374 374 # <composite-object>-y := <list of .o files> 375 + # or 376 + # <composite-object>-m := <list of .o files> 377 + # The -m syntax only works if <composite object> is a module 375 378 link_multi_deps = \ 376 379 $(filter $(addprefix $(obj)/, \ 377 380 $($(subst $(obj)/,,$(@:.o=-objs))) \ 378 - $($(subst $(obj)/,,$(@:.o=-y)))), $^) 381 + $($(subst $(obj)/,,$(@:.o=-y))) \ 382 + $($(subst $(obj)/,,$(@:.o=-m)))), $^) 379 383 380 384 quiet_cmd_link_multi-y = LD $@ 381 385 cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) ··· 394 390 $(multi-used-m): FORCE 395 391 $(call if_changed,link_multi-m) 396 392 @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod) 397 - $(call multi_depend, $(multi-used-m), .o, -objs -y) 393 + $(call multi_depend, $(multi-used-m), .o, -objs -y -m) 398 394 399 395 targets += $(multi-used-y) $(multi-used-m) 400 396
+2
scripts/Makefile.extrawarn
··· 25 25 warning-1 += $(call cc-option, -Wmissing-include-dirs) 26 26 warning-1 += $(call cc-option, -Wunused-but-set-variable) 27 27 warning-1 += $(call cc-disable-warning, missing-field-initializers) 28 + warning-1 += $(call cc-disable-warning, sign-compare) 28 29 29 30 warning-2 := -Waggregate-return 30 31 warning-2 += -Wcast-align ··· 34 33 warning-2 += -Wshadow 35 34 warning-2 += $(call cc-option, -Wlogical-op) 36 35 warning-2 += $(call cc-option, -Wmissing-field-initializers) 36 + warning-2 += $(call cc-option, -Wsign-compare) 37 37 38 38 warning-3 := -Wbad-function-cast 39 39 warning-3 += -Wcast-qual
+2 -2
scripts/Makefile.lib
··· 48 48 49 49 # if $(foo-objs) exists, foo.o is a composite object 50 50 multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) 51 - multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) 51 + multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m)))) 52 52 multi-used := $(multi-used-y) $(multi-used-m) 53 53 single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m))) 54 54 ··· 67 67 68 68 # Replace multi-part objects by their individual parts, look at local dir only 69 69 real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y) 70 - real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) 70 + real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m))) 71 71 72 72 # Add subdir path 73 73
+1 -1
scripts/basic/fixdep.c
··· 251 251 } 252 252 253 253 /* test is s ends in sub */ 254 - static int strrcmp(char *s, char *sub) 254 + static int strrcmp(const char *s, const char *sub) 255 255 { 256 256 int slen = strlen(s); 257 257 int sublen = strlen(sub);
+4 -2
scripts/genksyms/genksyms.c
··· 423 423 struct string_list node = { 424 424 .string = buffer, 425 425 .tag = SYM_NORMAL }; 426 - int c; 426 + int c, in_string = 0; 427 427 428 428 while ((c = fgetc(f)) != EOF) { 429 - if (c == ' ') { 429 + if (!in_string && c == ' ') { 430 430 if (node.string == buffer) 431 431 continue; 432 432 break; 433 + } else if (c == '"') { 434 + in_string = !in_string; 433 435 } else if (c == '\n') { 434 436 if (node.string == buffer) 435 437 return NULL;