[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240825035514.40095-1-riyandhiman14@gmail.com>
Date: Sun, 25 Aug 2024 09:25:14 +0530
From: Riyan Dhiman <riyandhiman14@...il.com>
To: gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org,
linux-staging@...ts.linux.dev,
Riyan Dhiman <riyandhiman14@...il.com>
Subject: [PATCH] staging: vme_user: Added static to image_desc and vme_user_vma_priv struct
struct image_desc and vme_user_vma_priv are used only in vme_user.c file.
Added keyword static to these struct definition to limit its scope and
potentially allow for compiler optimizations.
Signed-off-by: Riyan Dhiman <riyandhiman14@...il.com>
---
drivers/staging/vme_user/vme_user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vme_user/vme_user.c b/drivers/staging/vme_user/vme_user.c
index 5829a4141561..fe1026857710 100644
--- a/drivers/staging/vme_user/vme_user.c
+++ b/drivers/staging/vme_user/vme_user.c
@@ -88,7 +88,7 @@ static unsigned int bus_num;
/*
* Structure to handle image related parameters.
*/
-struct image_desc {
+static struct image_desc {
void *kern_buf; /* Buffer address in kernel space */
dma_addr_t pci_buf; /* Buffer address in PCI address space */
unsigned long long size_buf; /* Buffer size */
@@ -114,7 +114,7 @@ static const int type[VME_DEVS] = { MASTER_MINOR, MASTER_MINOR,
CONTROL_MINOR
};
-struct vme_user_vma_priv {
+static struct vme_user_vma_priv {
unsigned int minor;
refcount_t refcnt;
};
--
2.46.0
Powered by blists - more mailing lists