diff mbox series

mm: correct typo in MMAP_STATE() macro

Message ID 20241118175414.390827-1-lorenzo.stoakes@oracle.com (mailing list archive)
State New
Headers show
Series mm: correct typo in MMAP_STATE() macro | expand

Commit Message

Lorenzo Stoakes Nov. 18, 2024, 5:54 p.m. UTC
We mistakenly refer to len rather than len_ here. The only existing caller
passes len to the len_ parameter so this has no impact on the code, but it
is obviously incorrect to do this, so fix it.

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
---
 mm/vma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Liam R. Howlett Nov. 18, 2024, 8:02 p.m. UTC | #1
* Lorenzo Stoakes <lorenzo.stoakes@oracle.com> [241118 12:54]:
> We mistakenly refer to len rather than len_ here. The only existing caller
> passes len to the len_ parameter so this has no impact on the code, but it
> is obviously incorrect to do this, so fix it.
> 
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>

Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>

> ---
>  mm/vma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vma.c b/mm/vma.c
> index 8a454a7bbc80..8e31b7e25aeb 100644
> --- a/mm/vma.c
> +++ b/mm/vma.c
> @@ -35,7 +35,7 @@ struct mmap_state {
>  		.mm = mm_,						\
>  		.vmi = vmi_,						\
>  		.addr = addr_,						\
> -		.end = (addr_) + len,					\
> +		.end = (addr_) + (len_),				\
>  		.pgoff = pgoff_,					\
>  		.pglen = PHYS_PFN(len_),				\
>  		.flags = flags_,					\
> -- 
> 2.47.0
>
diff mbox series

Patch

diff --git a/mm/vma.c b/mm/vma.c
index 8a454a7bbc80..8e31b7e25aeb 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -35,7 +35,7 @@  struct mmap_state {
 		.mm = mm_,						\
 		.vmi = vmi_,						\
 		.addr = addr_,						\
-		.end = (addr_) + len,					\
+		.end = (addr_) + (len_),				\
 		.pgoff = pgoff_,					\
 		.pglen = PHYS_PFN(len_),				\
 		.flags = flags_,					\