mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
The compiler option -Wmissing-prototypes is being enabled globally in
the upstream Linux kernel and this causes build failures for various
drivers. The build failures occur because either the driver is missing
an include file which has the prototype or because the function is not
declared statically when it should be (ie. there are no external users).
Fix the various build failures and enable -Wmissing-prototypes to
prevent any new instances from occurring. Note that the only driver that
is not fixed at the moment is rtl8822ce due to large number of failures
and so build this with '-Wno-missing-prototypes' for now, which is not
different to how it was being compiled prior to this change.
Bug 4404965
Change-Id: Ie5572d23659e0346fa035d645d9043b0a6da5fdc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027488
(cherry picked from commit d5391a25ab)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3034644
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
74 lines
2.4 KiB
Makefile
74 lines
2.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
LINUXINCLUDE += -I$(srctree.nvconftest)
|
|
LINUXINCLUDE += -I$(srctree.nvidia-oot)/include
|
|
|
|
subdir-ccflags-y += -Werror
|
|
subdir-ccflags-y += -Wmissing-prototypes
|
|
|
|
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
|
|
LINUX_VERSION_6_2 := $(shell expr 6 \* 256 + 2)
|
|
LINUX_VERSION_6_3 := $(shell expr 6 \* 256 + 3)
|
|
LINUX_VERSION_6_6 := $(shell expr 6 \* 256 + 6)
|
|
|
|
# The Tegra IVC driver was updated to support iosys-map in Linux v6.2.
|
|
# For Linux v6.2 kernels, don't build any drivers that requires this.
|
|
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_2); echo $$?),0)
|
|
export CONFIG_TEGRA_IVC_LEGACY_DISABLE=y
|
|
endif
|
|
|
|
ifeq ($(CONFIG_TEGRA_IVC_LEGACY_DISABLE),y)
|
|
subdir-ccflags-y += -DCONFIG_TEGRA_IVC_LEGACY_DISABLE
|
|
endif
|
|
|
|
# Legacy GPIO support is removed in Linux v6.3
|
|
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_3); echo $$?),0)
|
|
export CONFIG_TEGRA_GPIO_LEGACY_DISABLE=y
|
|
endif
|
|
|
|
# Changes done in Linux 6.6 onwards
|
|
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_6); echo $$?),0)
|
|
# Move probe to DAI Ops.
|
|
export CONFIG_SND_SOC_MOVE_DAI_PROBE_TO_OPS=y
|
|
subdir-ccflags-y += -DNV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_ARG
|
|
|
|
# probe_new is removed from i2c driver structure
|
|
subdir-ccflags-y += -DNV_I2C_LEGACY_PROBE_NEW_REMOVED
|
|
|
|
# API changes to replace u8 with unsigned char
|
|
subdir-ccflags-y += -DNV_TTY_SERIAL_TYPE_U8_CHANGE
|
|
|
|
# v4l2_async_subdev is renamed to v4l2_async_connection.
|
|
subdir-ccflags-y += -DNV_V4L2_ASYNC_SUBDEV_RENAME
|
|
|
|
# Rename V4L2_ASYNC_MATCH_FWNODE to V4L2_ASYNC_MATCH_TYPE_FWNODE
|
|
subdir-ccflags-y += -DNV_V4L2_ASYNC_MATCH_FWNODE_RENAME
|
|
|
|
# Rename async_nf_init and v4l2_async_subdev_nf_register
|
|
subdir-ccflags-y += -DNV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME
|
|
|
|
# Crypto driver has major change in it ops, skip it
|
|
export CONFIG_SKIP_CRYPTO=y
|
|
endif
|
|
|
|
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)
|
|
subdir-ccflags-y += -DCONFIG_TEGRA_VIRTUALIZATION
|
|
endif
|
|
|
|
ifeq ($(CONFIG_TEGRA_SYSTEM_TYPE_ACK),y)
|
|
subdir-ccflags-y += -DCONFIG_TEGRA_SYSTEM_TYPE_ACK
|
|
subdir-ccflags-y += -Wno-sometimes-uninitialized
|
|
subdir-ccflags-y += -Wno-parentheses-equality
|
|
subdir-ccflags-y += -Wno-enum-conversion
|
|
subdir-ccflags-y += -Wno-implicit-fallthrough
|
|
endif
|
|
|
|
obj-m += drivers/
|
|
|
|
ifdef CONFIG_SND_SOC
|
|
obj-m += sound/soc/tegra/
|
|
obj-m += sound/tegra-safety-audio/
|
|
obj-m += sound/soc/tegra-virt-alt/
|
|
endif
|