From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755413AbdABIrg (ORCPT ); Mon, 2 Jan 2017 03:47:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:59168 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750990AbdABIrf (ORCPT ); Mon, 2 Jan 2017 03:47:35 -0500 Date: Mon, 2 Jan 2017 09:47:30 +0100 From: Michal Hocko To: Michal Nazarewicz Cc: Jaewon Kim , gregkh@linuxfoundation.org, akpm@linux-foundation.org, labbott@redhat.com, m.szyprowski@samsung.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, jaewon31.kim@gmail.com Subject: Re: [PATCH] mm: cma: print allocation failure reason and bitmap status Message-ID: <20170102084730.GA18048@dhcp22.suse.cz> References: <1482978482-14007-1-git-send-email-jaewon31.kim@samsung.com> <20161229091449.GG29208@dhcp22.suse.cz> <58660BBE.1040807@samsung.com> <20161230094411.GD13301@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 01-01-17 22:59:40, Michal Nazarewicz wrote: [...] > Actually, Linux style is more like: > > #ifdef CONFIG_CMA_DEBUG > static void cma_debug_show_areas() > { > … > } > #else > static inline void cma_debug_show_areas() { } > #endif yes, we usually do that when the function is externally visible. Inline ifdef for static functions saves few lines. Not that it would matter much though. -- Michal Hocko SUSE Labs