Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5553457ybf; Thu, 5 Mar 2020 02:48:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vviDQsefy9Q612zfFt4kueaoPG6NaOlTVLLp4UYMasimHpH8PgTtUp+IqkA0dI5iOs/lcx9 X-Received: by 2002:a9d:3ea4:: with SMTP id b33mr5980396otc.136.1583405285361; Thu, 05 Mar 2020 02:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583405285; cv=none; d=google.com; s=arc-20160816; b=eJD/MXwWqO7+EGP3IyoeSn0z19skf6Xy4ckw5iFiKwRR05zthhx4YY2iYLnnwXJ40b qixpndQWW9NkZyXUaZ2bfjXqLu7c+CcRJooKV767qZS+BgxXrWCj3OqMMelKSYnQ6uXc JDA4LYbIt8+wDUzYLfqjE3SUi4RqLw0rN1meUY4uFHufatGt4W/+1RkfK8H0jajZSp3/ +TRHq6Zu0RDMo/jtrMe36nGAyPn8quTran7BnEwlYX0pJw+Wijmj/smi5uwG5RcIFuv1 tJA/NX07Wm5b8vu2wY58VwDPoilD/SfN14c3waS7d/kpb0pPHywwx9nJ1vroobGmxnEP 806w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=tJtLmivVSroVmC4nEZidT4Zip29I9hYrH65OidWVyqg=; b=lNhQF+3fw9dWhwa314Jw+k2P37HJikBJgjEPwOlZxYQe6ztMvBMyLxVixXS1L+jM4N 1Mg6Wf8ydsQPyhqjzoktMez4OLB2JXxpVBwm2DqIkQuwWGbp+m/rmjSvXmssXu+eQeE7 Xr2wQ6BtGEB4z9oxdEi9Y61vEWlB+RxKv36D0HiQPCJ1ALkgluBoLfsahASGB3Jry9nC 0YYPMRIGIudk2DV7fuxiOM1dkTiiD26y4tcuNmPZ+jRskUm/YmJD9Ze6uyzwsDqZxT0D GEQDzuZR3VadL7N3VaoxBSFDg4QEhLoPHbaHW46p3SgQoXz7T0cE4vBTsqDxV+n5Zo8z 4www== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r13si3373899otq.279.2020.03.05.02.47.53; Thu, 05 Mar 2020 02:48:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbgCEKqC (ORCPT + 99 others); Thu, 5 Mar 2020 05:46:02 -0500 Received: from foss.arm.com ([217.140.110.172]:47014 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgCEKqB (ORCPT ); Thu, 5 Mar 2020 05:46:01 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0F47731B; Thu, 5 Mar 2020 02:46:01 -0800 (PST) Received: from [192.168.1.161] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 09CC03F6C4; Thu, 5 Mar 2020 02:45:59 -0800 (PST) Subject: Re: [PATCH] mm: Make mem_cgroup_id_get_many dependent on MMU and MEMCG_SWAP To: Michal Hocko Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Johannes Weiner , Vladimir Davydov , Andrew Morton References: <20200304142348.48167-1-vincenzo.frascino@arm.com> <20200304165336.GO16139@dhcp22.suse.cz> <8c489836-b824-184e-7cfe-25e55ab73000@arm.com> <20200305100023.GR16139@dhcp22.suse.cz> From: Vincenzo Frascino Message-ID: Date: Thu, 5 Mar 2020 10:46:21 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200305100023.GR16139@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, On 3/5/20 10:00 AM, Michal Hocko wrote: > On Thu 05-03-20 09:49:23, Vincenzo Frascino wrote: >> Hi Michal, >> >> On 3/4/20 4:53 PM, Michal Hocko wrote: >>> On Wed 04-03-20 14:23:48, Vincenzo Frascino wrote: >>>> mem_cgroup_id_get_many() is currently used only when MMU or MEMCG_SWAP >>>> configuration options are enabled. Having them disabled triggers the >>>> following warning at compile time: >>>> >>>> linux/mm/memcontrol.c:4797:13: warning: ‘mem_cgroup_id_get_many’ defined >>>> but not used [-Wunused-function] >>>> static void mem_cgroup_id_get_many(struct mem_cgroup *memcg, unsigned >>>> int n) >>>> >>>> Make mem_cgroup_id_get_many() dependent on MMU and MEMCG_SWAP to address >>>> the issue. >>> >>> A similar patch has been proposed recently >>> http://lkml.kernel.org/r/87fthjh2ib.wl-kuninori.morimoto.gx@renesas.com. >>> The conclusion was that the warning is not really worth adding code. >>> >> >> Thank you for pointing this out, I was not aware of it. I understand that you >> are against "#ifdeffery" in this case, but isn't it the case of adding at least >> __maybe_unused? This would prevent people from reporting it over and over again >> and you to have to push them back :) Let me know what do you think, in case I am >> happy to change my patch accordingly. > > We have discussed __maybe_unused in the email thread as well. I am not a > great fan of that as mentioed there. > I am aware of this. I was just exploring if there was a possibility of addressing the warning, since if we leave all the warnings in scenarios like randconfig can cause confusion in between real and non real issues. Is there anything we can do? -- Regards, Vincenzo