Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp296530pxa; Wed, 19 Aug 2020 01:15:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEiIHADm/ebYpzBUs2kG6KOFv+Tf5FAwEKWH3eW+8GG0uZhRsKyz8DVBVW5HVh+Q1jXDVD X-Received: by 2002:a17:906:4a0d:: with SMTP id w13mr16589090eju.247.1597824934690; Wed, 19 Aug 2020 01:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597824934; cv=none; d=google.com; s=arc-20160816; b=IP6dyqXnzrlcJOHv6bDX5n5LR+fQIXWLj0FIyJLYV5AtFue9luOrfNaxqfUC0nT9uk FT4iIidva+B+7aohxuMB1XuLBXE2tNr1dWR4cOcwXS4seHyGruWoUkKdBuLj0FPu0Zpw etei+ISJhMuHur0o9fGRr7afQDxCgXTS4Eqi6M0hb5VD2EdNdyA/2SmUMEcDeS7CeVQL PTwFgBaRKp53XDK/4USl9HRisLWdpthaRAsX693Eze6q1j4H4362yBQxlzmoYKV1/aoD /1MQDsLrL5q2XsAW+1nS5+0V6dJOpF2yrIV736TFDcRQgfWND463+3aGzMr5AT4QJGxA dsxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dkim-signature; bh=IwngKvWWwMw9NOqOeW4sapwtCnNBwWN8oyQLQyDidWE=; b=FEroLOmQ0Mv07a5x3zjRCZBQGKUgUmXsZFKC9SVFzYOAE7lNOXkbFvWTpqRDD+3sqq gQWe+rBqdmULo0XkJh7aLmofNbLmKyUTlwHv/fQQVLlF6oRT9QLZa9Lwg9oUJ4vPtlSt agNNRoLtCzWrvcbEkAbGXRQCC4E3vsHPvqo+ir5IrjF4z/huZfnjKOSAH5fYt/jWeHcF GJ+yxENscxdzfWUYhDUG6dpAvDQ5z3hnUxtBhmE//uWd9HoyN3svIr0WjBbAczwqDRuO ImZ2fDeovMRQcN+bozvD3lIC/2zwU0PFo+dGaI8y04mrE+xp4oybDDXcWN9PRvfzqr4p 64ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J2+fVb9i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay7si15097103edb.183.2020.08.19.01.15.11; Wed, 19 Aug 2020 01:15:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J2+fVb9i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726738AbgHSIOU (ORCPT + 99 others); Wed, 19 Aug 2020 04:14:20 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:31075 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725275AbgHSIOU (ORCPT ); Wed, 19 Aug 2020 04:14:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597824859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IwngKvWWwMw9NOqOeW4sapwtCnNBwWN8oyQLQyDidWE=; b=J2+fVb9ipslVdnOqw1Fow/e+ZemD0xWiAogrlfHdDi6lYUbiwNfs1C1DeE0bQE4KPdHKVK bIHCLV3rugmZm6cUbqNCjyFZzGo4CYxt9Yc6pssSCNNrSsmrsQjp2+K2zW3NVktmyr6+Ya 2DT0tkSyRxz+xU6mcjNJwn5yvE+b/Po= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-574-pm1-b9fWNfGEzD5MupzoHg-1; Wed, 19 Aug 2020 04:14:16 -0400 X-MC-Unique: pm1-b9fWNfGEzD5MupzoHg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E587E85C70A; Wed, 19 Aug 2020 08:14:14 +0000 (UTC) Received: from localhost (ovpn-113-206.ams2.redhat.com [10.36.113.206]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0BE777DFDD; Wed, 19 Aug 2020 08:14:12 +0000 (UTC) From: Giuseppe Scrivano To: Andrew Morton Cc: Xu Wang , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Tejun Heo Subject: Re: [PATCH] hugetlb_cgroup: convert comma to semicolon References: <20200818064333.21759-1-vulab@iscas.ac.cn> <20200818184036.d6c479446b2c3b231d1e3bff@linux-foundation.org> Date: Wed, 19 Aug 2020 10:14:11 +0200 In-Reply-To: <20200818184036.d6c479446b2c3b231d1e3bff@linux-foundation.org> (Andrew Morton's message of "Tue, 18 Aug 2020 18:40:36 -0700") Message-ID: <87eeo32gto.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton writes: > On Tue, 18 Aug 2020 06:43:33 +0000 Xu Wang wrote: > >> Replace a comma between expression statements by a semicolon. >> >> ... >> >> --- a/mm/hugetlb_cgroup.c >> +++ b/mm/hugetlb_cgroup.c >> @@ -655,7 +655,7 @@ static void __init __hugetlb_cgroup_file_dfl_init(int idx) >> snprintf(cft->name, MAX_CFTYPE_NAME, "%s.events", buf); >> cft->private = MEMFILE_PRIVATE(idx, 0); >> cft->seq_show = hugetlb_events_show; >> - cft->file_offset = offsetof(struct hugetlb_cgroup, events_file[idx]), >> + cft->file_offset = offsetof(struct hugetlb_cgroup, events_file[idx]); >> cft->flags = CFTYPE_NOT_ON_ROOT; >> >> /* Add the events.local file */ >> @@ -664,7 +664,7 @@ static void __init __hugetlb_cgroup_file_dfl_init(int idx) >> cft->private = MEMFILE_PRIVATE(idx, 0); >> cft->seq_show = hugetlb_events_local_show; >> cft->file_offset = offsetof(struct hugetlb_cgroup, >> - events_local_file[idx]), >> + events_local_file[idx]); >> cft->flags = CFTYPE_NOT_ON_ROOT; >> >> /* NULL terminate the last cft */ > > Fixes: faced7e0806cf4 ("mm: hugetlb controller for cgroups v2") Xu, thanks for spotting it. Was this code causing any issue or have you found by inspecting it? > Wow, why does this code even work. Presumably the initial value of > cft->file_offset simply doesn't matter. Giuseppe, could you please > check? We might have some unneeded code in there. I think in this case having two expressions as part of the same statement is equivalent to having two separate statements. Both cft->file_offset and cft->flags get the expected value. Regards, Giuseppe