From: zhaimingbing <zhaimingbing@cmss.chinamobile.com>
To: rdunlap@infradead.org
Cc: James.Bottomley@hansenpartnership.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
zhaimingbing@cmss.chinamobile.com
Subject: [PATCH V2] mm:hugetlb_cgroup: Optimize variable initialization
Date: Wed, 8 Nov 2023 05:13:07 +0800 [thread overview]
Message-ID: <20231107211307.14279-1-zhaimingbing@cmss.chinamobile.com> (raw)
In-Reply-To: <785e7f99-ccb9-4640-b554-825061f73ee1@infradead.org>
Initialize 'max' with 'unsigned long' instead of 'long'.
Signed-off-by: zhaimingbing <zhaimingbing@cmss.chinamobile.com>
---
mm/hugetlb_cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
index dedd2edb0..d4ca2ac55 100644
--- a/mm/hugetlb_cgroup.c
+++ b/mm/hugetlb_cgroup.c
@@ -685,7 +685,7 @@ static char *mem_fmt(char *buf, int size, unsigned long hsize)
static int __hugetlb_events_show(struct seq_file *seq, bool local)
{
int idx;
- long max;
+ unsigned long max;
struct cftype *cft = seq_cft(seq);
struct hugetlb_cgroup *h_cg = hugetlb_cgroup_from_css(seq_css(seq));
--
2.33.0
next prev parent reply other threads:[~2023-11-10 10:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 8:27 [PATCH] mm:hugetlb_cgroup: Fix the wrong format specifier zhaimingbing
2023-11-06 20:40 ` Randy Dunlap
2023-11-07 21:13 ` zhaimingbing [this message]
2023-11-10 21:02 ` [PATCH V2] mm:hugetlb_cgroup: Optimize variable initialization Randy Dunlap
2023-11-07 16:32 ` [PATCH] mm:hugetlb_cgroup: Fix the wrong format specifier Andrew Morton
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=20231107211307.14279-1-zhaimingbing@cmss.chinamobile.com \
--to=zhaimingbing@cmss.chinamobile.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rdunlap@infradead.org \
/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