Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1658298ybn; Wed, 2 Oct 2019 21:01:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzV+f8DlSywBh3I5ai4rfVOrr7YcPdCkj53lChOFzt95LSEESlI1AnwXQ3CJUmV/A97vUry X-Received: by 2002:a50:91d8:: with SMTP id h24mr7288151eda.61.1570075315233; Wed, 02 Oct 2019 21:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570075315; cv=none; d=google.com; s=arc-20160816; b=Ys6TzdOBpw+9JsFKgYHZSpsh+caYcsm8c7dtAYD7p86Xs4k4fEBGR0Fdqt7oST0Q26 gdK3zMqUPGpqygY9BMB2Zyphgb7RBHYKRnm5fN2nVVVeMgJdh+948dUSyV1SkXzyOH+n NqV9Shz78LYYcxti9vqjRIwh/+bj9bywTmCGPqFwmKHvEn4UBbcRGxKBncOYHLb6qPO4 XuEfMpNHftOe9PIDqVxuT5BOnF5LDkMRH8vwg0zixJJWBdW72r+6/GlQxYrgwVLX4MZb 5QXamv1NtQAPgLdHZVYpPdpcTZe1i21qMGjMYOv0/F3nogC1nAQCu/xQ4TfpJDw0XqfA /pOQ== 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:dkim-filter; bh=nkhw/a1oO0nPQOF4FHctSBWATyaUekhzHUNLh8TfmdI=; b=mIZLrz5m2NY3x4lgnYH9cMzv76gyEGWDD/d2j42okn5QozrsoLvtRGam4rIEZyTsaS qy5xdQWQXKbWHLqKqmEHrad9kxkOxKY5/DaMksKSb9MpEoM6PwVXPnhEmhGx+HBMpMxF feY5kDVjuz9dVjyg7HBoqyQoE4TW4Xxh+J2YnxesiDgqAWHh03swZQVyMmzR1NrKkFCe 3dz1WzVc4ie6EcpHSXQ84vaSJSiiZfdMqANvcqdYJHhqIJ8zQ9BHNYK4iXj8lY+cQMyq htHe3yFOtLD9Rgl35HqEK3WPfXdblj+aQYBs/zQQuNS0SXYYFQ2naKpDJNBSfcmCyCBu URrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=U9Oi20ce; 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 k7si713853edb.238.2019.10.02.21.01.31; Wed, 02 Oct 2019 21:01:55 -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=@nifty.com header.s=dec2015msa header.b=U9Oi20ce; 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 S1727783AbfJCCLH (ORCPT + 99 others); Wed, 2 Oct 2019 22:11:07 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:48087 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbfJCCLG (ORCPT ); Wed, 2 Oct 2019 22:11:06 -0400 Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x932AlhR006363; Thu, 3 Oct 2019 11:10:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x932AlhR006363 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1570068648; bh=nkhw/a1oO0nPQOF4FHctSBWATyaUekhzHUNLh8TfmdI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=U9Oi20ce/mJfbr+vphEd72H8PgoTVD9Fw38AS044QGcxorUEKgusj76nWtoQN+Mvx Q0WkDIpdbuBWBK/ofkFggvSOl9/z8zsZyqN2cWF0ArHgOqDepSuR7KpRi/2bqOUUjW m1OrML5IM/r54+hYlTxg7+wJqtEZA+4V3mlz2yZyUYymVk1gG1cbtXFIMb5CegbnsJ 3bNqNTR1J9egjTheAiaxfWOYjyj/MW/bZaGvSdjvehH47uM2uoRhgpMOY3ow/U/l/a SmcJxKVvbTMLs/AHgKxQ2d7070t8r51T8z3aTbBbi9IunZDYvxdDB7yVVe1zkU3XcL DXxNi39SNJYRg== X-Nifty-SrcIP: [209.85.217.47] Received: by mail-vs1-f47.google.com with SMTP id m22so603854vsl.9; Wed, 02 Oct 2019 19:10:48 -0700 (PDT) X-Gm-Message-State: APjAAAVTGHHYlBvtoIfIN3n4WamG7PI4pmYPIECnEr/XwhgPSaSe40g4 hSlXWlPyt2uPKi2AtxVjn8rkxOrieHr+MDH2mJE= X-Received: by 2002:a67:1e87:: with SMTP id e129mr3884016vse.179.1570068647121; Wed, 02 Oct 2019 19:10:47 -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: Masahiro Yamada Date: Thu, 3 Oct 2019 11:10:11 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Linus Torvalds Cc: Geert Uytterhoeven , Nick Desaulniers , Russell King - ARM Linux admin , Will Deacon , 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 Thu, Oct 3, 2019 at 5:46 AM Linus Torvalds wrote: > > 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. No, please do not. Macrofying the 'inline' is a horrid mistake that makes incorrect code work. It would eternally prevent people from writing portable, correct code. Please do not encourage to hide problems. > 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 -- Best Regards Masahiro Yamada