From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753792AbdASQdJ (ORCPT ); Thu, 19 Jan 2017 11:33:09 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:59514 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753482AbdASQci (ORCPT ); Thu, 19 Jan 2017 11:32:38 -0500 Date: Thu, 19 Jan 2017 11:32:28 -0500 (EST) Message-Id: <20170119.113228.175631525740148009.davem@davemloft.net> To: augustocaringi@gmail.com Cc: jiri@mellanox.com, idosch@mellanox.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: atm: Fix build error when !CONFIG_PROC_FS From: David Miller In-Reply-To: <1484823626-8150-1-git-send-email-augustocaringi@gmail.com> References: <1484823626-8150-1-git-send-email-augustocaringi@gmail.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-7 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 19 Jan 2017 07:33:23 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v0JGXMZx009836 From: Augusto Mecking Caringi Date: Thu, 19 Jan 2017 11:00:12 +0000 > When CONFIG_ATM_CLIP is set and CONFIG_PROC_FS is not set, the building > was failing whith the error: > > net/atm/clip.c: In function Ħatm_clip_exit˘: > net/atm/clip.c:933:27: error: Ħatm_proc_root˘ undeclared (first use in > this function) > remove_proc_entry("arp", atm_proc_root); > ^ > > Fix it by putting the proc cleanup code inside a #ifdef CONFIG_PROC_FS > block. > > Signed-off-by: Augusto Mecking Caringi When CONFIG_PROC_FS is not defined, remove_proc_entry is defined as the macro: #define remove_proc_entry(name, parent) do {} while (0) Therefore it is impossible for atm_proc_root to be referened in any way. The fallback macro is designed exactly so that ugly ifdefs like the one you are proposing aren't necessary. I'm not applyiing this patch, something else is happening in your tree.