mbox series

[v3,0/4] drm/tests: Fix some memory leaks

Message ID 20241017063125.3080347-1-ruanjinjie@huawei.com (mailing list archive)
Headers show
Series drm/tests: Fix some memory leaks | expand

Message

Jinjie Ruan Oct. 17, 2024, 6:31 a.m. UTC
Fix some memory leaks in drm tests.

Changes in v3:
- Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
- Drop the "helper" in the helper name.
- s/fllowing/following/
- Add Acked-by.

Changes in v2:
- Fix it with new introduced helper instead of drm_mode_destroy().
- Update the commit message.
- Add Reviewed-by.

Jinjie Ruan (4):
  drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic()
  drm/connector: hdmi: Fix memory leak in
    drm_display_mode_from_cea_vic()
  drm/ttm/tests: Fix memory leak in ttm_tt_simple_create()
  drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic()

 drivers/gpu/drm/tests/drm_connector_test.c    | 24 +++++------
 .../drm/tests/drm_hdmi_state_helper_test.c    |  8 ++--
 drivers/gpu/drm/tests/drm_kunit_helpers.c     | 40 +++++++++++++++++++
 drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c |  1 +
 include/drm/drm_kunit_helpers.h               |  4 ++
 5 files changed, 61 insertions(+), 16 deletions(-)

Comments

Maxime Ripard Oct. 18, 2024, 7:55 a.m. UTC | #1
Hi,

On Thu, Oct 17, 2024 at 02:31:21PM GMT, Jinjie Ruan wrote:
> Fix some memory leaks in drm tests.
> 
> Changes in v3:
> - Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
> - Drop the "helper" in the helper name.
> - s/fllowing/following/
> - Add Acked-by.

This creates build failures since drm_display_mode were const before,
and can't anymore.

Maxime
Jinjie Ruan Oct. 18, 2024, 8:07 a.m. UTC | #2
On 2024/10/18 15:55, Maxime Ripard wrote:
> Hi,
> 
> On Thu, Oct 17, 2024 at 02:31:21PM GMT, Jinjie Ruan wrote:
>> Fix some memory leaks in drm tests.
>>
>> Changes in v3:
>> - Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
>> - Drop the "helper" in the helper name.
>> - s/fllowing/following/
>> - Add Acked-by.
> 
> This creates build failures since drm_display_mode were const before,
> and can't anymore.

Let me fix it, thank you!

> 
> Maxime
Jinjie Ruan Oct. 18, 2024, 8:12 a.m. UTC | #3
On 2024/10/18 15:55, Maxime Ripard wrote:
> Hi,
> 
> On Thu, Oct 17, 2024 at 02:31:21PM GMT, Jinjie Ruan wrote:
>> Fix some memory leaks in drm tests.
>>
>> Changes in v3:
>> - Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
>> - Drop the "helper" in the helper name.
>> - s/fllowing/following/
>> - Add Acked-by.
> 
> This creates build failures since drm_display_mode were const before,
> and can't anymore.

It seems it came from bellowing v1, and this v3 has not reported the
issue yet.

https://lore.kernel.org/all/202410180830.oitxTsOv-lkp@intel.com/

> 
> Maxime
Jinjie Ruan Oct. 23, 2024, 1:35 a.m. UTC | #4
On 2024/10/18 16:12, Jinjie Ruan wrote:
> 
> 
> On 2024/10/18 15:55, Maxime Ripard wrote:
>> Hi,
>>
>> On Thu, Oct 17, 2024 at 02:31:21PM GMT, Jinjie Ruan wrote:
>>> Fix some memory leaks in drm tests.
>>>
>>> Changes in v3:
>>> - Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
>>> - Drop the "helper" in the helper name.
>>> - s/fllowing/following/
>>> - Add Acked-by.
>>
>> This creates build failures since drm_display_mode were const before,
>> and can't anymore.
> 
> It seems it came from bellowing v1, and this v3 has not reported the
> issue yet.
> 
> https://lore.kernel.org/all/202410180830.oitxTsOv-lkp@intel.com/

Hi, Maxime,

Should this series send again? The issue seems not related to this version.

> 
>>
>> Maxime
> 
>
Maxime Ripard Oct. 25, 2024, 2:33 p.m. UTC | #5
On Wed, Oct 23, 2024 at 09:35:59AM +0800, Jinjie Ruan wrote:
> 
> 
> On 2024/10/18 16:12, Jinjie Ruan wrote:
> > 
> > 
> > On 2024/10/18 15:55, Maxime Ripard wrote:
> >> Hi,
> >>
> >> On Thu, Oct 17, 2024 at 02:31:21PM GMT, Jinjie Ruan wrote:
> >>> Fix some memory leaks in drm tests.
> >>>
> >>> Changes in v3:
> >>> - Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
> >>> - Drop the "helper" in the helper name.
> >>> - s/fllowing/following/
> >>> - Add Acked-by.
> >>
> >> This creates build failures since drm_display_mode were const before,
> >> and can't anymore.
> > 
> > It seems it came from bellowing v1, and this v3 has not reported the
> > issue yet.
> > 
> > https://lore.kernel.org/all/202410180830.oitxTsOv-lkp@intel.com/
> 
> Hi, Maxime,
> 
> Should this series send again? The issue seems not related to this version.

As far as I know, the issues reported still apply there, so yes

Maxime
Jinjie Ruan Oct. 26, 2024, 2:02 a.m. UTC | #6
On 2024/10/25 22:33, Maxime Ripard wrote:
> On Wed, Oct 23, 2024 at 09:35:59AM +0800, Jinjie Ruan wrote:
>>
>>
>> On 2024/10/18 16:12, Jinjie Ruan wrote:
>>>
>>>
>>> On 2024/10/18 15:55, Maxime Ripard wrote:
>>>> Hi,
>>>>
>>>> On Thu, Oct 17, 2024 at 02:31:21PM GMT, Jinjie Ruan wrote:
>>>>> Fix some memory leaks in drm tests.
>>>>>
>>>>> Changes in v3:
>>>>> - Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
>>>>> - Drop the "helper" in the helper name.
>>>>> - s/fllowing/following/
>>>>> - Add Acked-by.
>>>>
>>>> This creates build failures since drm_display_mode were const before,
>>>> and can't anymore.
>>>
>>> It seems it came from bellowing v1, and this v3 has not reported the
>>> issue yet.
>>>
>>> https://lore.kernel.org/all/202410180830.oitxTsOv-lkp@intel.com/
>>
>> Hi, Maxime,
>>
>> Should this series send again? The issue seems not related to this version.
> 
> As far as I know, the issues reported still apply there, so yes

Hi, Maxime,

I make this version code with "C=2", there is no these build failures.

> 
> Maxime
Maxime Ripard Oct. 29, 2024, 8:15 a.m. UTC | #7
On Sat, Oct 26, 2024 at 10:02:51AM +0800, Jinjie Ruan wrote:
> 
> 
> On 2024/10/25 22:33, Maxime Ripard wrote:
> > On Wed, Oct 23, 2024 at 09:35:59AM +0800, Jinjie Ruan wrote:
> >>
> >>
> >> On 2024/10/18 16:12, Jinjie Ruan wrote:
> >>>
> >>>
> >>> On 2024/10/18 15:55, Maxime Ripard wrote:
> >>>> Hi,
> >>>>
> >>>> On Thu, Oct 17, 2024 at 02:31:21PM GMT, Jinjie Ruan wrote:
> >>>>> Fix some memory leaks in drm tests.
> >>>>>
> >>>>> Changes in v3:
> >>>>> - Adjust drm/drm_edid.h header to drm_kunit_helpers.c.
> >>>>> - Drop the "helper" in the helper name.
> >>>>> - s/fllowing/following/
> >>>>> - Add Acked-by.
> >>>>
> >>>> This creates build failures since drm_display_mode were const before,
> >>>> and can't anymore.
> >>>
> >>> It seems it came from bellowing v1, and this v3 has not reported the
> >>> issue yet.
> >>>
> >>> https://lore.kernel.org/all/202410180830.oitxTsOv-lkp@intel.com/
> >>
> >> Hi, Maxime,
> >>
> >> Should this series send again? The issue seems not related to this version.
> > 
> > As far as I know, the issues reported still apply there, so yes
>
> I make this version code with "C=2", there is no these build failures.

Sorry, you're right. I still have a comment on the first patch

Maxime