Re: [PATCH 2/3] drm/i915: add yesno utility function

Daniel Vetter
2015-09-02T09:17:53Z

On Mon, Aug 31, 2015 at 03:33:13PM +0100, Chris Wilson wrote:
> On Mon, Aug 31, 2015 at 05:23:27PM +0300, Jani Nikula wrote:
> > On Thu, 27 Aug 2015, Jani Nikula <jani.nikula@intel.com> wrote:
> > > On Thu, 27 Aug 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > >> On Thu, Aug 27, 2015 at 04:23:30PM +0300, Jani Nikula wrote:
> > >>> Add a common function to return "yes" or "no" string based on the
> > >>> argument, and drop the local versions of it.
> > >>
> > >> Purely out of curiosity, gcc is able to amalgamate the constant strings
> > >> (I remember reading that it is intelligent enough to do so), right? i.e.
> > >> size i915.ko doesn't change (at least .data, we may see .text
> > >> differences for gcc having different ideas about inlines)?
> > >
> > > I admit to giving GCC the benefit of the doubt. I may be naïve that way,
> > > trusting the tools to do what seems like the obviously right thing to
> > > do.
> > >
> > > If GCC lets us down, we could try something like the yesno version in
> > > drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c. GCC not doing the
> > > right thing with that would be violating the standard.
> >
> > AFAICT GCC does the right thing with the patch.
>
> Fwiw, I didn't see any harm in the series, so
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Merged just this patch (due to conflict fun for now) to dinq, thanks.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation