Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1345374imm; Wed, 11 Jul 2018 23:40:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpczSs5SshGC7agYEUKeDri5rADeXvPdzDoVfsffUISvPv59hXQlAZkIi6qiLYaMnNo/cDa0 X-Received: by 2002:a63:735d:: with SMTP id d29-v6mr960908pgn.156.1531377644179; Wed, 11 Jul 2018 23:40:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531377644; cv=none; d=google.com; s=arc-20160816; b=mjPTn8taCFAg8qItryFb3yJklJzCwHP2yfJJeXCL0XiXQvISDx0eLcl2apKRplVBgp /nrpuBN+N3RLDxzWYhejjGL/2kGHj2mtHb5pMIKOAaALomlOjeq9G58Dz8HunszebyoD 7seKOoOWh25cTHT3xpsP28HDaMIoXuqXmfBeZMlJZz2a1rS/zaU8g+Vo1ricHYDM3QbR iUnuEKQQKNWwL+zdu7PUfSzuVhD16SMagd0oH9xUtLDUga4gTHwu5KRw8XAFAa/1EVQ6 T2bB+dL5zNwYzHlxTZvkjEjgHM/91z3GcW8GiFjK40FjWLMXZT/F0/k0MdTgaps3QI71 mAeA== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=xhxnlk6u4VoTZdohB+qCVE8yJJgqiMYtNMOd1hPEhkc=; b=g3ioqdZ18oOKf58C6s71+uun680mqZZNgYL2xUjnNuz2PTj92nGiNg5qjj+/cMnIdX ARzrH53NvEBjYWV8XN0NWKpUbkmYkKklH2KodHOat66ZmNMGo90vZBlIkuyyuzV+/gTG HVg/pHXRKWnrqE+/0moQR++hYpM5cvWHXborjWSJIDmkA+4C9R/niGh+0s2GG3ZFzp8k pZ4dFHUnpSunan0U+80DvfPbT1Qc8BM6gYTU54pucH5RIkYiHi5TSIopelbxuPGQuU/P 9gVpd7O/dibUq9ZMi5vuFsWlklInUXhtUTmvBeEF6eS4SJdtAzx+Lbc/eJ/IJ2QPVXYS DmgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=StlbcpXP; 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 p1-v6si20627046pld.218.2018.07.11.23.40.27; Wed, 11 Jul 2018 23:40: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; dkim=fail header.i=@ffwll.ch header.s=google header.b=StlbcpXP; 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 S1727714AbeGLGsA (ORCPT + 99 others); Thu, 12 Jul 2018 02:48:00 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:33645 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727016AbeGLGsA (ORCPT ); Thu, 12 Jul 2018 02:48:00 -0400 Received: by mail-it0-f65.google.com with SMTP id y124-v6so1075809itc.0 for ; Wed, 11 Jul 2018 23:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xhxnlk6u4VoTZdohB+qCVE8yJJgqiMYtNMOd1hPEhkc=; b=StlbcpXPh7KppvYiqdfSJ/XUITGaP0YxBbEmswW7LP9K6wXre/eY+DOvr3JZNyM0bg GtqkdtM7SyBYgI4qn5Asq0OcmnZBfbG0XdbK0xOctVe3ZNdqJ75MQREJH7GF8cpvLcy1 MH0cNHIP/5C7kn9YikrdPfQMksB7w4lUdjqL4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=xhxnlk6u4VoTZdohB+qCVE8yJJgqiMYtNMOd1hPEhkc=; b=f4prfG+DajlqlTIB4laLUlwYjMMJHOFehAk/8eW1jPdk5hdeIJ2nZ6/lKjTz9xtCqK q9L92vKCJM2JA/F6Eb9EK2z7/E+fA6n3bW8Jcm++NwsZajRExwI0LV0+BtGmH4T67gOU +TyGwEj4OKFj5xhqrsuNzMVHhfQWpyQ/I+IHqg5u+0dWVuppHYO7NN32d3za6go4KS9y ObG6STljYRSPGrOmvriE4/pPgMIewpHY2yN/cIjmoxF0xHgvSocn/TYv4Oqkt7DnMXPw IUjOq7E4lxghMwFzRfY4l7xWV/nMRTRg1xsQa3TdjPilLB9Yq8To4wKz6O2RPOUe0TXM iv8A== X-Gm-Message-State: AOUpUlF9sah+MWiIOrMH+D6uMNezd8CP8nreBQcwL2Y1zykMmgneYvFk W5Ioe6zFSIkK4yVVRJwAj2eMB8BUwXfE3Dl4locbGw== X-Received: by 2002:a24:558a:: with SMTP id e132-v6mr375857itb.2.1531377591022; Wed, 11 Jul 2018 23:39:51 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:e492:0:0:0:0:0 with HTTP; Wed, 11 Jul 2018 23:39:50 -0700 (PDT) X-Originating-IP: [2a02:168:5628:0:496f:7dc5:66d7:a057] In-Reply-To: <20180711160547.59f086a587c7f3c8d3c40f0f@linux-foundation.org> References: <20180709083650.23549-1-daniel.vetter@ffwll.ch> <20180709162509.29343-1-daniel.vetter@ffwll.ch> <20180709163001.8fb8148223a57bc46a13fbda@linux-foundation.org> <20180710075328.GG3008@phenom.ffwll.local> <871scbwfd4.fsf@notabene.neil.brown.name> <20180711160547.59f086a587c7f3c8d3c40f0f@linux-foundation.org> From: Daniel Vetter Date: Thu, 12 Jul 2018 08:39:50 +0200 X-Google-Sender-Auth: CiIaEbLyPIoSsrtsNgjYChvrCpU Message-ID: Subject: Re: [PATCH] kernel.h: Add for_each_if() To: Andrew Morton Cc: NeilBrown , LKML , DRI Development , Intel Graphics Development , Gustavo Padovan , Maarten Lankhorst , Sean Paul , David Airlie , Kees Cook , Ingo Molnar , Greg Kroah-Hartman , Wei Wang , Stefan Agner , Andrei Vagin , Randy Dunlap , Andy Shevchenko , Yisheng Xie , Peter Zijlstra , Daniel Vetter 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, Jul 12, 2018 at 1:05 AM, Andrew Morton wrote: > On Wed, 11 Jul 2018 13:51:08 +0200 Daniel Vetter wrote: >> But I still have the situation that a bunch of maintainers acked this >> and Andrew Morton defacto nacked it, which I guess means I'll keep the >> macro in drm? The common way to go about this seems to be to just push >> the patch series with the ack in some pull request to Linus and ignore >> the people who raised questions, but not really my thing. > > Heh. > > But, am I wrong? Code which uses regular kernel style doesn't have > these issues. We shouldn't be enabling irregular style - we should be > making such sites more regular. The fact that the compiler generates a > nice warning in some cases simply helps us with that. Yes liberal sprinkling of {} per coding style fixes it too. But given that the if (!cond) ; else pattern is fairly common even outside of drm it seems like not just graphics people think that little bit of added robustness in iterator macros is worth it. Only reason I bothered with this is because I've seen another open-coded version of this pattern fly by. Anyway I'm going on vacations for a few weeks now. Andy/Yisheng, I guess if you want this it's up to you to haggle for a consensus around this. If that doesn't happen I'm happy to keep it in drm headers. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch