aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2025-04-10 11:57:17 +0800
committerAndrew Morton <akpm@linux-foundation.org>2025-05-11 17:48:31 -0700
commita7797e74bd397e7a9c3095bf212e7059a128155a (patch)
tree0080660f2ae40d8a5614944c64dcc6714197fe75 /samples
parentmm/gup: remove gup_fast_pgd_leaf() and clean up the relevant codes (diff)
downloadlinux-a7797e74bd397e7a9c3095bf212e7059a128155a.tar.gz
linux-a7797e74bd397e7a9c3095bf212e7059a128155a.zip
mm/gup: clean up codes in fault_in_xxx() functions
The code style in fault_in_readable() and fault_in_writable() is a little inconsistent with fault_in_safe_writeable(). In fault_in_readable() and fault_in_writable(), it uses 'uaddr' passed in as loop cursor. While in fault_in_safe_writeable(), local variable 'start' is used as loop cursor. This may mislead people when reading code or making change in these codes. Here define explicit loop cursor and use for loop to simplify codes in these three functions. These cleanup can make them be consistent in code style and improve readability. [bhe@redhat.com: address minor concerns from David] Link: https://lkml.kernel.org/r/Z/sbv3EmLXWgEE7+@MiWiFi-R3L-srv Link: https://lkml.kernel.org/r/20250410035717.473207-5-bhe@redhat.com Signed-off-by: Baoquan He <bhe@redhat.com> Cc: David Hildenbrand <david@redhat.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Yanjun.Zhu <yanjun.zhu@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions