From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Davydov Subject: Re: [PATCH] mm: memcontrol: avoid unused function warning Date: Wed, 24 Aug 2016 12:18:39 +0300 Message-ID: <20160824091839.GE1863@esperanza> References: <20160824082301.632345-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YZFtCDc5uHc0lbbXATHP+nPy95TworpFYPQALLpBYxE=; b=VS2ONv4/kttm1X/ywBASD696w+/L2NGsrGpUWO51QRhSl5JHeSUtM+unNt6/DPLD4j/BD1EucYKiQ8O+HPADHVTsjwvRyTY8WiOcAbPN/nzJaerX1Wer1eH7USuF2AvcYKoWjwTzFvolhGb8ecaPIdsxu19yPZjCFmiU1u7VknM= Content-Disposition: inline In-Reply-To: <20160824082301.632345-1-arnd@arndb.de> Sender: owner-linux-mm@kvack.org List-ID: Content-Transfer-Encoding: 7bit To: Arnd Bergmann Cc: Johannes Weiner , Michal Hocko , Andrew Morton , Tejun Heo , Mel Gorman , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org On Wed, Aug 24, 2016 at 10:22:43AM +0200, Arnd Bergmann wrote: > A bugfix in v4.8-rc2 introduced a harmless warning when CONFIG_MEMCG_SWAP > is disabled but CONFIG_MEMCG is enabled: > > mm/memcontrol.c:4085:27: error: 'mem_cgroup_id_get_online' defined but not used [-Werror=unused-function] > static struct mem_cgroup *mem_cgroup_id_get_online(struct mem_cgroup *memcg) > > This adds an extra #ifdef that matches the one around the caller to > avoid the warning. > > Signed-off-by: Arnd Bergmann > Fixes: 1f47b61fb407 ("mm: memcontrol: fix swap counter leak on swapout from offline cgroup") Acked-by: Vladimir Davydov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org