Re: [RFC] drm: enable W=1 warnings by default across the subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 30 Nov 2023 at 11:18, Maxime Ripard <mripard@xxxxxxxxxx> wrote:
>
> Hi,
>
> On Thu, Nov 30, 2023 at 10:52:17AM +0200, Jani Nikula wrote:
> > On Wed, 29 Nov 2023, Hamza Mahfooz <hamza.mahfooz@xxxxxxx> wrote:
> > > Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
> > >
> > > On 11/29/23 13:12, Jani Nikula wrote:
> > >> At least the i915 and amd drivers enable a bunch more compiler warnings
> > >> than the kernel defaults.
> > >>
> > >> Extend 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.
> > >
> > > I think this should go in after drm-misc-next has a clean build (for
> > > COMPILE_TEST builds) with this patch applied. Otherwise, it will break a
> > > lot of build configs.
> >
> > Oh, I'm absolutely not suggesting this should be merged before known
> > warnings have been addressed one way or another. Either by fixing them
> > or by disabling said warning in driver local Makefiles, depending on the
> > case.
>
> I'm all for it, but yeah, we need some easy way to opt-in/opt-out. Some
> drivers are pretty much unmaintained now and are likely to never fix
> those warnings.

Then maybe they should have the same fate as other undermaintained
drivers: either they get fixed, or they get dropped?


-- 
With best wishes
Dmitry



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux