linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: correct typo in MMAP_STATE() macro
@ 2024-11-18 17:54 Lorenzo Stoakes
  2024-11-18 20:02 ` Liam R. Howlett
  2024-11-19 10:02 ` Wei Yang
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Stoakes @ 2024-11-18 17:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Liam R . Howlett, Vlastimil Babka, Jann Horn, linux-mm, linux-kernel

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(-)

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



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

* Re: [PATCH] mm: correct typo in MMAP_STATE() macro
  2024-11-18 17:54 [PATCH] mm: correct typo in MMAP_STATE() macro Lorenzo Stoakes
@ 2024-11-18 20:02 ` Liam R. Howlett
  2024-11-19 10:02 ` Wei Yang
  1 sibling, 0 replies; 3+ messages in thread
From: Liam R. Howlett @ 2024-11-18 20:02 UTC (permalink / raw)
  To: Lorenzo Stoakes
  Cc: Andrew Morton, Vlastimil Babka, Jann Horn, linux-mm, linux-kernel

* 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
> 


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

* Re: [PATCH] mm: correct typo in MMAP_STATE() macro
  2024-11-18 17:54 [PATCH] mm: correct typo in MMAP_STATE() macro Lorenzo Stoakes
  2024-11-18 20:02 ` Liam R. Howlett
@ 2024-11-19 10:02 ` Wei Yang
  1 sibling, 0 replies; 3+ messages in thread
From: Wei Yang @ 2024-11-19 10:02 UTC (permalink / raw)
  To: Lorenzo Stoakes
  Cc: Andrew Morton, Liam R . Howlett, Vlastimil Babka, Jann Horn,
	linux-mm, linux-kernel

On Mon, Nov 18, 2024 at 05:54:14PM +0000, Lorenzo Stoakes wrote:
>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: Wei Yang <richard.weiyang@gmail.com>

-- 
Wei Yang
Help you, Help me


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

end of thread, other threads:[~2024-11-19 10:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-18 17:54 [PATCH] mm: correct typo in MMAP_STATE() macro Lorenzo Stoakes
2024-11-18 20:02 ` Liam R. Howlett
2024-11-19 10:02 ` Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox