Received: by 10.223.164.221 with SMTP id h29csp170706wrb; Fri, 3 Nov 2017 07:18:44 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Ro/JD8SEMz6ts208Y39XO0MLiWPG9vsES8tUdzW7tdgxxm34zPiIux2wS/A7tIlWM3yn3r X-Received: by 10.99.172.83 with SMTP id z19mr7506868pgn.46.1509718724729; Fri, 03 Nov 2017 07:18:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509718724; cv=none; d=google.com; s=arc-20160816; b=ZSyEQdN0OGDYeDnQG09LshJ01kh9qu2LS6Tdyptu6VDdfMlOI/nmt7UmKXEFBzcpa1 zi5j+/aG0rhOd4wpurdSvT8peFyfPjoSbJYjbH9AiynVgqBK/KhGj8XxFpK410lAsLr6 sfXgzebVKfjt1FJNTdxhfY2vtVBzDi4EDN6/+Vz6ItdcfQNdW6rCqNquGS6VajtiD721 M51cmw2MJeeT6pzqpycs8+JmDgDFCKAgY3/oUM4bx9/KdCJcltaquaFnvKJDOXeebw6q jCOeN9IxeQY1/UMJLw5xw45l5nnon7xeY3Muf5B7sFSWC1dqDRO63n3u2fJZr7j68dih RZng== 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:arc-authentication-results; bh=YwqCJ0a9bMG1TzXnk7TftwTtZZ/BNPYKJ3Hi0gmOLYE=; b=ztMOgGIXwrnurh+N8AwNH+Ik0581zZtRtc/B/W2jHn72UkHWbTi3v8QutEolVTFkEM lJ3tAgD/AQLeRbnWd2BRkxx/cZlsTJnugTRGmZIPADVL/6m4466pfYCwZCMFJrfDdyxS VHmSLXHJUArYUQ7lT9OeNX3+S0uScv3uJGigUc8/D2Xk/m6r8SrcnSvkoAlvrWzlxWPx u5wo8zQ6Ld+xwuSAKnqJA065u//kUiCYzEXcg0o1Yc18gApC6E4pjiVwhe8QoOSc1lll ntnYE39cBsXqHEr5zR/BxVXK8QEXtIXDOglt4umgYfjprpdAqu5Bw7mYo9vR31B3XnqA wklg== 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 s15si4869611plp.268.2017.11.03.07.18.31; Fri, 03 Nov 2017 07:18:44 -0700 (PDT) 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 S1752777AbdKCORp (ORCPT + 95 others); Fri, 3 Nov 2017 10:17:45 -0400 Received: from bastet.se.axis.com ([195.60.68.11]:55108 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbdKCORn (ORCPT ); Fri, 3 Nov 2017 10:17:43 -0400 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 5222F18919; Fri, 3 Nov 2017 15:17:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2iTWmDz2FrTT; Fri, 3 Nov 2017 15:17:41 +0100 (CET) Received: from boulder03.se.axis.com (boulder03.se.axis.com [10.0.8.17]) by bastet.se.axis.com (Postfix) with ESMTPS id ADACF18196; Fri, 3 Nov 2017 15:17:40 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 633A41E07E; Fri, 3 Nov 2017 15:17:40 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5652E1E07C; Fri, 3 Nov 2017 15:17:40 +0100 (CET) Received: from seth.se.axis.com (unknown [10.0.2.172]) by boulder03.se.axis.com (Postfix) with ESMTP; Fri, 3 Nov 2017 15:17:40 +0100 (CET) Received: from XBOX02.axis.com (xbox02.axis.com [10.0.5.16]) by seth.se.axis.com (Postfix) with ESMTP id 48D9025E0; Fri, 3 Nov 2017 15:17:40 +0100 (CET) Received: from [10.88.4.10] (10.0.5.60) by XBOX02.axis.com (10.0.5.16) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Fri, 3 Nov 2017 15:17:04 +0100 Subject: Re: [PATCH v3 14/17] PCI: dwc: artpec6: Add support for endpoint mode To: Arnd Bergmann CC: Bjorn Helgaas , Jesper Nilsson , Kishon Vijay Abraham I , Jingoo Han , Shawn Guo , Peter Robinson , Xiaowei Song , linux-pci , Linux Kernel Mailing List , References: <20171031223936.27549-1-niklas.cassel@axis.com> <20171031223936.27549-15-niklas.cassel@axis.com> <5a8c7aaf-552c-7170-2a36-13b50168a9cc@axis.com> From: Niklas Cassel Message-ID: Date: Fri, 3 Nov 2017 15:16:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.0.5.60] X-ClientProxiedBy: XBOX02.axis.com (10.0.5.16) To XBOX02.axis.com (10.0.5.16) X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03/2017 11:23 AM, Arnd Bergmann wrote: > On Fri, Nov 3, 2017 at 10:56 AM, Niklas Cassel wrote: >> On 11/02/2017 10:13 AM, Arnd Bergmann wrote: > What I meant is that you can remove the #ifdef entirely if you add > > if (!IS_ENABLED(CONFIG_PCIE_ARTPEC6_HOST)) > return -ENODEV; > > to artpec6_pcie_probe(). Anything after that statement will get > silently dropped by the compiler, including static functions and > structures that are referenced indirectly from there. Wow, this actually helps gcc with dead code elimination. It was even possible to add those !IS_ENABLED the two different case labels in the switch statement. I get no unwanted symbols when looking at the vmlinux in gdb. Great suggestion Arnd :) Regards, Niklas From 1583040081442125425@xxx Fri Nov 03 10:24:27 +0000 2017 X-GM-THRID: 1582814679884309053 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread