Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3821968ybi; Mon, 3 Jun 2019 00:26:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHdGDjhMF0Dwl/kXPgjKvOBn34oipOqGCUOETw9sM9ptqixCvGgQP5y/+oThryQ6ddEK8L X-Received: by 2002:a17:902:7c10:: with SMTP id x16mr26903899pll.4.1559546774309; Mon, 03 Jun 2019 00:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559546774; cv=none; d=google.com; s=arc-20160816; b=WxQLJD8MHGCsT7TpigN121YYO42jFblGKP/s35O67FQE+1ILg1y8uf7wwaxG7GbCAs DrgNmwtwlJjFC9lOsIi6WSNSsxAiVvuKVhOGnwBOHLh2i0iRW7FlrdZXn0FxDjEM1ac8 UzS+UUxHBmgKaUtNOBdbpiqDD4XAJqP1sjLBEGEFSTQWIIYiikDTd6YQlzEJUCFO4i6k XXWWhgZyK33c1GAV9kft+VBsshiRQk5FnOFexL3q6PmNMfXx9kNHMWbjmvyyx12ueM0S YQU5hWO+t40UJ0lYD1NKMwJmZJRjP4m3YJne3bBzH9WZ7qE5YbYeH/ZJUR8umCWV6Zhg RBAQ== 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:dkim-signature; bh=NO4fB+m3OtDoIwxgAyZQiCGkauq5v+waq4FdkuigmOA=; b=acXuemY0z60H6HQQJthbFYmYG2KLL+KXrZOUU9docMvdfjdkHu7QV/OtZ4+vInZXyN WpO8OHXy0EyqSV8PPorfSmPLeTahMYFeJ4gYuijcEwTR1XenQ9bQYr7ySddmH2rpj5Rx Uog7DMyPdlh2nokrHJXj9Cmx0kp78vQSSY1NNItVUCx6WTC9lqBamxxrhokus/X4u7Tk kPdj9xD2Gq8429W5E5FHXfZ37YR3d/kmtVOtckOoPvwIW+VA8iOGYHtGesXZt3ug9tsR M6RmYcUUJRnZOqpSzMnv5l9VztzeO7jUGI4u2oVdDI5+TJ8c5EGiJDwcPVIyNKj7Pzv2 6BMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=TCcGOTat; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 s24si2261844plq.23.2019.06.03.00.25.54; Mon, 03 Jun 2019 00:26:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=TCcGOTat; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbfFCHCm (ORCPT + 99 others); Mon, 3 Jun 2019 03:02:42 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:18472 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbfFCHCm (ORCPT ); Mon, 3 Jun 2019 03:02:42 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 45HQwr0fSPz9v0Y5; Mon, 3 Jun 2019 09:02:36 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=TCcGOTat; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id da8KgaKUKkbA; Mon, 3 Jun 2019 09:02:36 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 45HQwq6khSz9v0Xt; Mon, 3 Jun 2019 09:02:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1559545355; bh=NO4fB+m3OtDoIwxgAyZQiCGkauq5v+waq4FdkuigmOA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=TCcGOTat3bZQ7bkcQdm/wp8174EbiGztQoOt3Nroel4ZcpBOBM7xv4KUBzOGrjQW0 CHfpsfelf+b63UprrxeCeErjpLCtzb5c8AYn0203G6l53/GpslBB72eY8OKTKdfmrq 1nScQrMYt5plsm4kwM84PgY2lGY6yIcLxhFYc4vo= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6141F8B7B1; Mon, 3 Jun 2019 09:02:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id PML3eTP_VqfM; Mon, 3 Jun 2019 09:02:40 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 35A848B7A1; Mon, 3 Jun 2019 09:02:40 +0200 (CEST) Subject: Re: Conding style question regarding configuration To: Pascal Van Leeuwen Cc: "linux-crypto@vger.kernel.org" , Ard Biesheuvel References: <20190529180731.Horde.NGHeOXuCgw23pVdGqjc0fw9@messagerie.si.c-s.fr> From: Christophe Leroy Message-ID: Date: Mon, 3 Jun 2019 09:02:40 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Le 30/05/2019 à 12:16, Pascal Van Leeuwen a écrit : >>>> Yes. Code and data with static linkage will just be optimized away by >>>> the compiler if the CONFIG_xx option is not enabled, so all you need >>>> to guard are the actual statements, function calls etc. >>>> >>> Ok, makes sense. Then I'll just config out the relevant function bodies >>> and assume the compiler will do the rest ... >>> >> >> No need to config out function bodies when they are static. >> > Well, I got a complaint from someone that my driver updates for adding PCIE > support wouldn't compile properly on a platform without a PCI(E) subsystem. > So I figure I do have to config out the references to PCI specific function > calls to fix that. Do you have a link to your driver updates ? We could help you find the best solution. Christophe > > Or are you just referring to bodies of static subfunctions that are no > longer being called? Would the compiler skip those entirely? > >> If not, it's better to group then in a C file and associate that file >> to the config symbol through Makefile >> >> Christophe > > Regards, > Pascal van Leeuwen > Silicon IP Architect, Multi-Protocol Engines @ Inside Secure > www.insidesecure.com >