From: darshanrathod475@gmail.com
To: lyude@redhat.com, dakr@kernel.org
Cc: airlied@gmail.com, simona@ffwll.ch,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Darshan Rathod <darshanrathod475@gmail.com>
Subject: [PATCH] drm/nouveau: move assignment out of condition and fix spacing
Date: Mon, 18 Aug 2025 16:14:51 +0530 [thread overview]
Message-ID: <20250818104451.916585-1-darshanrathod475@gmail.com> (raw)
From: Darshan Rathod <darshanrathod475@gmail.com>
Simplify conditional logic by moving the assignment of pll_lim.reg
to reg1 out of the if() statement. Also adjust spacing in an if()
statement for consistency with kernel style.
Signed-off-by: Darshan Rathod <darshanrathod475@gmail.com>
---
drivers/gpu/drm/nouveau/dispnv04/hw.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.c b/drivers/gpu/drm/nouveau/dispnv04/hw.c
index 8b376f9c8746..165ba41422a5 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/hw.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c
@@ -172,7 +172,9 @@ nouveau_hw_get_pllvals(struct drm_device *dev, enum nvbios_pll_type plltype,
int ret;
ret = nvbios_pll_parse(bios, plltype, &pll_lim);
- if (ret || !(reg1 = pll_lim.reg))
+ reg1 = pll_lim.reg;
+
+ if (ret || !reg1)
return -ENOENT;
pll1 = nvif_rd32(device, reg1);
@@ -747,7 +749,7 @@ nv_load_state_ext(struct drm_device *dev, int head,
/* Not waiting for vertical retrace before modifying
CRE_53/CRE_54 causes lockups. */
nvif_msec(&drm->client.device, 650,
- if ( (nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 8))
+ if ((nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 8))
break;
);
nvif_msec(&drm->client.device, 650,
--
2.25.1
reply other threads:[~2025-08-18 10:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250818104451.916585-1-darshanrathod475@gmail.com \
--to=darshanrathod475@gmail.com \
--cc=airlied@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=simona@ffwll.ch \
/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®