From: Lyude Paul <lyude@redhat.com>
To: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org
Cc: Ben Skeggs <bskeggs@redhat.com>,
Karol Herbst <kherbst@redhat.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Dave Airlie <airlied@redhat.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 1/2] drm/nouveau/nvkm/outp: Use WARN_ON() in conditionals in nvkm_outp_init_route()
Date: Fri, 7 Apr 2023 18:21:31 -0400 [thread overview]
Message-ID: <20230407222133.1425969-1-lyude@redhat.com> (raw)
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
index 6094805fbd63..06b19883a06b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c
@@ -229,10 +229,8 @@ nvkm_outp_init_route(struct nvkm_outp *outp)
return;
ior = nvkm_ior_find(disp, type, -1);
- if (!ior) {
- WARN_ON(1);
+ if (WARN_ON(!ior))
return;
- }
/* Determine the specific OR, if any, this device is attached to. */
if (ior->func->route.get) {
@@ -248,10 +246,8 @@ nvkm_outp_init_route(struct nvkm_outp *outp)
}
ior = nvkm_ior_find(disp, type, id);
- if (!ior) {
- WARN_ON(1);
+ if (WARN_ON(!ior))
return;
- }
/* Determine if the OR is already configured for this device. */
ior->func->state(ior, &ior->arm);
--
2.39.2
next reply other threads:[~2023-04-07 22:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 22:21 Lyude Paul [this message]
2023-04-07 22:21 ` [PATCH 2/2] drm/nouveau/kms: Add INHERIT ioctl to nvkm/nvif for reading IOR state Lyude Paul
2023-04-08 1:45 ` kernel test robot
2023-04-08 4:09 ` kernel test robot
2023-04-11 9:03 ` Dan Carpenter
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=20230407222133.1425969-1-lyude@redhat.com \
--to=lyude@redhat.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox