[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915: Splitting intel_dp_detect

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Apr 7 10:56:01 UTC 2016


On to, 2016-04-07 at 11:00 +0100, Tvrtko Ursulin wrote:
> On 07/04/16 08:58, Jani Nikula wrote:
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index da0c3d29fda8..0890e71db188 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -3799,6 +3799,9 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
> >   	 */
> >   	intel_dp->sink_count = DP_GET_SINK_COUNT(intel_dp->sink_count);
> > 
> > +	if (is_edp(intel_dp))
> > +		intel_dp->sink_count = max(intel_dp->sink_count, 1);

It should be max(intel_dp->sink_count, (u8)1)

Which is essentially the same as max_t(u8, ...)

> > +
> >   	/*
> >   	 * SINK_COUNT == 0 and DOWNSTREAM_PORT_PRESENT == 1 implies that
> >   	 * a dongle is present but no display. Unless we require to know
> FWIW this patch fixes it on my BDW RVP.
> 
> I just had to change it to max_t since max has an issue with taking an 
> address of const 1 by the look of it.

The problem is differing types, taking address of a constant is not a
problem, differing types when comparing pointers is.

The whole address taking line in max macro is there to make the pointer
type comparison at compile time.

Regards, joonas

> 
> Regards,
> 
> Tvrtko
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list