lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 14 Feb 2020 18:29:44 +0000
From:   "Liu, Zhan" <Zhan.Liu@....com>
To:     'Nathan Chancellor' <natechancellor@...il.com>,
        "Wentland, Harry" <Harry.Wentland@....com>,
        "Li, Sun peng (Leo)" <Sunpeng.Li@....com>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "Koenig, Christian" <Christian.Koenig@....com>,
        "Zhou, David(ChunMing)" <David1.Zhou@....com>
CC:     "'clang-built-linux@...glegroups.com'" 
        <clang-built-linux@...glegroups.com>,
        "'dri-devel@...ts.freedesktop.org'" <dri-devel@...ts.freedesktop.org>,
        "'amd-gfx@...ts.freedesktop.org'" <amd-gfx@...ts.freedesktop.org>,
        "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] drm/amd/display: Don't take the address of
 skip_scdc_overwrite in dc_link_detect_helper


> -----Original Message-----
> From: Liu, Zhan
> Sent: 2020/February/14, Friday 11:01 AM
> To: Nathan Chancellor <natechancellor@...il.com>; Wentland, Harry
> <Harry.Wentland@....com>; Li, Sun peng (Leo) <Sunpeng.Li@....com>;
> Deucher, Alexander <Alexander.Deucher@....com>; Koenig, Christian
> <Christian.Koenig@....com>; Zhou, David(ChunMing)
> <David1.Zhou@....com>
> Cc: clang-built-linux@...glegroups.com; dri-devel@...ts.freedesktop.org;
> amd-gfx@...ts.freedesktop.org; linux-kernel@...r.kernel.org
> Subject: RE: [PATCH] drm/amd/display: Don't take the address of
> skip_scdc_overwrite in dc_link_detect_helper
> 
> 
> 
> > -----Original Message-----
> > From: dri-devel <dri-devel-bounces@...ts.freedesktop.org> On Behalf Of
> > Nathan Chancellor
> > Sent: 2020/February/14, Friday 1:30 AM
> > To: Wentland, Harry <Harry.Wentland@....com>; Li, Sun peng (Leo)
> > <Sunpeng.Li@....com>; Deucher, Alexander
> <Alexander.Deucher@....com>;
> > Koenig, Christian <Christian.Koenig@....com>; Zhou, David(ChunMing)
> > <David1.Zhou@....com>
> > Cc: clang-built-linux@...glegroups.com; Nathan Chancellor
> > <natechancellor@...il.com>; dri-devel@...ts.freedesktop.org; amd-
> > gfx@...ts.freedesktop.org; linux-kernel@...r.kernel.org
> > Subject: [PATCH] drm/amd/display: Don't take the address of
> > skip_scdc_overwrite in dc_link_detect_helper
> >
> > Clang warns:
> >
> > ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:980:36:
> > warning: address of 'sink->edid_caps.panel_patch.skip_scdc_overwrite'
> > will always evaluate to 'true' [-Wpointer-bool-conversion]
> >                 if (&sink->edid_caps.panel_patch.skip_scdc_overwrite)
> >                 ~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
> > 1 warning generated.
> >
> > This is probably not what was intended so remove the address of
> > operator, which matches how skip_scdc_overwrite is handled in the rest of
> the driver.
> >
> > While we're here, drop an extra newline after this if block.
> >
> > Fixes: a760fc1bff03 ("drm/amd/display: add monitor patch to disable
> > SCDC
> > read/write")
> > Link:
> > https://github.com/ClangBuiltLinux/linux/issues/879
> > Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> 
> Thank you!
> Reviewed-by: Zhan Liu <zhan.liu@....com>

Also applied, thanks!

Zhan

> 
> > ---
> >
> > As an aside, I don't see skip_scdc_overwrite assigned a value
> > anywhere, is this working as intended?
> >
> >  drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> > b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> > index 24d99849be5e..a3bfa05c545e 100644
> > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> > @@ -977,10 +977,9 @@ static bool dc_link_detect_helper(struct dc_link
> > *link,
> >  		if ((prev_sink != NULL) && ((edid_status == EDID_THE_SAME)
> > || (edid_status == EDID_OK)))
> >  			same_edid = is_same_edid(&prev_sink->dc_edid,
> &sink->dc_edid);
> >
> > -		if (&sink->edid_caps.panel_patch.skip_scdc_overwrite)
> > +		if (sink->edid_caps.panel_patch.skip_scdc_overwrite)
> >  			link->ctx->dc->debug.hdmi20_disable = true;
> >
> > -
> >  		if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT
> &&
> >  			sink_caps.transaction_type ==
> > DDC_TRANSACTION_TYPE_I2C_OVER_AUX) {
> >  			/*
> > --
> > 2.25.0
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@...ts.freedesktop.org

Powered by blists - more mailing lists