Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3598420pxf; Mon, 22 Mar 2021 10:07:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypQdL3QYwxR6SFjAWZs0xWigQrRKS588rmmPviJrOanRJCzB1ZOhNU8UcHESOXFygnXGHO X-Received: by 2002:a05:6402:13ca:: with SMTP id a10mr610115edx.320.1616432845194; Mon, 22 Mar 2021 10:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616432845; cv=none; d=google.com; s=arc-20160816; b=pa1eYTjJX88iO4oDwZ6127Qj8YmG5QsFil6klnlRQ4EMrXUCELcKTHby7YG3Mfa/yP c3PU0pkcpQNJLlizf3zOOlhPHK/4RbZtXK61k7lb97nC0rsq2j8rd2JhWcI8xQn+y5hS V7QvXQLVXWZnGPJToPRJLAXTDDqs4zxm4Z/DLSeT90an8JbHMrRQO0EX3T+eegyJVBrT fxabSx57WIVrIcagdMVco6As5+XAGBwpH6iYLm7nhBYUt/OFPBBmGFs5dy3teQV93bYC YN/THj6+Ek6Bh3PfsiMWnSMN+NKZSgeWAMYEAhTvcTqhZ/TMV8k+ZFt7RlthJ8qwsvN/ CxyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=edxiajj3pRs/T67JjKnnNu8jS6uH/jxSLcgetS/152k=; b=mJa0z607rYde9SjxwecYgZLzHW/FGAfDBGqUo1Heapsin3zeewL+5U/VEODgan9qqg 5R7pPevirxcW+2tF64VnzRhwOZOU/hk4KCiJtOTOI49UIuR+XSFwKieRTIo/X5mjx45X NoPstF2VvTbUVuYfylo3MWKQJlmuqhFfPPDY5GboUudRfZnynEQWIcwllnCgZvG4NJRC M2Pu9FN9HYxOSveYqfThFCYGvACJpALsGGNY4vunv+6hQvjn3ZsVBx4jhlQUITr1gUUW UaWd329pxt2ulYz+FZryYFecWuALN01YuIVylu95pqICBnCBInkD1H9LnQKGbm/ui+a9 gXag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lmUJKKcr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qw16si11978949ejb.673.2021.03.22.10.07.02; Mon, 22 Mar 2021 10:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lmUJKKcr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231534AbhCVRFc (ORCPT + 99 others); Mon, 22 Mar 2021 13:05:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231687AbhCVRFQ (ORCPT ); Mon, 22 Mar 2021 13:05:16 -0400 Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61A97C061574 for ; Mon, 22 Mar 2021 10:05:11 -0700 (PDT) Received: by mail-qv1-xf31.google.com with SMTP id x27so9001038qvd.2 for ; Mon, 22 Mar 2021 10:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=edxiajj3pRs/T67JjKnnNu8jS6uH/jxSLcgetS/152k=; b=lmUJKKcr5fwHsvwxbmTJiLXqr3KMnghgEokc5CtfneaAi4MoijJYSE3OCkVWnCgFqe u7EDtki7hnxQsBdjx96G9NCYraX+R5cL/jIGYPr9oXPPXR3djdJA6BhAPfcM3ymATyLx NxlwTpErCk2IWszGDaspRUYC00EIJX5VvwIFM= 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=edxiajj3pRs/T67JjKnnNu8jS6uH/jxSLcgetS/152k=; b=CQVm8yAIlIcgGLa/pjB2BGjbvt9c/itv6+mszrgj1/rfmqOnS2ij3P6JYaGB5rjEa7 1kt+5FHf5361gXnIntvSEE4+oY6AdCLQVmdfIonSvVlD4WhIKkNEH56XjK4e2BYZijWU qjhvjY2O6JGIaSMNc242ZzkU0J8Zo7AK7/9QMgcvp3ecHf+ygEYmJwvk0tvK+FFzXoUs F2jQZcyaQlE0bGmfXe9POFoEbcmsSj1ZrU6uG+QYXfZa+JgI2WJlEZYG8lQRrPQXLDpM PbJODTq1nfDSnXUN8r5GIjDOcj9BdXFxVPMO6Cq7ULVSXuODqfjxAp19DQSGE2Z7CodT Lmaw== X-Gm-Message-State: AOAM531m6/k6OMpAELYEz7JJTU+Tyniq6ywojcs4WDEAw2zUxtMVg9H3 k3GrkDcP42/MNico8Pa/Lcd+PMJ4NqqTuA== X-Received: by 2002:a05:6214:326:: with SMTP id j6mr577173qvu.13.1616432710425; Mon, 22 Mar 2021 10:05:10 -0700 (PDT) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com. [209.85.219.181]) by smtp.gmail.com with ESMTPSA id q125sm11313555qkf.68.2021.03.22.10.05.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Mar 2021 10:05:09 -0700 (PDT) Received: by mail-yb1-f181.google.com with SMTP id m3so7345791ybt.0 for ; Mon, 22 Mar 2021 10:05:09 -0700 (PDT) X-Received: by 2002:a25:3741:: with SMTP id e62mr583491yba.343.1616432709363; Mon, 22 Mar 2021 10:05:09 -0700 (PDT) MIME-Version: 1.0 References: <20210322164308.827846-1-arnd@kernel.org> In-Reply-To: <20210322164308.827846-1-arnd@kernel.org> From: Doug Anderson Date: Mon, 22 Mar 2021 10:04:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kgdb: fix gcc-11 warning on indentation To: Arnd Bergmann Cc: Jason Wessel , Daniel Thompson , Arnd Bergmann , Greg Kroah-Hartman , Ingo Molnar , Christian Brauner , kgdb-bugreport@lists.sourceforge.net, LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Mar 22, 2021 at 9:43 AM Arnd Bergmann wrote: > > -#define v1printk(a...) do { \ > - if (verbose) \ > - printk(KERN_INFO a); \ > - } while (0) > -#define v2printk(a...) do { \ > - if (verbose > 1) \ > - printk(KERN_INFO a); \ > - touch_nmi_watchdog(); \ > - } while (0) > -#define eprintk(a...) do { \ > - printk(KERN_ERR a); \ > - WARN_ON(1); \ > - } while (0) > +#define v1printk(a...) do { \ nit: In addition to the indentation change you're also lining up the backslashes. Is that just personal preference, or is there some official recommendation in the kernel? I don't really have a strong opinion either way (IMO each style has its advantages). > + if (verbose) \ > + printk(KERN_INFO a); \ > +} while (0) > +#define v2printk(a...) do { \ > + if (verbose > 1) \ > + printk(KERN_INFO a); \ > + touch_nmi_watchdog(); \ This touch_nmi_watchdog() is pretty wonky. I guess maybe the assumption is that the "verbose level 2" prints are so chatty that the printing might prevent us from touching the NMI watchdog in the way that we normally do and thus we need an extra one here? ...but, in that case, I think the old code was _wrong_ and that the intention was that the touch_nmi_watchdog() should only be if "verose > 1" as the indentation implied. There doesn't feel like a reason to touch the watchdog if we're not doing anything slow. -Doug