• Jani Nikula's avatar
    drm: enable (most) W=1 warnings by default across the subsystem · a61ddb43
    Jani Nikula authored
    At least the i915 and amd drivers enable a bunch more compiler warnings
    than the kernel defaults.
    
    Extend most of the W=1 warnings to the entire drm subsystem by
    default. Use the copy-pasted warnings from scripts/Makefile.extrawarn
    with s/KBUILD_CFLAGS/subdir-ccflags-y/ to make it easier to compare and
    keep up with them in the future.
    
    This is similar to the approach currently used in i915.
    
    Some of the -Wextra warnings do need to be disabled, just like in
    Makefile.extrawarn, but take care to not disable them for W=2 or W=3
    builds, depending on the warning.
    
    There are too many -Wformat-truncation warnings to cleanly fix up front;
    leave that warning disabled for now.
    
    v3:
    - Drop -Wmissing-declarations (already enabled by default)
    - Drop -Wmissing-prototypes (already enabled by default)
    
    v2:
    - Drop -Wformat-truncation (too many warnings)
    - Drop -Wstringop-overflow (already enabled by default)
    
    Cc: David Airlie <airlied@gmail.com>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Maxime Ripard <mripard@kernel.org>
    Cc: Thomas Zimmermann <tzimmermann@suse.de>
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: Christian König <christian.koenig@amd.com>
    Cc: Pan
    Cc: Karol Herbst <kherbst@redhat.com>
    Cc: Lyude Paul <lyude@redhat.com>
    Cc: Rob Clark <robdclark@gmail.com>
    Cc: Abhinav Kumar <quic_abhinavk@quicinc.com>
    Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Cc: Sean Paul <sean@poorly.run>
    Cc: Marijn Suijten <marijn.suijten@somainline.org>
    Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>
    Acked-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
    Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Acked-by: default avatarSui Jingfeng <sui.jingfeng@linux.dev>
    Acked-by: default avatarDanilo Krummrich <dakr@redhat.com>
    Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/a50f1a69d5af72e913996179a75bc3a71d81ebea.1709629403.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    a61ddb43
Makefile 6.06 KB