linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Peng Zhang <zhangpeng362@huawei.com>, linux-mm@kvack.org
Cc: akpm@linux-foundation.org, wangkefeng.wang@huawei.com,
	sunnanyong@huawei.com
Subject: Re: [PATCH 3/7] mm/swap_state.c: use helper macro K()
Date: Mon, 7 Aug 2023 17:19:11 +0200	[thread overview]
Message-ID: <f20ee7a3-dace-b102-221d-13d12f741015@redhat.com> (raw)
In-Reply-To: <20230804012559.2617515-4-zhangpeng362@huawei.com>

On 04.08.23 03:25, Peng Zhang wrote:
> From: ZhangPeng <zhangpeng362@huawei.com>
> 
> Use helper macro K() to improve code readability. No functional
> modification involved.
> 
> Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
> ---
>   mm/swap_state.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/swap_state.c b/mm/swap_state.c
> index 5a690c79cc13..01f15139b7d9 100644
> --- a/mm/swap_state.c
> +++ b/mm/swap_state.c
> @@ -63,9 +63,8 @@ static atomic_t swapin_readahead_hits = ATOMIC_INIT(4);
>   void show_swap_cache_info(void)
>   {
>   	printk("%lu pages in swap cache\n", total_swapcache_pages());
> -	printk("Free swap  = %ldkB\n",
> -		get_nr_swap_pages() << (PAGE_SHIFT - 10));
> -	printk("Total swap = %lukB\n", total_swap_pages << (PAGE_SHIFT - 10));
> +	printk("Free swap  = %ldkB\n", K(get_nr_swap_pages()));
> +	printk("Total swap = %lukB\n", K(total_swap_pages));
>   }
>   
>   void *get_shadow_from_swap_cache(swp_entry_t entry)

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb



  reply	other threads:[~2023-08-07 15:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04  1:25 [PATCH 0/7] cleanup with " Peng Zhang
2023-08-04  1:25 ` [PATCH 1/7] mm: remove redundant K() macro definition Peng Zhang
2023-08-07  8:31   ` Kefeng Wang
2023-08-07 15:20     ` David Hildenbrand
2023-08-08 10:44     ` zhangpeng (AS)
2023-08-04  1:25 ` [PATCH 2/7] mm/swapfile.c: use helper macro K() Peng Zhang
2023-08-07 15:18   ` David Hildenbrand
2023-08-04  1:25 ` [PATCH 3/7] mm/swap_state.c: " Peng Zhang
2023-08-07 15:19   ` David Hildenbrand [this message]
2023-08-04  1:25 ` [PATCH 4/7] mm/shmem.c: " Peng Zhang
2023-08-07 15:19   ` David Hildenbrand
2023-08-04  1:25 ` [PATCH 5/7] mm/nommu.c: " Peng Zhang
2023-08-07 15:19   ` David Hildenbrand
2023-08-04  1:25 ` [PATCH 6/7] mm/mmap.c: " Peng Zhang
2023-08-07 15:19   ` David Hildenbrand
2023-08-04  1:25 ` [PATCH 7/7] mm/hugetlb.c: " Peng Zhang
2023-08-07 15:20   ` David Hildenbrand
2023-08-04  3:39 ` [PATCH 0/7] cleanup with " Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f20ee7a3-dace-b102-221d-13d12f741015@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=sunnanyong@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=zhangpeng362@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox