Skip to content

Commit

Permalink
ANDROID: HACK: Makefile: fix all build warnings for in tree code
Browse files Browse the repository at this point in the history
Undoes

commit 0fd6c92c20fe ("ANDROID: HACK: Makefile: whitelist CFLAGS to
reenable Werror")

now that we've backported all necessary fixes from upstream. Rather than
have one big warning-whitelist that blankets the kernel, push the
remaining warnings down into the deepest subdirs for out of tree code.
We will further work to fix out of tree warnings in b/37513383, and
b/62058353.

Bug: 37513383
Fixes: 62057517
Bug: 62058353
Change-Id: Ic4783357462ff4c6fa0ec69a03e9c57bca1b8fb1
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Rama Bondan Prakoso <ramanarubp@gmail.com>
  • Loading branch information
nickdesaulniers authored and ramabondanp committed Jan 19, 2020
1 parent cf0755a commit fd32799
Show file tree
Hide file tree
Showing 21 changed files with 60 additions and 28 deletions.
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -395,19 +395,6 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Wno-format-security \
-std=gnu89 $(call cc-option,-fno-PIE)

# TODO: remove me b/62057517
KBUILD_CFLAGS += \
-Wno-address-of-packed-member \
-Wno-unneeded-internal-declaration \
-Wno-enum-conversion \
-Wno-section \
-Wno-duplicate-decl-specifier \
-Wno-array-bounds \
-Wno-logical-not-parentheses \
-Wno-constant-conversion \
-Wno-parentheses-equality \
-Wno-gcc-compat \

ifeq ($(TARGET_BOARD_TYPE),auto)
KBUILD_CFLAGS += -DCONFIG_PLATFORM_AUTO
endif
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ obj-$(CONFIG_MSM_VIRTCLK_FRONTEND) += virtclk-front.o
obj-$(CONFIG_MSM_VIRTCLK_FRONTEND) += virt-reset-front.o
obj-$(CONFIG_MSM_VIRTCLK_FRONTEND_8996) += virtclk-front-8996.o

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-literal-conversion
2 changes: 1 addition & 1 deletion drivers/crypto/msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ obj-$(CONFIG_CRYPTO_DEV_QCRYPTO) += qcrypto.o
obj-$(CONFIG_CRYPTO_DEV_OTA_CRYPTO) += ota_crypto.o
obj-$(CONFIG_CRYPTO_DEV_QCOM_ICE) += ice.o

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
$(call cc-option,-Wno-frame-larger-than=) \
-Wno-ignored-attributes
2 changes: 1 addition & 1 deletion drivers/firmware/qcom/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
obj-$(CONFIG_MSM_TZ_LOG) += tz_log.o

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-ignored-attributes
4 changes: 4 additions & 0 deletions drivers/hwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,7 @@ obj-$(CONFIG_PMBUS) += pmbus/

ccflags-$(CONFIG_HWMON_DEBUG_CHIP) := -DDEBUG

#TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-logical-not-parentheses \
-Wno-enum-conversion
4 changes: 4 additions & 0 deletions drivers/i2c/busses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,7 @@ obj-$(CONFIG_I2C_XGENE_SLIMPRO) += i2c-xgene-slimpro.o
obj-$(CONFIG_SCx200_ACB) += scx200_acb.o

ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG

#TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-duplicate-decl-specifier
2 changes: 1 addition & 1 deletion drivers/media/platform/msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ obj-y += broadcast/
obj-$(CONFIG_DVB_MPQ) += dvb/
obj-$(CONFIG_MSM_AIS) += ais/

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-parentheses-equality
2 changes: 1 addition & 1 deletion drivers/media/platform/msm/vidc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ obj-$(CONFIG_MSM_VIDC_V4L2) += governors/

obj-$(CONFIG_MSM_VIDC_VMEM) += vmem/

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
$(call cc-option,-Wno-frame-larger-than=)
2 changes: 1 addition & 1 deletion drivers/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ obj-$(CONFIG_QPNP_MISC) += qpnp-misc.o
obj-$(CONFIG_MEMORY_STATE_TIME) += memory_state_time.o
obj-$(CONFIG_ANT_CHECK) += ant_check.o

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-ignored-attributes \
-Wno-header-guard
4 changes: 4 additions & 0 deletions drivers/platform/msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ obj-$(CONFIG_SEEMP_CORE) += seemp_core/
obj-$(CONFIG_USB_BAM) += usb_bam.o
obj-$(CONFIG_MSM_MHI_DEV) += mhi_dev/
obj-$(CONFIG_MSM_EXT_DISPLAY) += msm_ext_display.o

#TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-enum-conversion
2 changes: 1 addition & 1 deletion drivers/platform/msm/ipa/ipa_v3/ipahal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ obj-$(CONFIG_IPA3) += ipa_hal.o

ipa_hal-y := ipahal.o ipahal_reg.o ipahal_fltrt.o

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-shift-overflow
4 changes: 4 additions & 0 deletions drivers/power/supply/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ obj-$(CONFIG_BATTERY_BCL) += battery_current_limit.o
obj-$(CONFIG_QPNP_SMB2) += step-chg-jeita.o battery.o qpnp-smb2.o smb-lib.o pmic-voter.o storm-watch.o
obj-$(CONFIG_SMB138X_CHARGER) += battery.o smb138x-charger.o smb-lib.o pmic-voter.o storm-watch.o
obj-$(CONFIG_QPNP_QNOVO) += battery.o qpnp-qnovo.o

#TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-duplicate-decl-specifier
5 changes: 5 additions & 0 deletions drivers/soc/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,8 @@ obj-$(CONFIG_MSM_HAB) += hab/
obj-$(CONFIG_QCOM_QDSS_BRIDGE) += qdss_bridge.o
obj-$(CONFIG_MFSE_QMI) += mfse_qmi_v01.o mfse_qmi.o
obj-y += serial_num.o

# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-ignored-attributes \
-Wno-gcc-compat
6 changes: 4 additions & 2 deletions drivers/soc/qcom/msm_bus/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ obj-$(CONFIG_CORESIGHT) += msm_buspm_coresight_adhoc.o

obj-$(CONFIG_DEBUG_FS) += msm_bus_dbg.o

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-self-assign
-Wno-self-assign \
-Wno-parentheses-equality

6 changes: 5 additions & 1 deletion drivers/soc/qcom/qdsp6v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ obj-$(CONFIG_MSM_QDSP6_PDR) += audio_pdr.o
obj-$(CONFIG_MSM_QDSP6_NOTIFIER) += audio_notifier.o
obj-$(CONFIG_MSM_CDSP_LOADER) += cdsp-loader.o
obj-$(CONFIG_EXT_ANC) += sdsp-anc.o audio_anc.o audio-anc-dev-mgr.o
obj-$(CONFIG_MSM_LPASS_RESOURCE_MANAGER) += lpass_resource_mgr.o
obj-$(CONFIG_MSM_LPASS_RESOURCE_MANAGER) += lpass_resource_mgr.o

#TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-parentheses-equality
5 changes: 5 additions & 0 deletions drivers/staging/android/ion/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ obj-$(CONFIG_ION_DUMMY) += ion_dummy_driver.o
obj-$(CONFIG_ION_TEGRA) += tegra/
obj-$(CONFIG_ION_MSM) += msm/
obj-$(CONFIG_ION_MSM) += ion_system_secure_heap.o

#TODO: remove me b/62058353
# WE SHOULD FIX THIS ONE
subdir-ccflags-y += \
-Wno-enum-conversion
5 changes: 5 additions & 0 deletions drivers/thermal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ obj-$(CONFIG_THERMAL_MONITOR) += msm_thermal.o msm_thermal-dev.o
obj-$(CONFIG_LIMITS_MONITOR) += lmh_interface.o
obj-$(CONFIG_LIMITS_LITE_HW) += lmh_lite.o
obj-$(CONFIG_QCOM_THERMAL_LIMITS_DCVS) += msm_lmh_dcvs.o

#TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-parentheses-equality \
-Wno-enum-conversion
7 changes: 5 additions & 2 deletions drivers/video/fbdev/msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ obj-$(CONFIG_FB_MSM_QPIC_ILI_QVGA_PANEL) += qpic_panel_ili_qvga.o
obj-$(CONFIG_FB_MSM_MDSS) += mdss_fb.o mdss_util.o
obj-$(CONFIG_COMPAT) += mdss_compat_utils.o

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-header-guard
-Wno-header-guard \
-Wno-parentheses-equality \
-Wno-duplicate-decl-specifier

2 changes: 1 addition & 1 deletion security/pfe/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ ccflags-y += -Ifs/ext4
obj-$(CONFIG_PFT) += pft.o
obj-$(CONFIG_PFK) += pfk.o pfk_kc.o pfk_ice.o pfk_ext4.o pfk_ecryptfs.o

# TODO: remove me b/62057517
# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-ignored-attributes
4 changes: 4 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,7 @@ obj-$(CONFIG_SND_SOC_TPA6130A2) += snd-soc-tpa6130a2.o
obj-y += sdm660_cdc/
obj-y += msm_sdw/
obj-$(CONFIG_SND_SOC_MAX98937) += max98937/

# TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-enum-conversion
5 changes: 3 additions & 2 deletions sound/soc/msm/qdsp6v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ obj-y += audio_calibration.o audio_cal_utils.o q6adm.o q6afe.o q6asm.o \
ocmem-audio-objs += audio_ocmem.o
obj-$(CONFIG_AUDIO_OCMEM) += ocmem-audio.o

#TODO: remove me b/62057517
#TODO: remove me b/62058353
subdir-ccflags-y += \
-Wno-non-literal-null-conversion
-Wno-non-literal-null-conversion \
-Wno-duplicate-decl-specifier

0 comments on commit fd32799

Please sign in to comment.