Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2492663imm; Wed, 3 Oct 2018 04:54:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV62WviB7T1pE1XC+oTa2WxaN5ktSC+ddEBe6gwCtD7w49MabIOOf61IPKc7f3s/7/mfqr42a X-Received: by 2002:a17:902:b909:: with SMTP id bf9-v6mr1245540plb.322.1538567679898; Wed, 03 Oct 2018 04:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538567679; cv=none; d=google.com; s=arc-20160816; b=SWRTtCc1yKO42Su5z3dmezx1NFrHerG2LwQVVbFsT05tBo15OEfHIHlOYPhz291s37 f59Rwi9KfzRX5lazxNdB2aOP3ZRzxx1eUyIux841BHNtat5Oa46HeAwIjz6tDjysspf9 uq6rQeCvL27fPQm6WBa7WQTG2UbHPdS7/qwRDfjd41h99GVSG3WuKVzqqeYi5RFcwAAT rStgT18cyJPJYtZypchYs5yI/4KlfrbNvo5zsc1Qvkq/Z+fLDtzk4Af9v3hk3N1e/xtf NL4sGeF/S9mQyTE/cMGYLyJ7Ox2lLVnAxBX+qbYji3D49bD1u+EfIl7f3dp+WifI0g6n Airw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4ZU0NqyeDKJqVATpo3F4hRGrcA/p65+RxIxkyHT2WTc=; b=WlfBHFur+1ZOWeL3OtSudLDBQqDqSW2+k7zByn7Z9V+Cim+8j4s6FAeGp35nDtvjVP YW8bwxHQHFGVZKhDvTKweHsfn3OJeRanvB6DcJ3M/Od0y84phILqJ08qgS54Wj6mv2bu rMArBb85nHT/7v7FcxbGwwgmE491RUVN6TomoLNL2REnjeMnqJPsZCM7hUnpP4bAiDK+ E3hx4jjYPrPQnJbSJ59ko1iZBIoNNnmI51IEyXU9gojJJZOOVl4ZvvmpTfCv1AATNiTQ o8y/HSqaCuBy9lD9lSrHJigxxLl6p3zAfXLlPEi+jM3ZfZmqhG9M7k2ANz+g2d3qKmZF TD0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qVlE3JIT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6-v6si1334219pfg.282.2018.10.03.04.54.24; Wed, 03 Oct 2018 04:54:39 -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=@gmail.com header.s=20161025 header.b=qVlE3JIT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727218AbeJCSmX (ORCPT + 99 others); Wed, 3 Oct 2018 14:42:23 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:37140 "EHLO mail-qt1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbeJCSmW (ORCPT ); Wed, 3 Oct 2018 14:42:22 -0400 Received: by mail-qt1-f170.google.com with SMTP id n6-v6so5515154qtl.4; Wed, 03 Oct 2018 04:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=4ZU0NqyeDKJqVATpo3F4hRGrcA/p65+RxIxkyHT2WTc=; b=qVlE3JITjCo5T80aFChdQqXhV+2JMBmatix6tHhnP7ucNESrIIVHl0z8mzU6OERp4F maueJ5aELTDSjxuOmvUsXTYGl4i3iZcYH5U3Le8Dw0kejQ/gWA8ZJjmq3XaVjihlk413 NrjCbsEvmI+XD8gfucgHP+YdDr+auZt1WxcPKp6zJ3rmfmAy7zCcR2CO+M01GflsBZ+s 0bsgv/LTm+hAmGpWPTSK0l8q/uxfaytO5SEastOsWlj/3LICm23oCmJNtOSpzYW3cFgZ Vqp5F7wLOBuOmCrNoepOfiqZp81PKcveEUW2YLmvPRsUcAThZxnJPz7J7GMhUNRMVEqs mCsQ== 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; bh=4ZU0NqyeDKJqVATpo3F4hRGrcA/p65+RxIxkyHT2WTc=; b=cLTTV+SUfRbG4oOd/G4Yc/NKT/xqECm4e7hO7aRo9Jm1k3S56SI6HJNaGwO0F+kdD5 4QdnxRYJalrO4ufAwdOBq4IP2pIoM7qrLETCj65B6PXH+XPEDqLqQKUtiejtAkR20Z5U 329h6Y5s5lJ5T7Fr3+Cq6m4rp04Y5w9WwOu2TqL2ewvo9j74JYomTBsv0id5vwnO4Zs7 8rqjDvC47k7hyy0MC+O7LDAwqcscrL8kmXtbzll6id/kFYlXP9TOQSKAxEScE7eplhdY QNhZrV7/ihLpaE++td8nCrhavcPNeTEdgygZuC1AbTdkEmPQ7Mo0010tkx4JAVpH2+Gk rpCQ== X-Gm-Message-State: ABuFfohq1/ER92frYNCKnPPcg7iMDY4XZobQ1nnq9ZBRtxJgHn6SO/33 7ZGQ8CZ26x1gtM0/s+633x2x/2Of4JU4YtU9Sbo= X-Received: by 2002:a0c:f40c:: with SMTP id h12-v6mr870825qvl.78.1538567656744; Wed, 03 Oct 2018 04:54:16 -0700 (PDT) MIME-Version: 1.0 References: <20181003071059.02b3fd6f@canb.auug.org.au> <20181002232454.GB2483@thunk.org> In-Reply-To: <20181002232454.GB2483@thunk.org> From: Miguel Ojeda Date: Wed, 3 Oct 2018 13:54:05 +0200 Message-ID: Subject: Re: [GIT PULL linux-next] Add Compiler Attributes tree To: "Ted Ts'o" , Nick Desaulniers , Andrew Morton , Greg KH , Linux-Next Mailing List , Andreas Dilger , Masahiro Yamada , Michal Marek , Steven Rostedt , Mauro Carvalho Chehab , Olof Johansson , Konstantin Ryabitsev , David Miller , Andrey Ryabinin , Kees Cook , Thomas Gleixner , Ingo Molnar , Paul Lawrence , Sandipan Das , Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , Paul Burton , David Rientjes , Willy Tarreau , Martin Sebor , Christopher Li , Jonathan Corbet , Geert Uytterhoeven , Rasmus Villemoes , Joe Perches , Arnd Bergmann , Dominique Martinet , Stefan Agner , Luc Van Oostenryck , Linus Torvalds , Linux Doc Mailing List , Ext4 Developers List , linux-sparse@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel , Stephen Rothwell 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 Hi Ted, On Wed, Oct 3, 2018 at 1:25 AM Theodore Y. Ts'o wrote: > > On Wed, Oct 03, 2018 at 12:12:10AM +0200, Miguel Ojeda wrote: > > As I have read, -next is supposed to be a vision of what the merge > > window will look like after merging everything, i.e. ideally -rc1. For > > that to work for files out-of-tree (like these ones, which are not > > maintained by a single tree), changes should be allowed to be stacked > > on each other; otherwise, we cannot handle conflicts :-( > > In general, best practice is to base tree on an -rcX commit. I > usually will use something like -rc4 which is after most of the major > changes have gone in. This tends to reduce conflicts for most git > trees. Sure. That is what I do for mainline PRs to Linus. As you say, it works fine for mostly independent trees. But it doesn't (that well) for out-of-tree stuff or for stuff spanning several trees. > > There are times when a commit in one tree needs to depend on a commit > in another tree. What to do depends on the circumstances. > Exactly. And for this case, I simply assumed Stephen wanted a clean series to apply on top of the latest next-* tag (same way we base stuff on top of -rc*s). Note that this is *not* really a "tree" collecting changes/development, it is a patch series, i.e. what is important is only the range-diff. What has surprised me is that -next does not allow for range-diffs (patches/commits/...) to be inside -next, maybe applied after all the normal merges of trees. I simply assumed it did, given what I could find about -next (which does not seem to be documented properly, by the way). > > So another solution is to simply evade the problem. If the reason why > tree A needs to depend on tree B is that tree B is using some > interface which has changed, if it's a minor change, then Stephen will > fix it up when he pulls the changes; just as Linus will. While this is a simple conflict, I don't really agree with release maintainers having to fix conflicts on the fly (even if it is a single trivial line), but that is an orthogonal discussion... > Yet another solution is to arrange the code changes to avoid needing > commits that might conflict. For example, in fs/ext4/ext4.h, I very > deliberately did this. > > /* Until this gets included into linux/compiler-gcc.h */ > #ifndef __nonstring > #if defined(GCC_VERSION) && (GCC_VERSION >= 80000) > #define __nonstring __attribute__((nonstring)) > #else > #define __nonstring > #endif > #endif > > You included a cleanup patch to remove it in your git tree, but it > wasn't actually necessary. If there was a merge conflict, it would be > simple enough to just drop your cleanup patch, since I had carefully > used #ifndef __nonstring... #endif. So the idea was that if someone > defined __nonstring somewhere else, it wouldn't break the build with a > duplicate #define since it was protected with an #ifndef. > > I didn't mind that you included a cleanup patch; but I set things up > so that it would not be necessary, since often the best way to solve a > merge conflict is by avoiding the need for the change (in some other > git tree) in the first place. :-) Alright, I am not sure how to answer this without sounding "aggressive" and maybe I misunderstood something you tried to point out, so I apologize in advance. There are several points here: * The merge conflict isn't related to this (but let's assume it was, since you pointed this out as an example -- I guess; although I am not sure why). * Thanks for explaining, but I think most people here understand how #ifndef works :-) Also note that we already had guards for some attributes that needed per-compiler implementations. * The patch is actually necessary: - Several people argued that examples should be present when I introduced __nonstring earlier in the series. While I don't think they are mandatory for this case, they are good to have, and since they were anyway requested, I happily added them. - Changes should include everything related to them (as far as possible, i.e. extreme examples aside). Adding __nonstring and not removing the ext4 part would simply be leaving undone work (which has to be done sooner or later). To be honest, it could have even been done in the same commit and I would say it is logically OK (even if not great). - Related to that: I think the outer #ifndef shouldn't have been included to begin with, because it is either wrong or dead code: if we end up having a __nonstring, it should be removed at the same time (like this series does); and if __nonstring isn't there (like now), it isn't guarding against anything. At worst, it could hide a mismatch in the definitions. - I promised to you I would clean it up :-) You seem to argue that it is better to avoid merge conflicts rather than doing a proper series. Well, I think we should really try to avoid conflicts pushing down the """quality""" of patches/commits/series. Cheers, Miguel