Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033663AbdD0QLg (ORCPT ); Thu, 27 Apr 2017 12:11:36 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]:28605 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032672AbdD0QL3 (ORCPT ); Thu, 27 Apr 2017 12:11:29 -0400 X-RZG-AUTH: :P2MHfkW8eP4Mre39l357AZT/I7AY/7nT2yrT1q0ngWNsKR9DbcDvsfbZ70J0gs4NGOFe X-RZG-CLASS-ID: mo00 Subject: Re: [PATCH net-next] can: fix build error without CONFIG_PROC_FS To: Marc Kleine-Budde , Arnd Bergmann , "David S. Miller" References: <20170427142146.3107957-1-arnd@arndb.de> <937e9144-c06c-d265-29eb-a1c6f96b6f89@pengutronix.de> Cc: Thomas Gleixner , Cong Wang , Mario Kicherer , Eric Dumazet , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Oliver Hartkopp Message-ID: <499a8b67-8180-487b-9e7f-9ec0dc85adad@hartkopp.net> Date: Thu, 27 Apr 2017 18:11:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <937e9144-c06c-d265-29eb-a1c6f96b6f89@pengutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1657 Lines: 55 Hello Arnd, many thanks for your patch. Btw > static void canbcm_pernet_exit(struct net *net) > { > +#ifdef CONFIG_PROC_FS > /* remove /proc/net/can-bcm directory */ > if (IS_ENABLED(CONFIG_PROC_FS)) { > if (net->can.bcmproc_dir) > remove_proc_entry("can-bcm", net->proc_net); > } > +#endif > } "if (IS_ENABLED(CONFIG_PROC_FS))" becomes obsolete too then ... So I would suggest to take my patch to fix my fault ;-) Best regards, Oliver On 04/27/2017 04:29 PM, Marc Kleine-Budde wrote: > Hello Arnd, > > On 04/27/2017 04:21 PM, Arnd Bergmann wrote: >> The procfs dir entry was added inside of an #ifdef, causing a build error >> when we try to access it without CONFIG_PROC_FS set: >> >> net/can/bcm.c:1541:14: error: 'struct netns_can' has no member named 'bcmproc_dir' >> net/can/bcm.c: In function 'bcm_connect': >> net/can/bcm.c:1601:14: error: 'struct netns_can' has no member named 'bcmproc_dir' >> net/can/bcm.c: In function 'canbcm_pernet_init': >> net/can/bcm.c:1696:11: error: 'struct netns_can' has no member named 'bcmproc_dir' >> net/can/bcm.c: In function 'canbcm_pernet_exit': >> net/can/bcm.c:1707:15: error: 'struct netns_can' has no member named 'bcmproc_dir' >> >> This adds the same #ifdef around all users of the pointer. Alternatively >> we could move the pointer outside of the #ifdef. >> >> Fixes: 384317ef4187 ("can: network namespace support for CAN_BCM protocol") >> Signed-off-by: Arnd Bergmann > > A fix for this problem is part of the pull request I send to David > earlier today: > > https://www.mail-archive.com/netdev@vger.kernel.org/msg165764.html > > regards, > Marc >