Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3726295pxf; Mon, 22 Mar 2021 13:28:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOEUa1CAUS0gJIUWVEMAUsPhMYepSxcSWTd7Ea/ZNZCII1s0e/n/Fu9M5aFCDabQdb9D/0 X-Received: by 2002:aa7:cdcf:: with SMTP id h15mr1439897edw.28.1616444919908; Mon, 22 Mar 2021 13:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616444919; cv=none; d=google.com; s=arc-20160816; b=oBNR3yqUnunHdSZTAXndMs/yAD1IJjs/vcwKohIZ0ffQi1iXCBTpyeDEhP8bTU8VBI GxHD9V+tbP83QtdwWQWpX4WubCsGpnhZtFMy/2slKO7cGJwH4R5vFyLKnUuDrMZ5YzgP GxLACRQcy2+6+WdNO5b0OrWYXt/Il1aMxBCdMclqBXLrWhh24k/suWR1aniJqvioO0H9 /M1gY0mVcfE9sZ54ce/zE+hDzrb7KxS6q8rAs80Zbr31v2tc9TysW6vF/z2Al4JUY20k aPB4Ie9ggo5IhfZP4jwnT87gBFlpqAkDySXr1ld6BpHPlnBxLcL24W42h4ExidMY3wIo tadA== 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=YhxB7qp5hsuByNnFWcEOyiSowkeslCusHUb5Rd6gY0Y=; b=XfEMGgPEiR25ibjzhdT7ujCt3ySiNEGNqHSp9SESHC2FQcG8Vt5KJdNa90rDFiW77O 8Fbg/8YemnfVYN7jcU0QfXC/uS+bBf04tdw86KEL7DWkz+aaSDLyhMSannCGxmY+aoAS /flhdOmVtdaQGTFa7rhySYNBOXpMAo6VNjQN/HDk4gtnf4V14mZQeeQaOdEZPtJUy+nx UPXMNEQIMu3ri66fanGaxoCYkz3Jj9ibADRCHAXHUyodgVFAGPhN4aqvo3H4jIgqTJ6j rRGSBkYfJuuaK0/0tN8+MtRowpTHyTE4lwARnTJiB9ev2I1F8vPIcf3nk5QnvI3wJgge 0axg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fJr+bvd1; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si12446157ejf.292.2021.03.22.13.28.16; Mon, 22 Mar 2021 13:28:39 -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=@kernel.org header.s=k20201202 header.b=fJr+bvd1; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232376AbhCVU1C (ORCPT + 99 others); Mon, 22 Mar 2021 16:27:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:59172 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232319AbhCVU0j (ORCPT ); Mon, 22 Mar 2021 16:26:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F2EBC6192D for ; Mon, 22 Mar 2021 20:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616444799; bh=TCgVn6BB3w6F4s/+//BYt84HxccYqGXxV6srV5MngiY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fJr+bvd1OLPpHacH3GgE974NurUFyyS4cAhx9PpZakHdWqO3ribpjJ+1j3A2XTiiE M0T++nbsbN98mKyTLcrDQgbPIHb7ICF6sArPQKHtfjEkyXeurFqUoAZAZBPfmURmTA Uy9QdfoPYUiFCAMq1gZWqxKZon1jyItL6bn3OKfRefI8vsI8teOLbUUR43O/6+xuw2 n3fsnTxEiWl3PAtrGeXVKuI9IkLhA0ITfNQKh7xm+Pyw33J++UwokSC7i3qLhxkah5 UqoMVVDDdJC+CBrNZRaYVUVEtVDeOohUW9qQM5M8jIpce3rJgWffX7EywvNgT1NWsu UYF4xCkGva6Ng== Received: by mail-oo1-f44.google.com with SMTP id i25-20020a4aa1190000b02901bbd9429832so4429015ool.0 for ; Mon, 22 Mar 2021 13:26:38 -0700 (PDT) X-Gm-Message-State: AOAM532NGMfLUqy2TNeK/CA1ldqSH7Nd8vfQaDmpSUzth271eYIvrI0c OUZI2dn3klmjcVdoQTCiDQq6qG4Cba3awvFTnO4= X-Received: by 2002:a4a:244d:: with SMTP id v13mr998106oov.66.1616444798370; Mon, 22 Mar 2021 13:26:38 -0700 (PDT) MIME-Version: 1.0 References: <20210322164308.827846-1-arnd@kernel.org> <1bdabbff-8e3f-60dd-145d-af2dc45c1da5@windriver.com> In-Reply-To: <1bdabbff-8e3f-60dd-145d-af2dc45c1da5@windriver.com> From: Arnd Bergmann Date: Mon, 22 Mar 2021 21:26:22 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kgdb: fix gcc-11 warning on indentation To: Jason Wessel Cc: Doug Anderson , Daniel Thompson , 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 On Mon, Mar 22, 2021 at 9:14 PM Jason Wessel wrote: > > The original board this was developed with was a 32bit eeepc. > > The intent was that when v2printk() was called for a verbose > 1 > condition the touch_nmi_watchdog() was called. The test case > where a whole lot of single steps are executed sequentially was not > letting the watchdog get reset by the normal kernel routine. > The serial port was so slow it was pretty easy to hit this problem > and it would just power cycle itself. > > The original intent would have bee: > > #define v2printk(a...) do { \ > if (verbose > 1) { \ > printk(KERN_INFO a); \ > touch_nmi_watchdog(); \ > } \ > } while (0) Ok, thanks for sharing how the code was intended to work. I'll let you all come up with a decision on what should be done about it now, I'm happy to send one or two patches to address both the compiler warning, and the original mistake. My feeling is it would be best to address the warning first, pretty much with the patch I sent here, and to change the behavior as a second patch. That way the gcc-11 warning can be silenced in stable kernels by backporting the first patch, while the second patch can be tried out in new kernels first and might not get backported because the existing behavior is not harmful. > I'd guess this probably not the first time gcc-11 is finding brace > imbalances. There were only a handful of new -Wmisleading-indentation warnings for gcc-11, the older compilers already caught every instance in normal functions, while gcc-11 improved on finding them in macros as well. Arnd