From: Riyan Dhiman <riyandhiman14@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
Riyan Dhiman <riyandhiman14@gmail.com>
Subject: [PATCH] staging: vme_user: Added static to image_desc and vme_user_vma_priv struct
Date: Sun, 25 Aug 2024 09:25:14 +0530 [thread overview]
Message-ID: <20240825035514.40095-1-riyandhiman14@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2024-08-25 3:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-25 3:55 Riyan Dhiman [this message]
2024-08-25 8:13 ` [PATCH] staging: vme_user: Added static to image_desc and vme_user_vma_priv struct Nam Cao
2024-08-26 22:17 ` kernel test robot
2024-08-26 22:38 ` kernel test robot
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=20240825035514.40095-1-riyandhiman14@gmail.com \
--to=riyandhiman14@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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