From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Tomi Sarvela <tomi.p.sarvela@intel.com>
Subject: Re: [PATCH 1/2] drm/i915: Disable -Woverride-init
Date: Wed, 18 Jan 2017 17:56:13 +0200 [thread overview]
Message-ID: <1484754973.3113.2.camel@linux.intel.com> (raw)
In-Reply-To: <20170118121808.27869-1-chris@chris-wilson.co.uk>
On ke, 2017-01-18 at 12:18 +0000, Chris Wilson wrote:
> We commonly use an inheritance style approach to device parameters,
> where later generations inherit the defaults from earlier generations
> and then override settings that change. For example, in i915_pci.c
> BDW_FEATURES pulls in HSW_FEATURES, makes a few changes for 48bit
> contexts and then individual Broadwell stanzas make further adjustments
> for different GT configs.
>
> This causes a lot of warnings with make W=1 from -Woverride-init. We
> could use
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Woverride-init"
> ...
> #pragma GCC diagnostic pop
> around the offenders, but the pattern is used frequently enough in the
> driver to prefer just disabling the warning entirely.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
<SNIP>
> -subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror
> +subdir-ccflags-y := -Wno-override-init # used frequently for "inheritance"
Why always on, if somebody upper level decides to -Werror, this is
kinda unexpected for them?
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-01-18 15:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 12:18 [PATCH 1/2] drm/i915: Disable -Woverride-init Chris Wilson
2017-01-18 12:18 ` [PATCH 2/2] drm/i915: Fix W=1 warning for csr_load_work_fn() Chris Wilson
2017-01-18 14:24 ` Mika Kuoppala
2017-01-18 15:56 ` Joonas Lahtinen [this message]
2017-01-18 16:27 ` [PATCH 1/2] drm/i915: Disable -Woverride-init Chris Wilson
2017-01-23 8:00 ` Joonas Lahtinen
-- strict thread matches above, loose matches on Subject: below --
2017-10-13 16:08 Chris Wilson
2017-10-13 16:18 ` Michal Wajdeczko
2017-10-13 16:47 ` Ville Syrjälä
2017-10-13 19:34 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484754973.3113.2.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=tomi.p.sarvela@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).