mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] agp/nvidia: Fix coding style issues
@ 2025-11-07 12:02 Darshan Rathod
  0 siblings, 0 replies; only message in thread
From: Darshan Rathod @ 2025-11-07 12:02 UTC (permalink / raw)
  To: airlied; +Cc: dri-devel, linux-kernel, Darshan Rathod

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-07 12:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-07 12:02 [PATCH] agp/nvidia: Fix coding style issues Darshan Rathod

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®