mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] proc: Fix typo in the comment
@ 2024-09-09  6:33 Yan Zhen
  2024-09-09  7:51 ` Christian Brauner
  0 siblings, 1 reply; 2+ messages in thread
From: Yan Zhen @ 2024-09-09  6:33 UTC (permalink / raw)
  To: viro, brauner
  Cc: sfr, linux-kernel, linux-fsdevel, opensource.kernel, Yan Zhen

The deference here confuses me. 

Maybe here want to say that because show_fd_locks() does not dereference
the files pointer, using the stale value of the files pointer is safe.

Correctly spelled comments make it easier for the reader to understand
the code.

replace 'deferences' with 'dereferences' in the comment &
replace 'inialized' with 'initialized' in the comment.

Signed-off-by: Yan Zhen <yanzhen@vivo.com>
---
 fs/proc/fd.c    | 2 +-
 fs/proc/kcore.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/proc/fd.c b/fs/proc/fd.c
index 623780449..1f54a54bf 100644
--- a/fs/proc/fd.c
+++ b/fs/proc/fd.c
@@ -59,7 +59,7 @@ static int seq_show(struct seq_file *m, void *v)
 		   real_mount(file->f_path.mnt)->mnt_id,
 		   file_inode(file)->i_ino);
 
-	/* show_fd_locks() never deferences files so a stale value is safe */
+	/* show_fd_locks() never dereferences files, so a stale value is safe */
 	show_fd_locks(m, file, files);
 	if (seq_has_overflowed(m))
 		goto out;
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 8e08a9a1b..7d0acdad7 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -235,7 +235,7 @@ static int kcore_ram_list(struct list_head *list)
 	int nid, ret;
 	unsigned long end_pfn;
 
-	/* Not inialized....update now */
+	/* Not initialized....update now */
 	/* find out "max pfn" */
 	end_pfn = 0;
 	for_each_node_state(nid, N_MEMORY) {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] proc: Fix typo in the comment
  2024-09-09  6:33 [PATCH v1] proc: Fix typo in the comment Yan Zhen
@ 2024-09-09  7:51 ` Christian Brauner
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2024-09-09  7:51 UTC (permalink / raw)
  To: Yan Zhen
  Cc: Christian Brauner, sfr, linux-kernel, linux-fsdevel,
	opensource.kernel, viro

On Mon, 09 Sep 2024 14:33:53 +0800, Yan Zhen wrote:
> The deference here confuses me.
> 
> Maybe here want to say that because show_fd_locks() does not dereference
> the files pointer, using the stale value of the files pointer is safe.
> 
> Correctly spelled comments make it easier for the reader to understand
> the code.
> 
> [...]

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] proc: Fix typo in the comment
      https://git.kernel.org/vfs/vfs/c/698e7d168054

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-09  7:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-09  6:33 [PATCH v1] proc: Fix typo in the comment Yan Zhen
2024-09-09  7:51 ` Christian Brauner

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®