[mm-unstable,1/4] mm: multi-gen LRU: use macro for bitmap

Message ID 20230522112058.2965866-1-talumbau@google.com
State New
Headers
Series [mm-unstable,1/4] mm: multi-gen LRU: use macro for bitmap |

Commit Message

T.J. Alumbaugh May 22, 2023, 11:20 a.m. UTC
  Use DECLARE_BITMAP macro when possible.

Signed-off-by: T.J. Alumbaugh <talumbau@google.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

David Hildenbrand May 22, 2023, 11:33 a.m. UTC | #1
On 22.05.23 13:20, T.J. Alumbaugh wrote:
> Use DECLARE_BITMAP macro when possible.
> 
> Signed-off-by: T.J. Alumbaugh <talumbau@google.com>
> ---
>   mm/vmscan.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 4637f6462e9c..cf18873a36b9 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -4144,7 +4144,7 @@ static void walk_pmd_range(pud_t *pud, unsigned long start, unsigned long end,
>   	unsigned long next;
>   	unsigned long addr;
>   	struct vm_area_struct *vma;
> -	unsigned long bitmap[BITS_TO_LONGS(MIN_LRU_BATCH)];
> +	DECLARE_BITMAP(bitmap, MIN_LRU_BATCH);
>   	unsigned long first = -1;
>   	struct lru_gen_mm_walk *walk = args->private;
>   

Reviewed-by: David Hildenbrand <david@redhat.com>
  
Yuanchu Xie June 1, 2023, 8:01 a.m. UTC | #2
Reviewed-by: Yuanchu Xie <yuanchu@google.com>

On Mon, May 22, 2023 at 7:21 PM T.J. Alumbaugh <talumbau@google.com> wrote:
>
> Use DECLARE_BITMAP macro when possible.
>
> Signed-off-by: T.J. Alumbaugh <talumbau@google.com>
> ---
>  mm/vmscan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 4637f6462e9c..cf18873a36b9 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -4144,7 +4144,7 @@ static void walk_pmd_range(pud_t *pud, unsigned long start, unsigned long end,
>         unsigned long next;
>         unsigned long addr;
>         struct vm_area_struct *vma;
> -       unsigned long bitmap[BITS_TO_LONGS(MIN_LRU_BATCH)];
> +       DECLARE_BITMAP(bitmap, MIN_LRU_BATCH);
>         unsigned long first = -1;
>         struct lru_gen_mm_walk *walk = args->private;
>
> --
> 2.40.1.698.g37aff9b760-goog
>
  

Patch

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 4637f6462e9c..cf18873a36b9 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4144,7 +4144,7 @@  static void walk_pmd_range(pud_t *pud, unsigned long start, unsigned long end,
 	unsigned long next;
 	unsigned long addr;
 	struct vm_area_struct *vma;
-	unsigned long bitmap[BITS_TO_LONGS(MIN_LRU_BATCH)];
+	DECLARE_BITMAP(bitmap, MIN_LRU_BATCH);
 	unsigned long first = -1;
 	struct lru_gen_mm_walk *walk = args->private;