From: "José Expósito" <jose.exposito89@gmail.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [bug report] drm/vkms: Allow to configure multiple CRTCs
Date: Mon, 11 Aug 2025 12:20:26 +0200 [thread overview]
Message-ID: <aJnD6sUjrYQh9j0Y@fedora> (raw)
In-Reply-To: <aJYDP-VFlrCdSVU3@stanley.mountain>
Hi Dan,
On Fri, Aug 08, 2025 at 05:01:35PM +0300, Dan Carpenter wrote:
> On Fri, Aug 08, 2025 at 01:15:03PM +0200, José Expósito wrote:
> > > drivers/gpu/drm/vkms/tests/vkms_config_test.c
> > > 231 static void vkms_config_test_get_crtcs(struct kunit *test)
> > > 232 {
> > > 233 struct vkms_config *config;
> > > 234 struct vkms_config_crtc *crtc_cfg;
> > > 235 struct vkms_config_crtc *crtc_cfg1, *crtc_cfg2;
> > > 236
> > > 237 config = vkms_config_create("test");
> > > 238 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, config);
> > > 239
> > > 240 KUNIT_ASSERT_EQ(test, vkms_config_get_num_crtcs(config), 0);
> > > 241 vkms_config_for_each_crtc(config, crtc_cfg)
> > > 242 KUNIT_FAIL(test, "Unexpected CRTC");
> > > 243
> > > 244 crtc_cfg1 = vkms_config_create_crtc(config);
> > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > This file has no error checking.
> > >
> > > I didn't send an email about it at first because this is just test code so
> > > who cares, but I was recently burned by ignoring errors so now I'm going
> > > through a bunch of old warnings to say that, "Hey, if the author ignores the
> > > error checking that's fine, but I'm in the clear."
> > >
> > > 245 KUNIT_ASSERT_EQ(test, vkms_config_get_num_crtcs(config), 1);
> >
> > While the "crtc_cfg1" pointer is not checked, we check that the number
> > of CRTCs matches the expected value and...
> >
>
> Ah yes. That does work... Sorry for the noise.
No noise at all, there were other places were the check made sense.
I sent a patch fixing them:
https://lore.kernel.org/dri-devel/20250811101529.150716-1-jose.exposito89@gmail.com/T/#u
Thanks a lot for reporting this issue!!
Jose
>
> regards,
> dan carpenter
>
prev parent reply other threads:[~2025-08-11 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 15:53 [bug report] drm/vkms: Allow to configure multiple CRTCs Dan Carpenter
2025-08-08 11:15 ` José Expósito
2025-08-08 14:01 ` Dan Carpenter
2025-08-11 10:20 ` José Expósito [this message]
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=aJnD6sUjrYQh9j0Y@fedora \
--to=jose.exposito89@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.