* [PATCH] proc: proc_sysctl: Optimize proc_sys_fill_cache() variable
@ 2024-01-15 3:56 Li zeming
0 siblings, 0 replies; only message in thread
From: Li zeming @ 2024-01-15 3:56 UTC (permalink / raw)
To: mcgrof, keescook, yzaikin; +Cc: linux-kernel, linux-fsdevel, Li zeming
The ino and type variables are assigned values before use, and they do
not need to be assigned values when defined.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
fs/proc/proc_sysctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index c88854df0b624..cdda684551599 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -683,8 +683,8 @@ static bool proc_sys_fill_cache(struct file *file,
struct dentry *child, *dir = file->f_path.dentry;
struct inode *inode;
struct qstr qname;
- ino_t ino = 0;
- unsigned type = DT_UNKNOWN;
+ ino_t ino;
+ unsigned type;
qname.name = table->procname;
qname.len = strlen(table->procname);
--
2.18.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-15 3:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-15 3:56 [PATCH] proc: proc_sysctl: Optimize proc_sys_fill_cache() variable Li zeming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).