Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3159946ybc; Mon, 18 Nov 2019 10:29:31 -0800 (PST) X-Google-Smtp-Source: APXvYqzQ5fc/doMkXl1PmEwu5MW+8zeoJ+IDoYe6+vxJyo2LGP+j4UFEWwrxx0/oPEcrX7LHydm9 X-Received: by 2002:a17:906:6093:: with SMTP id t19mr28197265ejj.50.1574101771604; Mon, 18 Nov 2019 10:29:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574101771; cv=none; d=google.com; s=arc-20160816; b=a6E7mqj+8wOwFHnjUJ3VTt7tMrXGbGyTyjaRcHTgyTisiUWK/0NCuouFdfWXSrnEDI nLggGrw9sMRRdKgphsmHjxZGqwAhAERHT/KKQDL5d1kpbMxts9K5Pj6Wyw4ercBWbJQv hlVIRCrJlHTFKPlW5bwm4f0phM9r4PmMT32x/DBjbHIrDXM7e2QC96CZ6Ere5VvUr3T+ uJvfl8ue8X4RahrNNOy1KL/fvzkIpfwjH3IL6gt0LvxfGH8ZTsQmpy3IYH1Xoc66DF8+ DkkSe11DYHde7COrG9zFeLtYRhgQ7x3LLgzSPS3FsZLWy1ipbw0Fn/hV4RYDQmXbPfG8 dwlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=v9if5fwr3paoI1B1+7DONdTrGfIC6DUmEh53tZeqqwE=; b=fEve4Io6q/MXg290RM3XY7Ae6liHBWZko1E1NmvZm/L6uwSWGkihoAURtoi5w0aUV8 AkNyJu/5vCZLaoZCbBrRy8owFOaqQ/k+IVr78e7FwdM5ITHMS0vJxonJLdH0sXuzehoR kFC85Y4B3kuASeqvKRmOPyz94rk25u8jR/h5pTr4s4F3De1C2Xq3pc81APi9PSIF2CpS Xq6NLi4L3UyL7Y7Rfmk7Dww5ytkFb5x5soAA/LEUIncVlKBua3B9Hnj0AyrCFADwy9fU rKbnsvTvUxeE5KHjwlzphSCqr2wh2u91UdAl++10vNicMoYZ9aBM2c9qbEg/505opM9t 2YQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=cOjoh6P7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si12154343edx.350.2019.11.18.10.29.05; Mon, 18 Nov 2019 10:29:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=cOjoh6P7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726664AbfKRSZu (ORCPT + 99 others); Mon, 18 Nov 2019 13:25:50 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:41711 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbfKRSZu (ORCPT ); Mon, 18 Nov 2019 13:25:50 -0500 Received: by mail-qt1-f195.google.com with SMTP id o3so21316257qtj.8 for ; Mon, 18 Nov 2019 10:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=v9if5fwr3paoI1B1+7DONdTrGfIC6DUmEh53tZeqqwE=; b=cOjoh6P7m4KW09CGfhiNgwSxU5Uor0QS63+fU5/Cbk0WqsjnlakOdwmfaWbalvDKqA 0mA8+jpUq4KjivI53/E6KseHbpUhl4S/vzgpO7lLNqo/o7qJA+gScq1avKYSn72KEQ/R WJ60rA0ePyceU0fofd2Pi1BrJ9giAjU/47ZcmWs033JnlwB50bz7uhCRZ6wygaaMO+K8 R1Hd5+NU4dbdVbyvHlyWtwaOBu6oRSqSAumJf8OHFUjRc5n0y0WymXPH00JGmWolIwq9 5nC5xxHCJmlPEOT+RZ5tPhsR7Dk+XhVjN0p1YRKv7nSk2djVpyZnlJV+sJVxTwycbuvj RSmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=v9if5fwr3paoI1B1+7DONdTrGfIC6DUmEh53tZeqqwE=; b=OMQk98QZ0Il3qcLrTtSbUL2O/UDFRzh9oKDcyxHVZRcaarpo/EDVtMu0448NgDA4iC 9sUKYtU+qXRbT4aeg4+8bs0IY3mBa2U8jfktTuz28/Aob/8sB8z3iZK7l5zPXkFI7R6D HZzUvqgk+t18hyoveH0zfheFsE6CJ7VX3RmQdn3IIzUp+1+uQKxadvia4gv0vKzAo686 H//sGnPBqdki+R8QVfXoEn0jMLA0ns7M+7GKSxKjUt1BVucOIfpU35v0nDRFvw7B+2OF 4wxOQyNpAEYPtU10HOhb8AKW3vS3HR5D30Kjgt/hr/4x+Bjl7kch6qlQJJO3ab58IS5d SgDQ== X-Gm-Message-State: APjAAAXpVd7GjRy6EB27RoTCamoGzrMvpyTDS9jdXd4QL/8o1lyaobJg k5DpDx2Hzy1WtuCV3V0ocYnSGg== X-Received: by 2002:aed:3702:: with SMTP id i2mr27264082qtb.312.1574101549183; Mon, 18 Nov 2019 10:25:49 -0800 (PST) Received: from localhost ([2620:10d:c091:500::1:1113]) by smtp.gmail.com with ESMTPSA id y24sm8820684qki.104.2019.11.18.10.25.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 10:25:48 -0800 (PST) Date: Mon, 18 Nov 2019 13:25:47 -0500 From: Johannes Weiner To: Qian Cai Cc: akpm@linux-foundation.org, surenb@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next v2] mm/vmscan: fix some -Wenum-conversion warnings Message-ID: <20191118182547.GA372119@cmpxchg.org> References: <1573848697-29262-1-git-send-email-cai@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1573848697-29262-1-git-send-email-cai@lca.pw> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 15, 2019 at 03:11:37PM -0500, Qian Cai wrote: > The -next commit "mm: vmscan: enforce inactive:active ratio at the > reclaim root" [1] introduced some Clang -Wenum-conversion warnings, > > mm/vmscan.c:2216:39: warning: implicit conversion from enumeration type > 'enum lru_list' to different enumeration type 'enum node_stat_item' > [-Wenum-conversion] > inactive = lruvec_page_state(lruvec, inactive_lru); > ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~ > mm/vmscan.c:2217:37: warning: implicit conversion from enumeration type > 'enum lru_list' to different enumeration type 'enum node_stat_item' > [-Wenum-conversion] > active = lruvec_page_state(lruvec, active_lru); > ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ > mm/vmscan.c:2746:42: warning: implicit conversion from enumeration type > 'enum lru_list' to different enumeration type 'enum node_stat_item' > [-Wenum-conversion] > file = lruvec_page_state(target_lruvec, LRU_INACTIVE_FILE); > ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~ > > Since it guarantees the relative order between the LRU items, fix it by > using NR_LRU_BASE for the translation. > > [1] http://lkml.kernel.org/r/20191107205334.158354-4-hannes@cmpxchg.org > > Signed-off-by: Qian Cai Acked-by: Johannes Weiner Thanks Qian! Andrew, this is a fix for "mm: vmscan: enforce inactive:active ratio at the reclaim root". Could you please fold this into that?