mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Darshan Rathod <darshanrathod475@gmail.com>
To: airlied@redhat.com
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Darshan Rathod <darshanrathod475@gmail.com>
Subject: [PATCH] agp/nvidia: Fix coding style issues
Date: Fri,  7 Nov 2025 12:02:06 +0000	[thread overview]
Message-ID: <20251107120206.923-1-darshanrathod475@gmail.com> (raw)

Remove assignment from inside if condition and adjust brace placement in
static initializers to comply with kernel coding style guidelines.

No functional changes.

Signed-off-by: Darshan Rathod <darshanrathod475@gmail.com>
---
 drivers/char/agp/nvidia-agp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
index 4787391bb6b4..aab33d1297d9 100644
--- a/drivers/char/agp/nvidia-agp.c
+++ b/drivers/char/agp/nvidia-agp.c
@@ -125,7 +125,8 @@ static int nvidia_configure(void)
 	pci_write_config_dword(nvidia_private.dev_2, NVIDIA_2_APLIMIT, aplimit);
 	pci_write_config_dword(nvidia_private.dev_3, NVIDIA_3_APBASE, apbase);
 	pci_write_config_dword(nvidia_private.dev_3, NVIDIA_3_APLIMIT, aplimit);
-	if (0 != (rc = nvidia_init_iorr(apbase, current_size->size * 1024 * 1024)))
+	rc = nvidia_init_iorr(apbase, current_size->size * 1024 * 1024);
+	if (rc)
 		return rc;
 
 	/* directory size is 64k */
@@ -291,8 +292,7 @@ static void nvidia_tlbflush(struct agp_memory *mem)
 }
 
 
-static const struct aper_size_info_8 nvidia_generic_sizes[5] =
-{
+static const struct aper_size_info_8 nvidia_generic_sizes[5] = {
 	{512, 131072, 7, 0},
 	{256, 65536, 6, 8},
 	{128, 32768, 5, 12},
@@ -302,8 +302,7 @@ static const struct aper_size_info_8 nvidia_generic_sizes[5] =
 };
 
 
-static const struct gatt_mask nvidia_generic_masks[] =
-{
+static const struct gatt_mask nvidia_generic_masks[] = {
 	{ .mask = 1, .type = 0}
 };
 
-- 
2.43.0


                 reply	other threads:[~2025-11-07 12:01 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=20251107120206.923-1-darshanrathod475@gmail.com \
    --to=darshanrathod475@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®