mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
c97dac57c8
Prevent warnings of the form:
tools/testing/nvdimm/config_check.c:4:6: error: no previous prototype
for ‘check’ [-Werror=missing-prototypes]
...by locally disabling some warnings.
It turns out that:
Commit 0fcb70851f
("Makefile.extrawarn: turn on missing-prototypes globally")
...in addition to expanding in-tree coverage, also impacts out-of-tree
module builds like those in tools/testing/nvdimm/.
Filter out the warning options on unit test code that does not effect
mainline builds.
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://lore.kernel.org/r/170543984331.460832.1780246477583036191.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
88 lines
2.6 KiB
Makefile
88 lines
2.6 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
ldflags-y += --wrap=ioremap_wc
|
|
ldflags-y += --wrap=memremap
|
|
ldflags-y += --wrap=devm_ioremap
|
|
ldflags-y += --wrap=devm_memremap
|
|
ldflags-y += --wrap=devm_memunmap
|
|
ldflags-y += --wrap=ioremap
|
|
ldflags-y += --wrap=iounmap
|
|
ldflags-y += --wrap=memunmap
|
|
ldflags-y += --wrap=__devm_request_region
|
|
ldflags-y += --wrap=__devm_release_region
|
|
ldflags-y += --wrap=__request_region
|
|
ldflags-y += --wrap=__release_region
|
|
ldflags-y += --wrap=devm_memremap_pages
|
|
ldflags-y += --wrap=insert_resource
|
|
ldflags-y += --wrap=remove_resource
|
|
ldflags-y += --wrap=acpi_evaluate_object
|
|
ldflags-y += --wrap=acpi_evaluate_dsm
|
|
|
|
DRIVERS := ../../../drivers
|
|
NVDIMM_SRC := $(DRIVERS)/nvdimm
|
|
ACPI_SRC := $(DRIVERS)/acpi/nfit
|
|
DAX_SRC := $(DRIVERS)/dax
|
|
ccflags-y := -I$(srctree)/drivers/nvdimm/
|
|
ccflags-y += -I$(srctree)/drivers/acpi/nfit/
|
|
|
|
obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
|
|
obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
|
|
obj-$(CONFIG_ND_BTT) += nd_btt.o
|
|
obj-$(CONFIG_X86_PMEM_LEGACY) += nd_e820.o
|
|
obj-$(CONFIG_ACPI_NFIT) += nfit.o
|
|
ifeq ($(CONFIG_DAX),m)
|
|
obj-$(CONFIG_DAX) += dax.o
|
|
endif
|
|
obj-$(CONFIG_DEV_DAX) += device_dax.o
|
|
obj-$(CONFIG_DEV_DAX_PMEM) += dax_pmem.o
|
|
|
|
nfit-y := $(ACPI_SRC)/core.o
|
|
nfit-y += $(ACPI_SRC)/intel.o
|
|
nfit-$(CONFIG_X86_MCE) += $(ACPI_SRC)/mce.o
|
|
nfit-y += acpi_nfit_test.o
|
|
nfit-y += config_check.o
|
|
|
|
nd_pmem-y := $(NVDIMM_SRC)/pmem.o
|
|
nd_pmem-y += pmem-dax.o
|
|
nd_pmem-y += pmem_test.o
|
|
nd_pmem-y += config_check.o
|
|
|
|
nd_btt-y := $(NVDIMM_SRC)/btt.o
|
|
nd_btt-y += config_check.o
|
|
|
|
nd_e820-y := $(NVDIMM_SRC)/e820.o
|
|
nd_e820-y += config_check.o
|
|
|
|
dax-y := $(DAX_SRC)/super.o
|
|
dax-y += $(DAX_SRC)/bus.o
|
|
dax-y += config_check.o
|
|
|
|
device_dax-y := $(DAX_SRC)/device.o
|
|
device_dax-y += dax-dev.o
|
|
device_dax-y += device_dax_test.o
|
|
device_dax-y += config_check.o
|
|
|
|
dax_pmem-y := $(DAX_SRC)/pmem.o
|
|
dax_pmem-y += dax_pmem_test.o
|
|
dax_pmem-y += config_check.o
|
|
|
|
libnvdimm-y := $(NVDIMM_SRC)/core.o
|
|
libnvdimm-y += $(NVDIMM_SRC)/bus.o
|
|
libnvdimm-y += $(NVDIMM_SRC)/dimm_devs.o
|
|
libnvdimm-y += $(NVDIMM_SRC)/dimm.o
|
|
libnvdimm-y += $(NVDIMM_SRC)/region_devs.o
|
|
libnvdimm-y += $(NVDIMM_SRC)/region.o
|
|
libnvdimm-y += $(NVDIMM_SRC)/namespace_devs.o
|
|
libnvdimm-y += $(NVDIMM_SRC)/label.o
|
|
libnvdimm-y += $(NVDIMM_SRC)/badrange.o
|
|
libnvdimm-$(CONFIG_ND_CLAIM) += $(NVDIMM_SRC)/claim.o
|
|
libnvdimm-$(CONFIG_BTT) += $(NVDIMM_SRC)/btt_devs.o
|
|
libnvdimm-$(CONFIG_NVDIMM_PFN) += $(NVDIMM_SRC)/pfn_devs.o
|
|
libnvdimm-$(CONFIG_NVDIMM_DAX) += $(NVDIMM_SRC)/dax_devs.o
|
|
libnvdimm-$(CONFIG_NVDIMM_KEYS) += $(NVDIMM_SRC)/security.o
|
|
libnvdimm-y += libnvdimm_test.o
|
|
libnvdimm-y += config_check.o
|
|
|
|
KBUILD_CFLAGS := $(filter-out -Wmissing-prototypes -Wmissing-declarations, $(KBUILD_CFLAGS))
|
|
|
|
obj-m += test/
|