From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99B4BC4167B for ; Fri, 10 Nov 2023 21:03:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235195AbjKJVDD (ORCPT ); Fri, 10 Nov 2023 16:03:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235542AbjKJVCn (ORCPT ); Fri, 10 Nov 2023 16:02:43 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98F4C3AA6 for ; Fri, 10 Nov 2023 13:02:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=ciYCEHiStEhiV9bzFF69iuJLlDU5uempC1NU0f76Ntc=; b=SbVTDBXEpdDKR34RZ9GglRImS0 fR01/rYEiniFGMXNRyWd4qTa2uOkHW5nEr+OQ7XJ9veY5GfVFGr4mgELoHlIA8lugGGBwxxhJ9j/T k901DX4UztXnSemAzTFct9RFZIB0WT40JwmniThSmjUCO3hsTmJDtnLr/ZK8WXYG3z+p3HmKC+Cng rWq1/27zTCC1oayECyni8O0C9ObbJVE8Sefos4kmGvvwdWLLZY+o1cEjn2PH+SycvXbkrGdqeF4ZB W92sUrMC0VZbfciJaHZI8RcxBvXBfdPjP/l7x5p9eKiNMGq+1s5oSritU4VD5/C1EEgHa4/jRV8xV VfWm4yWA==; Received: from [50.53.46.231] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1r1Ydt-009RVi-0g; Fri, 10 Nov 2023 21:02:17 +0000 Message-ID: Date: Fri, 10 Nov 2023 13:02:15 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2] mm:hugetlb_cgroup: Optimize variable initialization Content-Language: en-US To: zhaimingbing Cc: James.Bottomley@hansenpartnership.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <785e7f99-ccb9-4640-b554-825061f73ee1@infradead.org> <20231107211307.14279-1-zhaimingbing@cmss.chinamobile.com> From: Randy Dunlap In-Reply-To: <20231107211307.14279-1-zhaimingbing@cmss.chinamobile.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/7/23 13:13, zhaimingbing wrote: > Initialize 'max' with 'unsigned long' instead of 'long'. > There is no variable initialization here, so the $Subject does not match what is being changed. Also there is no description of Why this change is needed. > Signed-off-by: zhaimingbing > --- > 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)); > -- ~Randy