From: Jinjie Ruan <ruanjinjie@huawei.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: <maarten.lankhorst@linux.intel.com>, <tzimmermann@suse.de>,
<airlied@gmail.com>, <simona@ffwll.ch>,
<christian.koenig@amd.com>, <ray.huang@amd.com>,
<dmitry.baryshkov@linaro.org>, <dave.stevenson@raspberrypi.com>,
<mcanal@igalia.com>, <quic_jjohnson@quicinc.com>,
<skhan@linuxfoundation.org>, <davidgow@google.com>,
<karolina.stolarek@intel.com>, <Arunpravin.PaneerSelvam@amd.com>,
<thomas.hellstrom@linux.intel.com>, <asomalap@amd.com>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic()
Date: Thu, 17 Oct 2024 20:16:29 +0800 [thread overview]
Message-ID: <2621a412-1ca6-5282-ffba-30b544466076@huawei.com> (raw)
In-Reply-To: <20241017-fearless-terrier-from-avalon-b9769f@houat>
On 2024/10/17 20:13, Maxime Ripard wrote:
> On Thu, Oct 17, 2024 at 09:33:07AM GMT, Jinjie Ruan wrote:
>>>> diff --git a/include/drm/drm_kunit_helpers.h b/include/drm/drm_kunit_helpers.h
>>>> index e7cc17ee4934..1e7fd4be550c 100644
>>>> --- a/include/drm/drm_kunit_helpers.h
>>>> +++ b/include/drm/drm_kunit_helpers.h
>>>> @@ -4,6 +4,7 @@
>>>> #define DRM_KUNIT_HELPERS_H_
>>>>
>>>> #include <drm/drm_drv.h>
>>>> +#include <drm/drm_edid.h>
>>>>
>>>> #include <linux/device.h>
>>>>
>>>> @@ -120,4 +121,9 @@ drm_kunit_helper_create_crtc(struct kunit *test,
>>>> const struct drm_crtc_funcs *funcs,
>>>> const struct drm_crtc_helper_funcs *helper_funcs);
>>>>
>>>> +struct drm_display_mode *
>>>> +drm_kunit_helper_display_mode_from_cea_vic(struct kunit *test,
>>>> + struct drm_device *dev,
>>>> + u8 video_code);
>>>
>>> It's not clear to me what you need the drm_edid header, you just return
>>> a drm_display_mode pointer so you can just forward declare the structure
>>
>>
>> There is a compile error without the header,because there is no
>> "drm_display_mode_from_cea_vic()" declare.
>>
>> drivers/gpu/drm/tests/drm_kunit_helpers.c:341:16: error: implicit
>> declaration of function ‘drm_display_mode_from_cea_vic’; did you mean
>> ‘drm_kunit_display_mode_from_cea_vic’?
>> [-Werror=implicit-function-declaration]
>> 341 | mode = drm_display_mode_from_cea_vic(dev, video_code);
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> | drm_kunit_display_mode_from_cea_vic
>> drivers/gpu/drm/tests/drm_kunit_helpers.c:341:14: warning: assignment to
>> ‘struct drm_display_mode *’ from ‘int’ makes pointer from integer
>> without a cast [-Wint-conversion]
>> 341 | mode = drm_display_mode_from_cea_vic(dev, video_code);
>> | ^
> > Right, but the error is in the C file, not the header.
Yes, I have updated it to C file in V3, thank you!
>
> Maxime
next prev parent reply other threads:[~2024-10-17 12:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 12:52 [PATCH v2 0/4] drm: Fix some memory leaks Jinjie Ruan
2024-10-14 12:52 ` [PATCH v2 1/4] drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic() Jinjie Ruan
2024-10-16 9:35 ` Maxime Ripard
2024-10-17 1:33 ` Jinjie Ruan
2024-10-17 12:13 ` Maxime Ripard
2024-10-17 12:16 ` Jinjie Ruan [this message]
2024-10-14 12:52 ` [PATCH v2 2/4] drm/connector: hdmi: Fix memory leak in drm_display_mode_from_cea_vic() Jinjie Ruan
2024-10-16 9:36 ` mripard
2024-10-14 12:52 ` [PATCH v2 3/4] drm/ttm/tests: Fix memory leak in ttm_tt_simple_create() Jinjie Ruan
2024-10-14 13:38 ` Jeff Johnson
2024-10-14 12:52 ` [PATCH v2 4/4] drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic() Jinjie Ruan
2024-10-16 9:37 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2621a412-1ca6-5282-ffba-30b544466076@huawei.com \
--to=ruanjinjie@huawei.com \
--cc=Arunpravin.PaneerSelvam@amd.com \
--cc=airlied@gmail.com \
--cc=asomalap@amd.com \
--cc=christian.koenig@amd.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=davidgow@google.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=karolina.stolarek@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mcanal@igalia.com \
--cc=mripard@kernel.org \
--cc=quic_jjohnson@quicinc.com \
--cc=ray.huang@amd.com \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®