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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 17 Feb 2022 03:40:03 +0300
From:   Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To:     Kuogee Hsieh <quic_khsieh@...cinc.com>,
        Stephen Boyd <swboyd@...omium.org>, agross@...nel.org,
        airlied@...ux.ie, bjorn.andersson@...aro.org, daniel@...ll.ch,
        dri-devel@...ts.freedesktop.org, robdclark@...il.com,
        sean@...rly.run, vkoul@...nel.org
Cc:     quic_abhinavk@...cinc.com, quic_aravindh@...cinc.com,
        quic_sbillaka@...cinc.com, freedreno@...ts.freedesktop.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] drm/msm/dp: replace DRM_DEBUG_DP marco with
 drm_dbg_dp

On 17/02/2022 03:22, Kuogee Hsieh wrote:
> 
> On 2/16/2022 3:46 PM, Stephen Boyd wrote:
>> Quoting Kuogee Hsieh (2022-02-02 10:56:39)
>>
>> Please add some commit text
>>
>>> Signed-off-by: Kuogee Hsieh <quic_khsieh@...cinc.com>
>>> ---
>>>   drivers/gpu/drm/msm/dp/dp_audio.c   |  49 +++++++++++------
>>>   drivers/gpu/drm/msm/dp/dp_catalog.c |  34 +++++++-----
>>>   drivers/gpu/drm/msm/dp/dp_ctrl.c    | 106 
>>> +++++++++++++++++++-----------------
>>>   drivers/gpu/drm/msm/dp/dp_display.c |  68 +++++++++++++----------
>>>   drivers/gpu/drm/msm/dp/dp_drm.c     |   4 +-
>>>   drivers/gpu/drm/msm/dp/dp_link.c    |  99 
>>> +++++++++++++++++++--------------
>>>   drivers/gpu/drm/msm/dp/dp_panel.c   |  43 +++++++++------
>>>   drivers/gpu/drm/msm/dp/dp_parser.c  |   2 +-
>>>   drivers/gpu/drm/msm/dp/dp_power.c   |  20 ++++---
>>>   9 files changed, 246 insertions(+), 179 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/msm/dp/dp_audio.c 
>>> b/drivers/gpu/drm/msm/dp/dp_audio.c
>>> index d7e4a39..4fbbe0a 100644
>>> --- a/drivers/gpu/drm/msm/dp/dp_audio.c
>>> +++ b/drivers/gpu/drm/msm/dp/dp_audio.c
>>> @@ -136,7 +136,8 @@ static void dp_audio_stream_sdp(struct 
>>> dp_audio_private *audio)
>>>          parity_byte = dp_audio_calculate_parity(new_value);
>>>          value |= ((new_value << HEADER_BYTE_1_BIT)
>>>                          | (parity_byte << PARITY_BYTE_1_BIT));
>>> -       DRM_DEBUG_DP("Header Byte 1: value = 0x%x, parity_byte = 
>>> 0x%x\n",
>>> +       drm_dbg_dp((struct drm_device *)NULL,
>> Why can't we pass the platform device pointer? Surely the cast is not
>> necessary and in fact harmful.
> 
> Platform device only available at top level (dp_display.c), other level 
> has no access to platform device or drm_device.

You can pass the platform device (or even better, drm device) to other 
driver blocks too. It's not something to be kept in secret in 
dp_display.c only.

> 
> I will just apss NULL, such as  drm_dbg_dp(NULL, ...), if not device 
> available.



-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ