Skip to contentSkip to conversation

proc: make struct pid_entry::len unsigned

PATCH New [email protected] 1 participant 1 message Dec 13, 2016 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 91/123 proc: make struct pid_entry::len unsigned

From: Alexey Dobriyan <[email protected]>
Subject: proc: make struct pid_entry::len unsigned

"unsigned int" is better on x86_64 because it most of the time it autoexpands to 64-bit value while "int" requires MOVSX instruction.

---

 fs/proc/base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/base.c renamed from fs/proc/base.c~proc-make-struct-pid_entry-len-unsigned +1 -1
diff -puN fs/proc/base.c~proc-make-struct-pid_entry-len-unsigned fs/proc/base.c
@@ -106,7 +106,7 @@
 
 struct pid_entry {
 	const char *name;
-	int len;
+	unsigned int len;
 	umode_t mode;
 	const struct inode_operations *iop;
 	const struct file_operations *fop;

_