Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1351983ybn; Wed, 2 Oct 2019 14:53:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqgy8Q8mfkGf0wWuU1hr43gFS1cXML/ahz59L7/8Q/SPLRW0g+SQ0rbARYpEkutgbOLdpC X-Received: by 2002:a50:87ca:: with SMTP id 10mr6290299edz.77.1570053239702; Wed, 02 Oct 2019 14:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570053239; cv=none; d=google.com; s=arc-20160816; b=C7BDHj+T5EuZgEycoktp+fCa1FVjVR6flatbTfay0r8Q80oryspNdI4ENlSmcNBJ0r h5hAv4Z7C2NskAL+lsYNlALd86lOEOXzmV0QCaX1zR2lbe4IuH8Il5rPfPrV7UW2Ac4C ZaKzzEvFLdYfFRM0hOjJdX9NheghKheDvFpfmCnr5pO+c+/r7daFdoIVsAKyLPUFAQD/ i/adRwbBOuI1UFZVt9HAaEWa5lc2lMJnmJMlVmDuiHJjBjFXGhigiaCr5tuSEhDQP/Jq j9j8fkloxZ0Ejt7vsSxpFKpcdVH4+xExmqwZOiJ2/C57rv96+NJ3vfaZRWcLl3OTsoBY oDTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=CZoX6/kAyBlNzPm3PxVJHHET8XR6oaEdHzpQ1JHxlxk=; b=hHJcoe2AG+Ns+Nsc7hC2CWLC2+obl/8SEeoQSiS8PCG8Ryat1MCENiUIvDcRd87cXz e9lW4+h2GS7o22pD+8uJVZfE3pKoEVP+pv2F1hUnu9P0sctx294SdwbE/7brB+skATle yL3dTPyC47PmHMLdIwaOAhuOPfXwTy8JNGgTj+kShf0HCzSvm7GUHRRAGFH4i6ZTrXlR Tt9qzPzbQAmfsVm3l4WzHzvFE89vSq6fiou6YpT/99xyfGZXEPvczxAUPgmVLSQ2TNEK 6PkAsqN0D8/q6DMzoD5Ja/XWVt3nwbCX/Yo7OttYpHiwUvmB5HP6VxLIfig8XeNaLN2L 7mRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=WgH48i53; 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 x25si255770edd.350.2019.10.02.14.53.35; Wed, 02 Oct 2019 14:53:59 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=WgH48i53; 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 S1728656AbfJBUqT (ORCPT + 99 others); Wed, 2 Oct 2019 16:46:19 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42335 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727875AbfJBUqT (ORCPT ); Wed, 2 Oct 2019 16:46:19 -0400 Received: by mail-lj1-f194.google.com with SMTP id y23so268175lje.9 for ; Wed, 02 Oct 2019 13:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CZoX6/kAyBlNzPm3PxVJHHET8XR6oaEdHzpQ1JHxlxk=; b=WgH48i53OT8OxyAS10xRgTGen79hUl3stcfXDufRhIUV4G8traFDMLYOcDbmARGtri tU39pf48gI+/cvvec8i+m09klNO/DTKi0Xs0KDdSSGqqIUqlnGTnz+5xBoxTqitRtY8f KX6a88Kh0m0W4klfZBa6hR0r/gM5QP+f5tEIM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CZoX6/kAyBlNzPm3PxVJHHET8XR6oaEdHzpQ1JHxlxk=; b=Ueuoz+9gDD7U+W/hdlxBc2VpPCbnYpKprpFqmGDg/FKrArJk1E4tCBqjkoNQy6VJyR uhG1t0bZb8zkVDsZKGxFv/tPHZy1u1f1q1vQxN6vIBYOmZQ1LMuoOznD5xJK9dopBbvc Zl+SR61rUo1QZlhC+l2JRv9xBRjZc5ulyFKwcCx3fZ0axANV45KpYDGboFgKOpBahZ8p UuV8Nr31+DzlmHPrK1KOdVU2NjWw7hf819u+TZt/7au3fe/6psjTlRw9YuQej/OJbuCk U9VP/7oDtmt4uPeNS1uzFI6cvOeLhdfMgORiLjcqf6UI6MQpIbQif1hEpraqL0+9Fotm ZepA== X-Gm-Message-State: APjAAAWnAgyiyDPjBBbD14kqctvCZvQQAs8YakOYEBr4srcI5N4H7dU7 nwL1qgK8OMJCXPNaqv/0rQIGHI/VjRU= X-Received: by 2002:a2e:1b5c:: with SMTP id b89mr3756710ljb.182.1570049177615; Wed, 02 Oct 2019 13:46:17 -0700 (PDT) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id o15sm34565lff.22.2019.10.02.13.46.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Oct 2019 13:46:17 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id d17so97693lfa.7 for ; Wed, 02 Oct 2019 13:46:17 -0700 (PDT) X-Received: by 2002:ac2:47f8:: with SMTP id b24mr3502326lfp.134.1570048796885; Wed, 02 Oct 2019 13:39:56 -0700 (PDT) MIME-Version: 1.0 References: <20190930112636.vx2qxo4hdysvxibl@willie-the-truck> <20190930121803.n34i63scet2ec7ll@willie-the-truck> <20191001092823.z4zhlbwvtwnlotwc@willie-the-truck> <20191001170142.x66orounxuln7zs3@willie-the-truck> <20191001175512.GK25745@shell.armlinux.org.uk> <20191001181438.GL25745@shell.armlinux.org.uk> In-Reply-To: From: Linus Torvalds Date: Wed, 2 Oct 2019 13:39:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Geert Uytterhoeven Cc: Nick Desaulniers , Russell King - ARM Linux admin , Will Deacon , Masahiro Yamada , Nicolas Saenz Julienne , Andrew Morton , Ingo Molnar , Borislav Petkov , Miguel Ojeda , linux-arch , LKML , Catalin Marinas , Stefan Wahren , Kees Cook , Arnd Bergmann , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 2, 2019 at 5:56 AM Geert Uytterhoeven wrote: > > > > > Then use the C preprocessor to force the inlining. I'm sorry it's not > > as pretty as static inline functions. > > Which makes us lose the baby^H^H^H^Htype checking performed > on function parameters, requiring to add more ugly checks. I'm 100% agreed on this. If the inline change is being pushed by people who say "you should have used macros instead if you wanted inlining", then I will just revert that stupid commit that is causing problems. No, the preprocessor is not the answer. That said, code that relies on inlining for _correctness_ should use "__always_inline" and possibly even have a comment about why. But I am considering just undoing commit 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") entirely. The advantages are questionable, and when the advantages are balanced against actual regressions and the arguments are "use macros", that just shows how badly thought out this was. Linus